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