OFFSET
1,2
MATHEMATICA
start = {1}; primes = Table[Prime[n], {n, 1, 1000}];
f[x_, y_] := If[MemberQ[primes, 2 x + y^2], 2 x + y^2]
b[x_] :=
Block[{w = x},
Select[Union[
Flatten[AppendTo[w,
Table[f[w[[i]], w[[j]]], {i, 1, Length[w]}, {j, 1,
Length[w]}]]]], # < 4000 &]];
t = FixedPoint[b, start] (* A192614 *)
PrimePi[t] (* A192615 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Clark Kimberling, Jul 05 2011
STATUS
approved