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!)
A025443 Number of partitions of n into 4 distinct nonzero squares. 32

%I #28 Feb 03 2021 15:39:27

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

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

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

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

%H Alois P. Heinz, <a href="/A025443/b025443.txt">Table of n, a(n) for n = 0..20000</a>

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

%F a(n) = [x^n y^4] 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`(t*i^2<n, 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), 4):

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

%t b[n_, i_, t_] := b[n, i, t] = If[n==0, If[t==0, 1, 0], If[t*i^2<n, 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, 4]; Table[a[n], {n, 0, 150}] (* _Jean-François Alcover_, Feb 29 2016, after _Alois P. Heinz_*)

%Y Cf. A025428 (not necessarily distinct), A025376-A025394 (subsequences), A025417 (greedy inverse).

%Y Column k=4 of A341040.

%K nonn,look

%O 0,79

%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 01:19 EDT 2024. Contains 371906 sequences. (Running on oeis4.)