A097271 Numbers that are neither the sum of two nonzero squares nor the difference of two nonzero squares.
1, 4, 6, 14, 22, 30, 38, 42, 46, 54, 62, 66, 70, 78, 86, 94, 102, 110, 114, 118, 126, 134, 138, 142, 150, 154, 158, 166, 174, 182, 186, 190, 198, 206, 210, 214, 222, 230, 238, 246, 254, 258, 262, 266, 270, 278, 282, 286, 294, 302, 310, 318, 322, 326, 330, 334
Offset: 1
Keywords
Links
- Eric Weisstein's World of Mathematics, Sum of Squares Function.
Programs
-
Mathematica
Module[{nn=70,sq},sq=Flatten[{Total[#],Abs[#[[1]]-#[[2]]]}&/@Tuples[ Range[ 3nn]^2,2]]//Union;Take[Complement[Range[Max[sq]],sq],nn]] (* Harvey P. Dale, Nov 04 2016 *)
Comments