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!)
A025429 Number of partitions of n into 5 nonzero squares. 18

%I #38 Aug 25 2022 03:38:36

%S 0,0,0,0,0,1,0,0,1,0,0,1,0,1,1,0,1,1,0,1,2,1,1,1,1,1,1,1,1,3,1,1,3,0,

%T 1,3,1,3,2,1,3,2,1,3,3,2,3,2,2,2,2,3,3,5,2,2,5,1,3,5,1,5,4,2,5,3,2,5,

%U 5,3,4,4,4,3,5,4,4,7,3,5,6,2,4,7,4,7,6,3,7,4,3,8,6,5,7,5,5,4,6,7,6,9,5,6,8,2,8

%N Number of partitions of n into 5 nonzero squares.

%C a(33) is the last zero in this sequence, cf. the link to Mathematics Stack Exchange and also A080673(n) for the largest index k with a(k)=n. - _M. F. Hasler_, May 30 2014

%C First occurrence of k beginning with 0: 0, 5, 20, 29, 62, 53, 80, 77, 91, 101, ..., (A080654). - _Robert G. Wilson v_, May 30 2014

%H M. F. Hasler, <a href="/A025429/b025429.txt">Table of n, a(n) for n = 0..10000</a>

%H H. v. Eitzen, in reply to user James47, <a href="http://math.stackexchange.com/questions/811824/what-is-the-largest-integer-with-only-one-representation-as-a-sum-of-five-nonzer">What is the largest integer with only one representation as a sum of five nonzero squares?</a> on Mathematics Stack Exchange, May 2014

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

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

%F a(n) = Sum_{l=1..floor(n/5)} Sum_{k=l..floor((n-1)/4)} Sum_{j=k..floor((n-k-l)/3)} Sum_{i=j..floor((n-j-k-l)/2)} A010052(i) * A010052(j) * A010052(k) * A010052(l) * A010052(n-i-j-k-l). - _Wesley Ivan Hurt_, Apr 19 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, b(n, i-1, t)+

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

%p end:

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

%p seq(a(n), n=0..120); # _Alois P. Heinz_, May 30 2014

%t f[n_] := Block[{c = Range@ Sqrt@ n^2}, Length@ IntegerPartitions[n, {5}, c]]; Array[f, 105, 0] (* _Robert G. Wilson v_, May 30 2014 *)

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

%o (PARI) A025429(n)=sum(d=sqrtint(max(n, 5)\5), sqrtint(max(n-4, 0)), nn=n-d^2; sum(a=sqrtint(max(nn-d^2, 4)\4), min(sqrtint(max(nn-3, 0)),d), sum(b=sqrtint((nn-a^2)\3-1)+1, min(sqrtint(nn-a^2-2), a), sum(c=sqrtint((t=nn-a^2-b^2)\2-1)+1, min(sqrtint(t-1), b), issquare(t-c^2) )))) \\ _M. F. Hasler_, May 30 2014

%Y Column k=5 of A243148.

%K nonn,easy,look

%O 0,21

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