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
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