The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A070321 Greatest squarefree number <= n. 9
1, 2, 3, 3, 5, 6, 7, 7, 7, 10, 11, 11, 13, 14, 15, 15, 17, 17, 19, 19, 21, 22, 23, 23, 23, 26, 26, 26, 29, 30, 31, 31, 33, 34, 35, 35, 37, 38, 39, 39, 41, 42, 43, 43, 43, 46, 47, 47, 47, 47, 51, 51, 53, 53, 55, 55, 57, 58, 59, 59, 61, 62, 62, 62, 65, 66, 67, 67, 69, 70, 71, 71 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
a(n) = Max( core(k) : k=1,2,3,...,n ) where core(x) is the squarefree part of x (the smallest integer such that x*core(x) is a square).
LINKS
MAPLE
A070321 := proc(n)
local a;
for a from n by -1 do
if issqrfree(a) then
return a;
end if;
end do:
end proc:
seq(A070321(n), n=1..100) ; # R. J. Mathar, May 25 2023
MATHEMATICA
a[n_] :=For[ k = n, True, k--, If[ SquareFreeQ[k], Return[k]]]; Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Mar 27 2013 *)
gsfn[n_]:=Module[{k=n}, While[!SquareFreeQ[k], k--]; k]; Array[gsfn, 80] (* Harvey P. Dale, Mar 27 2013 *)
PROG
(PARI) a(n) = while (! issquarefree(n), n--); n; \\ Michel Marcus, Mar 18 2017
CROSSREFS
Sequence in context: A081213 A081210 A285719 * A239904 A334819 A338375
KEYWORD
easy,nonn
AUTHOR
Benoit Cloitre, May 11 2002
EXTENSIONS
New description from Reinhard Zumkeller, Oct 03 2002
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 21 19:35 EDT 2024. Contains 372738 sequences. (Running on oeis4.)