|
|
A025427
|
|
Number of partitions of n into 3 nonzero squares.
|
|
38
|
|
|
0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 2, 0, 1, 1, 0, 0, 2, 1, 1, 1, 0, 2, 0, 0, 2, 1, 1, 1, 1, 1, 0, 1, 1, 1, 2, 0, 1, 3, 0, 1, 2, 0, 2, 0, 1, 2, 0, 0, 1, 3, 1, 1, 2, 1, 0, 1, 1, 2, 2, 1, 2, 1, 0, 0, 3, 1, 2, 1, 0, 3, 0, 1, 3, 2, 1, 0, 1, 2, 0, 1, 1, 2, 3, 0, 3, 2, 0, 1, 2, 1, 2
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,28
|
|
COMMENTS
|
The non-vanishing values a(n) give the multiplicities for the numbers n appearing in A000408. See also A024795 where these numbers n are listed a(n) times. For the primitive case see A223730 and A223731. - Wolfdieter Lang, Apr 03 2013
|
|
LINKS
|
|
|
FORMULA
|
a(4n) = a(n). This is because if a number divisible by 4 is the sum of three squares, each of those squares must be even. - Robert Israel, Mar 09 2016
a(n) = [x^n y^3] Product_{k>=1} 1/(1 - y*x^(k^2)). - Ilya Gutkovskiy, Apr 19 2019
|
|
EXAMPLE
|
a(27) = 2 because 1^2 + 1^2 + 5^2 = 27 = 3^2 + 3^2 + 3^2. The second representation is not primitive (gcd(3,3,3) = 3 not 1).
|
|
MAPLE
|
local a, x, y, zsq ;
a := 0 ;
for x from 1 do
if 3*x^2 > n then
return a;
end if;
for y from x do
if x+2*y^2 > n then
break;
end if;
zsq := n-x^2-y^2 ;
if issqr(zsq) then
a := a+1 ;
end if;
end do:
end do:
|
|
MATHEMATICA
|
Count[PowersRepresentations[#, 3, 2], pr_ /; (Times @@ pr) > 0]& /@ Range[0, 120] (* Jean-François Alcover, Jan 30 2018 *)
|
|
PROG
|
(Haskell)
a025427 n = sum $ map f zs where
f x = sum $ map (a010052 . (n - x -)) $
takeWhile (<= div (n - x) 2) $ dropWhile (< x) zs
zs = takeWhile (< n) $ tail a000290_list
(PARI) a(n)=if(n<3, return(0)); sum(i=sqrtint((n-1)\3)+1, sqrtint(n-2), my(t=n-i^2); sum(j=sqrtint((t-1)\2)+1, min(sqrtint(t-1), i), issquare(t-j^2))) \\ Charles R Greathouse IV, Aug 05 2024
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|