login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A352959
a(n) is the first prime to start a sequence of exactly n primes under the iteration p -> (p^2 + 3*p + 1)/5.
0
2, 31, 11, 271, 38547571, 11480934901, 801479967311
OFFSET
1,1
COMMENTS
If x_0 = a(n) and x_{k+1} = (x_k^2 + 3*x_k + 1)/5, then x_0, x_1, ..., x_{n-1} are prime but x_n is not prime.
For n > 1, a(n) == 1 (mod 10).
a(8) > 5*10^14 - Bert Dobbelaere, Apr 17 2022
EXAMPLE
a(3) = 11 because 11, (11^2 + 3*11 + 1)/5 = 31 and (31^2 + 3*31 + 1)/5 = 211 are prime but (211^2 + 3*211 + 1)/5 = 9031 is composite.
MAPLE
g:= proc(x) if isprime(x) then 1+procname((x^2+3*x+1)/5) else 0 fi end proc:
V:= Vector(5): V[1]:=2: count:= 1:
for x from 11 by 10 while count < 5 do
v:= g(x); if v>0 and V[v] = 0 then count:= count+1; V[v]:= x; fi;
od:
convert(V, list);
MATHEMATICA
f[p_] := -1 + Length @ NestWhileList[(#^2 + 3*# + 1)/5 &, p, PrimeQ]; seq[len_, nmax_] := Module[{s = Table[0, {len}], p = 1, c = 0, i}, While[c < len && p < nmax, p = NextPrime[p]; i = f[p]; If[i <= len && s[[i]] == 0, c++; s[[i]] = p]]; s]; seq[5, 10^8] (* Amiram Eldar, Apr 11 2022 *)
CROSSREFS
Cf. A352954.
Sequence in context: A377788 A178194 A069460 * A117816 A237263 A099189
KEYWORD
nonn,more
AUTHOR
J. M. Bergot and Robert Israel, Apr 11 2022
EXTENSIONS
a(6) from Amiram Eldar, Apr 11 2022
a(7) from Bert Dobbelaere, Apr 17 2022
STATUS
approved