A016032 Least positive integer that is the sum of two squares of positive integers in exactly n ways.
2, 50, 325, 1105, 8125, 5525, 105625, 27625, 71825, 138125, 5281250, 160225, 1221025, 2442050, 1795625, 801125, 446265625, 2082925, 41259765625, 4005625, 44890625, 30525625, 61051250, 5928325, 303460625, 53955078125, 35409725, 100140625, 1289367675781250
Offset: 1
Examples
a(0) = 1 as 1 is the least positive integer not expressible as the sum of two squared positives. a(1) = 2 from 2 = 1^2 + 1^2. a(2) = 50 from 50 = 1^2 + 7^2 = 5^2 + 5^2.
References
- A. Beiler, Recreations in the Theory of Numbers, Dover, pp. 140-141.
Links
- T. D. Noe and Ray Chandler, Table of n, a(n) for n = 1..2178 (a(2179) exceeds 1000 digits).
- C. Rivera, Puzzle 62
- Eric Weisstein's World of Mathematics, Square Number
- G. Xiao, Two squares
- Index entries for sequences related to sums of squares
Crossrefs
Programs
-
Mathematica
Array[Block[{k = 1}, While[Length@ DeleteCases[PowersRepresentations[k, 2, 2], ?(! FreeQ[#, 0] &)] != #, k++]; k] &, 6] (* _Michael De Vlieger, Mar 31 2019 *)
-
PARI
b(k)=my(c=0);for(i=1,sqrtint(k\2),if(issquare(k-i^2),c+=1));c \\ A025426 for(n=1,10,k=1;while(k,if(b(k)==n,print1(k,", ");break);k+=1)) \\ Derek Orr, Mar 20 2019
Extensions
Corrected and extended by Jud McCranie
Definition improved by several correspondents, Nov 12 2007