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!)
A270442 Smallest k > 1 such that none of k^2 - 0, k^2 - 1, k^2 - 2,..., k^2 - n are squarefree. 1
2, 3, 10, 941, 3052, 8173, 35359, 1526009, 30167284, 46952141, 574236841 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,1
LINKS
EXAMPLE
a(0) = 2 because none of 2^2 - 0 = 4 = (2*2) is squarefree;
a(1) = 3 because none of 3^2 - 0 = 9 = (3*3), 3^2 - 1 = 8 = (2*2)*2 are squarefree;
a(2) = 10 because 10^2 - 0 = 100 = (2*2)*25, 10^2 - 1 = 99 = (3*3)*11, 10^2 - 2 = 98 = (7*7)*2 are squarefree.
MATHEMATICA
sk[n_]:=Module[{k=2}, While[AnyTrue[k^2-Range[0, n], SquareFreeQ], k++]; k]; Array[sk, 10] (* Requires Mathematica version 10 or later *) (* The program will take a long time to run. *) (* Harvey P. Dale, Jan 10 2021 *)
PROG
(PARI) isok(k, n) = {for (j=1, n, if (issquarefree(k^2-j), return (0)); ); 1; }
a(n) = {my(k = 2); while (! isok(k, n), k++); k; } \\ Michel Marcus, Apr 11 2016
CROSSREFS
Sequence in context: A302250 A290638 A330294 * A330581 A184163 A218271
KEYWORD
nonn,more
AUTHOR
EXTENSIONS
Offset corrected by Michel Marcus, Apr 11 2016
a(8) from Michel Marcus, Apr 11 2016
a(9) from Seiichi Manyama, Sep 08 2018
a(10) from Giovanni Resta, Oct 29 2018
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 April 19 19:02 EDT 2024. Contains 371798 sequences. (Running on oeis4.)