login
A016032
Least positive integer that is the sum of two squares of positive integers in exactly n ways.
23
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,1
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
FORMULA
a(n) = min(2*A018782(2n-1), A018782(2n), A018782(2n+1)).
EXAMPLE
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.
MATHEMATICA
Array[Block[{k = 1}, While[Length@ DeleteCases[PowersRepresentations[k, 2, 2], _?(! FreeQ[#, 0] &)] != #, k++]; k] &, 6] (* Michael De Vlieger, Mar 31 2019 *)
PROG
(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
CROSSREFS
Cf. A018825, A048610, A025284-A025293 (first entries).
See A000446, A124980 and A093195 for other versions.
Sequence in context: A226337 A048610 A007511 * A080299 A083939 A083941
KEYWORD
nonn,nice
EXTENSIONS
Corrected and extended by Jud McCranie
Definition improved by several correspondents, Nov 12 2007
STATUS
approved