OFFSET
1,2
MATHEMATICA
start = {1}; primes = Table[Prime[n], {n, 1, 10000}];
f[x_, y_] := If[MemberQ[primes, 3 x + 4 y], 3 x + 4 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]}]]]], # < 20000 &]];
t = FixedPoint[b, start] (* A192596 *)
PrimePi[t] (* A192597 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Clark Kimberling, Jul 05 2011
STATUS
approved