login
A370387
a(n) is the least prime p such that p + 6*k*(k+1) is prime for 0 <= k <= n-1 but not for k=n.
2
2, 19, 5, 67, 7, 281, 1051, 6791, 11, 115599457, 365705201, 79352440891, 286351937491, 5810592517241, 17
OFFSET
1,1
COMMENTS
a(10), ..., a(14) > 10^7, a(15) = 17, a(16), ..., a(20) > 10^7.
a(29) = 31. - Chai Wah Wu, Apr 10 2024
MAPLE
f:= proc(p) local k;
for k from 1 while isprime(p+k*(k+1)*6) do od:
k
end proc:
A:= Vector(12): count:= 0:
for i from 1 while count < 12 do
v:= f(ithprime(i));
if A[v] = 0 then count:= count+1; A[v]:= ithprime(i) fi
od:
convert(A, list);
MATHEMATICA
Table[p=1; m=6; Monitor[Parallelize[While[True, If[And[MemberQ[PrimeQ[Table[p+m*k*(k+1), {k, 0, n-1}]], False]==False, PrimeQ[p+m*n*(n+1)]==False], Break[]]; p++]; p], p], {n, 1, 10}]
PROG
(PARI) isok(p, n) = for (k=0, n-1, if (! isprime(p + 6*k*(k+1)), return(0))); return (!isprime(p + 6*n*(n+1)));
a(n) = my(p=2); while (!isok(p, n), p=nextprime(p+1)); p;
CROSSREFS
Sequence in context: A358980 A092120 A059706 * A128361 A096481 A376920
KEYWORD
nonn,more
AUTHOR
EXTENSIONS
a(10)-a(11) from Chai Wah Wu, Apr 10 2024
a(12) from Chai Wah Wu, Apr 11 2024
a(13)-a(14) from David A. Corneth, Apr 11 2024
a(15) from J.W.L. (Jan) Eerland, Mar 12 2024
STATUS
approved