OFFSET
1,1
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..10000
EXAMPLE
17 is a term because 17 = 2^2 + 2^2 + 3^2 and 19 = 1^2 + 3^2 + 3^2.
41 is a term because 41 = 3^2 + 4^2 + 4^2 and 43 = 3^2 + 3^2 + 5^2.
59 is a term because 59 = 3^2 + 5^2 + 5^2 and 61 = 3^2 + 4^2 + 6^2.
PROG
(PARI) isA000408(n) = my(a, b) ; a=1 ; while(a^2+1<n, b=1 ; while(b<=a && a^2+b^2<n, if(issquare(n-a^2-b^2), return(1) ) ; b++ ; ) ; a++ ; ) ; return(0) ;
t(n, p=3) = { while( p+2 < (p=nextprime( p+1 )) || n-->0, ); p-2}
for(n=1, 1e2, if(isA000408(t(n)) && isA000408(t(n)+2), print1(t(n), ", ")));
CROSSREFS
KEYWORD
nonn
AUTHOR
Altug Alkan, Mar 13 2016
STATUS
approved