A065458 Number of inequivalent (ordered) solutions to a^2 + b^2 + c^2 + d^2 = n^2.
1, 1, 2, 2, 2, 3, 4, 4, 2, 6, 7, 6, 4, 8, 10, 14, 2, 11, 14, 13, 7, 23, 15, 17, 4, 24, 21, 31, 10, 25, 37, 28, 2, 46, 29, 49, 14, 38, 35, 61, 7, 45, 62, 49, 15, 93, 47, 57, 4, 72, 67, 97, 21, 71, 84, 101, 10, 119, 70, 86, 37, 92, 79, 165, 2, 138, 127, 109, 29, 168, 140, 121, 14
Offset: 0
Keywords
Examples
a(5)=3 because 25 produces {0,0,0,5}, {0,0,3,4}, {1,2,2,4}.
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..1000
Programs
-
Maple
N:= 100: R:= Vector(N,1): for a from 0 to N do for b from a to floor(sqrt(N^2-a^2)) do for c from b to floor(sqrt(N^2-a^2-b^2)) do q:= a^2 + b^2 + c^2; for f in numtheory:-divisors(q) do if f^2 + 2*f*c <= q and (f + q/f)::even then r:= (f + q/f)/2; if r <= N then R[r]:= R[r]+1 fi; fi od od od od: convert(R,list); # Robert Israel, Feb 16 2015
-
Mathematica
Length/@Table[SumOfSquaresRepresentations[4, (k)^2], {k, 72}]
Extensions
a(0)=1 prepended by Alois P. Heinz, Feb 17 2015