OFFSET
1,1
LINKS
Pierre CAMI, Table of n, a(n) for n = 1..5600
MATHEMATICA
a[n_] := For[k = 1, True, k++, p = Prime[n]; If[PrimeQ[q = k*2*p^2 + 1] && PrimeQ[r = k*2*q^2 + 1] && PrimeQ[k*2*r^2 + 1], Return[k]]]; Table[ a[n] , {n, 1, 49}] (* Jean-François Alcover, Apr 12 2013 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Pierre CAMI, Apr 08 2013
STATUS
approved