cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A003108 Number of partitions of n into cubes.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 9, 9, 10, 10, 10, 11, 11, 11, 12, 12, 13, 13, 13, 14, 14, 14, 15, 15, 17, 17, 17, 18, 18, 18, 19, 19, 21, 21, 21, 22, 22, 22, 23, 23, 25, 26, 26, 27, 27, 27, 28
Offset: 0

Views

Author

Keywords

Comments

The g.f. 1/(z+1)/(z**2+1)/(z**4+1)/(z-1)**2 conjectured by Simon Plouffe in his 1992 dissertation is wrong.

Examples

			a(16) = 3 because we have [8,8], [8,1,1,1,1,1,1,1,1] and [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1].
G.f.: A(x) = 1 + x + x^2 + x^3 + x^4 + x^5 + x^6 + x^7 + 2*x^8 +...
such that the g.f. A(x) satisfies the identity [Paul D. Hanna]:
A(x) = 1/((1-x)*(1-x^8)*(1-x^27)*(1-x^64)*(1-x^125)*...)
A(x) = 1 + x/(1-x) + x^8/((1-x)*(1-x^8)) + x^27/((1-x)*(1-x^8)*(1-x^27)) + x^64/((1-x)*(1-x^8)*(1-x^27)*(1-x^64)) +...
		

References

  • H. P. Robinson, Letter to N. J. A. Sloane, Jan 04 1974.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • F. Smarandache, Sequences of Numbers Involved in Unsolved Problems, Hexis, Phoenix, 2006.

Crossrefs

Programs

  • Haskell
    a003108 = p $ tail a000578_list where
       p _          0 = 1
       p ks'@(k:ks) m = if m < k then 0 else p ks' (m - k) + p ks m
    -- Reinhard Zumkeller, Oct 31 2012
    
  • Magma
    [#RestrictedPartitions(n,{d^3:d in [1..n]}): n in [0..150]]; // Marius A. Burtea, Jan 02 2019
    
  • Maple
    g:=1/product(1-x^(j^3),j=1..30): gser:=series(g,x=0,70): seq(coeff(gser,x,n),n=0..65); # Emeric Deutsch, Mar 30 2006
  • Mathematica
    nmax = 100; CoefficientList[Series[Product[1/(1 - x^(k^3)), {k, 1, nmax^(1/3)}], {x, 0, nmax}], x] (* Vaclav Kotesovec, Aug 19 2015 *)
    nmax = 60; cmax = nmax^(1/3);
    s = Table[n^3, {n, cmax}];
    Table[Count[IntegerPartitions@n, x_ /; SubsetQ[s, x]], {n, 0, nmax}] (* Robert Price, Jul 31 2020 *)
  • PARI
    {a(n)=polcoeff(1/prod(k=1, ceil(n^(1/3)), 1-x^(k^3)+x*O(x^n)), n)} /* Paul D. Hanna, Mar 09 2012 */
    
  • PARI
    {a(n)=polcoeff(1+sum(m=1, ceil(n^(1/3)), x^(m^3)/prod(k=1, m, 1-x^(k^3)+x*O(x^n))), n)} /* Paul D. Hanna, Mar 09 2012 */
    
  • Python
    from functools import lru_cache
    from sympy import integer_nthroot, divisors
    @lru_cache(maxsize=None)
    def A003108(n):
        @lru_cache(maxsize=None)
        def a(n): return integer_nthroot(n,3)[1]
        @lru_cache(maxsize=None)
        def c(n): return sum(d for d in divisors(n,generator=True) if a(d))
        return (c(n)+sum(c(k)*A003108(n-k) for k in range(1,n)))//n if n else 1 # Chai Wah Wu, Jul 15 2024

Formula

G.f.: 1/Product_{j>=1} (1-x^(j^3)). - Emeric Deutsch, Mar 30 2006
G.f.: Sum_{n>=0} x^(n^3) / Product_{k=1..n} (1 - x^(k^3)). - Paul D. Hanna, Mar 09 2012
a(n) ~ exp(4 * (Gamma(1/3)*Zeta(4/3))^(3/4) * n^(1/4) / 3^(3/2)) * (Gamma(1/3)*Zeta(4/3))^(3/4) / (24*Pi^2*n^(5/4)) [Hardy & Ramanujan, 1917]. - Vaclav Kotesovec, Dec 29 2016