OFFSET
1,1
COMMENTS
First terms not multiple of 6: 410, 740, 1088, 1148, 1460, 1900, 1960.
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
Zak Seidov, Table of n,p,q,n^2,r,s
EXAMPLE
12=5+7, 144=71+73;
24=11+13, 576=283+293;
42=19+23, 1764=881+883.
MATHEMATICA
Reap[ Do[ If[ (p=NextPrime[n/2, -1]; p+NextPrime[p] == n) && (q=NextPrime[n^2/2, -1]; q+NextPrime[q] == n^2) , Sow[n]], {n, 2, 5000, 2}]][[2, 1]] (* Jean-François Alcover, Jul 17 2012 *)
PROG
(PARI) p=2; forprime(q=3, 1e3, n=p+q; if(precprime(n^2/2)+nextprime((n^2+1)/2)==n^2, print1(n", ")); p=q) \\ Charles R Greathouse IV, Jun 21 2012
CROSSREFS
KEYWORD
nonn
AUTHOR
Zak Seidov, Jun 19 2012
STATUS
approved