cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

This page as a plain text file.
%I A257545 #15 May 01 2015 03:32:30
%S A257545 2,5,29,101,5051,5051,73453,671353,130179187,211014929,262315477,
%T A257545 3639720053
%N A257545 a(0) = 2, a(n) = smallest prime p such that none of p - 1, p - 2,... p - n are squarefree.
%F A257545 a(n) << A002110(n)^10 by the CRT and Xylouris' improvement to Linnik's theorem. - _Charles R Greathouse IV_, Apr 29 2015
%e A257545 a(3) = 101 because 101 is prime and none of 101 - 1 = 100, 101 - 2 = 99, and 101 - 3 = 98 are squarefree.
%p A257545 p:= 2:
%p A257545 A[0]:= 2:
%p A257545 m:= 0:
%p A257545 while p < 10^6 do
%p A257545 p:= nextprime(p);
%p A257545 for k from 1 while not numtheory:-issqrfree(p-k) do od:
%p A257545 if k > m+1 then
%p A257545    for j from m+1 to k-1 do A[j]:= p od:
%p A257545    m:= k-1;
%p A257545 fi
%p A257545 od:
%p A257545 seq(A[i],i=0..m); # _Robert Israel_, Apr 29 2015
%o A257545 (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 A257545 Cf. A257108.
%K A257545 nonn,more
%O A257545 0,1
%A A257545 _Juri-Stepan Gerasimov_, Apr 29 2015
%E A257545 a(9)-a(11) from _Charles R Greathouse IV_, Apr 29 2015