Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #22 Apr 13 2013 13:45:24
%S 386,2769,96656,5366,420,34454,65039,192215,458367,24735,27155,777,
%T 736254,80297,279927,113429,650474,238919,8229,1284345,642789,333141,
%U 11510,1009271,932,395126,1202174,25811,204534,16286,22094,2661131,22530,128225,56225,900
%N Smallest k such that k*2*p(n)^2+1=q is prime, k*2*q^2+1=r, k*2*r^2+1=s, k*2*r^2+1=t, r, s, and t are also prime.
%C Conjecture: a(n) exist for all n
%C t=k*2*(k*2*(k*2*(k*2*p(n)^2+1)^2+1)^2+1)^2+1
%C s=k*2*(k*2*(k*2*p(n)^2+1)^2+1)^2+1
%C r=k*2*(k*2*p(n)^2+1)^2+1
%C q=k*2*p(n)^2+1
%H Pierre CAMI, <a href="/A224496/b224496.txt">Table of n, a(n) for n = 1..80</a>
%t 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[s = k*2*r^2 + 1] && PrimeQ[k*2*s^2 + 1], Return[k]]]; Table[ Print[an = a[n]]; an , {n, 1, 36}] (* _Jean-François Alcover_, Apr 12 2013 *)
%o (PFGW and SCRIPTIFY)
%o SCRIPT
%o DIM k
%o DIM i, 0
%o DIM q
%o DIMS t
%o OPENFILEOUT myf, a(n).txt
%o LABEL a
%o SET i, i+1
%o IF i>34 THEN END
%o SET k, 0
%o LABEL b
%o SET k, k+1
%o SETS t, %d, %d, %d\,; k; i; p(i)
%o SET q, k*2*p(i)^2+1
%o PRP q, t
%o IF ISPRP THEN GOTO c
%o GOTO b
%o LABEL c
%o SET q, k*2*q^2+1
%o PRP q, t
%o IF ISPRP THEN GOTO d
%o GOTO b
%o LABEL d
%o SET q, k*2*q^2+1
%o PRP q, t
%o IF ISPRP THEN GOTO e
%o GOTO b
%o LABEL e
%o SET q, k*2*q^2+1
%o PRP q, t
%o IF ISPRP THEN WRITE myf, t
%o IF ISPRP THEN GOTO a
%o GOTO b
%Y Cf. A224489, A224490, A224491, A224492, A224193, A224494, A224495.
%K nonn
%O 1,1
%A _Pierre CAMI_, Apr 08 2013