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!)
A257545 a(0) = 2, a(n) = smallest prime p such that none of p - 1, p - 2,... p - n are squarefree. 2

%I #15 May 01 2015 03:32:30

%S 2,5,29,101,5051,5051,73453,671353,130179187,211014929,262315477,

%T 3639720053

%N a(0) = 2, a(n) = smallest prime p such that none of p - 1, p - 2,... p - n are squarefree.

%F a(n) << A002110(n)^10 by the CRT and Xylouris' improvement to Linnik's theorem. - _Charles R Greathouse IV_, Apr 29 2015

%e a(3) = 101 because 101 is prime and none of 101 - 1 = 100, 101 - 2 = 99, and 101 - 3 = 98 are squarefree.

%p p:= 2:

%p A[0]:= 2:

%p m:= 0:

%p while p < 10^6 do

%p p:= nextprime(p);

%p for k from 1 while not numtheory:-issqrfree(p-k) do od:

%p if k > m+1 then

%p for j from m+1 to k-1 do A[j]:= p od:

%p m:= k-1;

%p fi

%p od:

%p seq(A[i],i=0..m); # _Robert Israel_, Apr 29 2015

%o (PARI) a(n)=forprime(p=2,,for(k=1,n,if(issquarefree(p-k), next(2))); return(p)) \\ _Charles R Greathouse IV_, Apr 29 2015

%Y Cf. A257108.

%K nonn,more

%O 0,1

%A _Juri-Stepan Gerasimov_, Apr 29 2015

%E a(9)-a(11) from _Charles R Greathouse IV_, Apr 29 2015

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 16:38 EDT 2024. Contains 371794 sequences. (Running on oeis4.)