login
Number of partitions of n^2 into positive cubes.
7

%I #33 Jun 05 2017 17:34:11

%S 1,1,1,2,3,4,7,10,17,26,39,58,89,133,195,289,420,610,875,1253,1778,

%T 2514,3527,4937,6879,9516,13115,18012,24625,33503,45432,61402,82677,

%U 110913,148286,197722,262768,348100,459791,605780,795874,1042791,1362800,1776777

%N Number of partitions of n^2 into positive cubes.

%C a(n) = A003108(A000290(n)).

%H Alois P. Heinz, <a href="/A218495/b218495.txt">Table of n, a(n) for n = 0..1000</a>

%F a(n) ~ exp(4 * (Gamma(1/3)*Zeta(4/3))^(3/4) * sqrt(n) / 3^(3/2)) * (Gamma(1/3)*Zeta(4/3))^(3/4) / (24*Pi^2*n^(5/2)) [after Hardy & Ramanujan, 1917]. - _Vaclav Kotesovec_, Apr 10 2017

%F a(n) = [x^(n^2)] Product_{k>=1} 1/(1 - x^(k^3)). - _Ilya Gutkovskiy_, Jun 05 2017

%e n=5: number of partitions of 25 into parts of {1, 8}:

%e a(5) = #{8+8+8+1, 8+8+9x1, 8+17x1, 25x1} = 4;

%e n=6: number of partitions of 36 into parts of {1, 8, 27}:

%e a(6) = #{27+8+1, 27+9x1, 4x8+4x1, 3x8+12x1, 8+8+20x1, 8+28x1, 36x1} = 7;

%e n=7: number of partitions of 49 into parts of {1, 8, 27}:

%e a(7) = #{27+8+8+6x1, 27+8+14x1, 27+22x1, 6x8+1, 5x8+9x1, 4x8+17x1, 3x8+25x1, 8+8+33x1, 8+41x1, 49x1} = 10.

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

%p b(n, i-1) +`if`(i^3>n, 0, b(n-i^3, i)))

%p end:

%p a:= n-> b(n^2, iroot(n^2, 3)):

%p seq(a(n), n=0..60); # _Alois P. Heinz_, Nov 08 2012

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

%o (Haskell) a218495 = p (tail a000578_list) . (^ 2) where

%o p _ 0 = 1

%o p ks'@(k:ks) m = if m < k then 0 else p ks' (m - k) + p ks m

%o (PARI) a(n) = {my(nb=0); forpart(p=n^2, nb += (sum(k=1, #p, ispower(p[k], 3)) == #p);); nb;} \\ _Michel Marcus_, Jun 02 2015

%o (PARI) ok(p)=for(i=1,#p,if(!ispower(p[i],3),return(0)));1

%o a(n)=my(s=1);for(i=8,n^2,forpart(p=i,s+=ok(p),[8,sqrtnint(i,3)^3]));s \\ _Charles R Greathouse IV_, Jun 02 2015

%Y Cf. A000578, A218494.

%K nonn

%O 0,4

%A _Reinhard Zumkeller_, Oct 31 2012

%E More terms from _Alois P. Heinz_, Nov 08 2012