OFFSET
1,2
COMMENTS
All terms are divisible by 4.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
12 is a term because 12^2 + 2 = 5^2 + 11^2.
MAPLE
f:= n -> andmap(t -> t[1] mod 4 <> 3 or t[2]::even, ifactors(n^2+2)[2]):
map(f, [seq(n, n=4..1000, 4)]); # Robert Israel, Jul 12 2016
MATHEMATICA
stnsQ[n_]:=Length[Select[IntegerPartitions[n^2+2, {2}], AllTrue[Sqrt[ #], IntegerQ]&]]>0; Select[Range[0, 750, 4], stnsQ] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, May 11 2020 *)
PROG
(PARI) isA000404(n) = for( i=1, #n=factor(n)~%4, n[1, i]==3 && n[2, i]%2 && return); n && ( vecmin(n[1, ])==1 || (n[1, 1]==2 && n[2, 1]%2));
lista(nn) = for(n=0, nn, if(isA000404(n^2+2), print1(n, ", ")));
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Altug Alkan, Jun 30 2016
STATUS
approved