login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A025442 Number of partitions of n into 3 distinct nonzero squares. 20

%I #22 Feb 03 2021 15:39:05

%S 0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,1,0,0,1,1,0,0,0,

%T 0,1,0,0,1,0,0,1,1,0,0,1,1,0,0,1,1,0,0,1,1,0,1,0,0,1,0,1,2,0,0,1,1,0,

%U 0,2,1,0,0,0,2,1,0,2,1,0,0,1,0,1,1,0,2,0,0,2,2,1,0,1,2,0,0,0,2,0,0,3,0,0,1,2,1,1

%N Number of partitions of n into 3 distinct nonzero squares.

%H Alois P. Heinz, <a href="/A025442/b025442.txt">Table of n, a(n) for n = 0..10000</a>

%H <a href="/index/Su#ssq">Index entries for sequences related to sums of squares</a>

%F a(n)>0 <=> n is in A004432. - _M. F. Hasler_, Feb 03 2013

%F a(n) = [x^n y^3] Product_{k>=1} (1 + y*x^(k^2)). - _Ilya Gutkovskiy_, Apr 22 2019

%p b:= proc(n,i,t) option remember; `if`(n=0, `if`(t=0,1,0),

%p `if`(i<1 or t<1, 0, `if`(i=1, 0, b(n,i-1,t))+

%p `if`(i^2>n, 0, b(n-i^2,i-1,t-1))))

%p end:

%p a:= n-> b(n, isqrt(n), 3):

%p seq(a(n), n=0..120); # _Alois P. Heinz_, Feb 07 2013

%t b[n_, i_, t_] := b[n, i, t] = If[n==0, If[t==0, 1, 0], If[i<1 || t<1, 0, If[i==1, 0, b[n, i-1, t]] + If[i^2 > n, 0, b[n-i^2, i-1, t-1]]]]; a[n_] := b[n, Sqrt[n] // Floor, 3]; Table[a[n], {n, 0, 120}] (* _Jean-François Alcover_, Oct 10 2015, after _Alois P. Heinz_ *)

%o (PARI) A025442(n)={sum(x=1,sqrtint(n\3),sum(y=x+1,sqrtint((n-1-x^2)\2),issquare(n-x^2-y^2)))} \\ - _M. F. Hasler_, Feb 03 2013

%Y Cf. A024803, A025339, A001974, A004432.

%Y Column k=3 of A341040.

%K nonn

%O 0,63

%A _David W. Wilson_

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 02:53 EDT 2024. Contains 371906 sequences. (Running on oeis4.)