login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A274595 Numbers n such that n^2 + 2 is the sum of two nonzero squares. 2
0, 4, 12, 24, 40, 48, 60, 68, 72, 84, 104, 112, 132, 140, 144, 148, 176, 180, 192, 204, 216, 220, 252, 264, 276, 284, 312, 320, 324, 364, 372, 384, 392, 396, 408, 420, 428, 444, 456, 468, 472, 480, 528, 544, 588, 600, 612, 624, 636, 644, 648, 660, 684, 688, 708, 720 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
All terms are divisible by 4.
LINKS
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
Sequence in context: A301058 A008213 A008187 * A115228 A081935 A008006
KEYWORD
nonn,easy
AUTHOR
Altug Alkan, Jun 30 2016
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 01:06 EDT 2024. Contains 371964 sequences. (Running on oeis4.)