OFFSET
1,1
COMMENTS
Numbers with both at least one prime factor of form 4k+1 (which makes the square decomposable into the sum of two squares), and with at least one prime factor of form 4k+3 to an odd multiplicity (which makes the number itself not decomposable). This is a direct consequence of Fermat's Christmas theorem on the sum of two squares (Fermat announced its proof - without giving it - in a letter to Mersenne dated December 25, 1640). - Jean-Christophe Hervé, Nov 19 2013
Numbers n such that n^2 is the sum of two nonzero squares while n is not. Also note that sequence is equivalent to "Hypotenuse numbers A009003 which cannot be represented as sum of 2 nonzero squares." The reason is, if n is the sum of two nonzero squares in exactly one way and n = a^2 + a^2, then n^2 cannot be the sum of two nonzero squares. - Altug Alkan, Apr 14 2016
LINKS
Eric Weisstein's World of Mathematics, Square Number
Proof Wiki, Fermat's Christmas Theorem
Wikipedia, Fermat's Theorem on sums of two squares
Wikipedia (fr), Théorème des deux carrés de Fermat (in French).
EXAMPLE
MATHEMATICA
f[n_]:=Module[{k=1}, While[(n-k^2)^(1/2)!=IntegerPart[(n-k^2)^(1/2)], k++; If[2*k^2>=n, k=0; Break[]]]; k]; lst1={}; Do[If[f[n^2]>0, AppendTo[lst1, n]], {n, 3, 5!}]; lst1 (*A009003 Hypotenuse numbers (squares are sums of 2 distinct nonzero squares).*) lst2={}; Do[If[f[n]>0, AppendTo[lst2, n]], {n, 3, 5!}]; lst2 (*A004431 Numbers that are the sum of 2 distinct nonzero squares.*) Complement[lst1, lst2]
CROSSREFS
KEYWORD
nonn
AUTHOR
Vladimir Joseph Stephan Orlovsky, Jul 07 2009
EXTENSIONS
Formulas added, entries checked by R. J. Mathar, Aug 14 2009
STATUS
approved