%I #47 Aug 06 2024 00:03:47
%S 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,
%T 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,
%U 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
%N Number of partitions of n into 3 nonzero squares.
%C 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
%H R. J. Mathar and R. Zumkeller, <a href="/A025427/b025427.txt">Table of n, a(n) for n = 0..10000</a>, first 5592 terms from R. J. Mathar
%H <a href="/index/Su#ssq">Index to sequences related to sums of squares and cubes</a>.
%F a(A004214(n)) = 0; a(A000408(n)) > 0; a(A025414(n)) = n and a(m) != n for m < A025414(n). - _Reinhard Zumkeller_, Feb 26 2015
%F 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
%F a(n) = Sum_{k=1..floor(n/3)} Sum_{i=k..floor((n-k)/2)} A010052(i) * A010052(k) * A010052(n-i-k). - _Wesley Ivan Hurt_, Apr 19 2019
%F a(n) = [x^n y^3] Product_{k>=1} 1/(1 - y*x^(k^2)). - _Ilya Gutkovskiy_, Apr 19 2019
%e 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).
%p A025427 := proc(n)
%p local a,x,y,zsq ;
%p a := 0 ;
%p for x from 1 do
%p if 3*x^2 > n then
%p return a;
%p end if;
%p for y from x do
%p if x+2*y^2 > n then
%p break;
%p end if;
%p zsq := n-x^2-y^2 ;
%p if issqr(zsq) then
%p a := a+1 ;
%p end if;
%p end do:
%p end do:
%p end proc: # _R. J. Mathar_, Sep 15 2015
%t Count[PowersRepresentations[#, 3, 2], pr_ /; (Times @@ pr) > 0]& /@ Range[0, 120] (* _Jean-François Alcover_, Jan 30 2018 *)
%o (Haskell)
%o a025427 n = sum $ map f zs where
%o f x = sum $ map (a010052 . (n - x -)) $
%o takeWhile (<= div (n - x) 2) $ dropWhile (< x) zs
%o zs = takeWhile (< n) $ tail a000290_list
%o -- _Reinhard Zumkeller_, Feb 26 2015
%o (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
%Y Cf. A000408, A024795, A223730 (multiplicities for the primitive case). - _Wolfdieter Lang_, Apr 03 2013
%Y Column k=3 of A243148.
%Y Cf. A000290, A010052, A004214, A025321, A025414, A025426.
%K nonn,easy
%O 0,28
%A _David W. Wilson_