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.

Showing 1-6 of 6 results.

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

A218494 Number of partitions of n^3 into squares.

Original entry on oeis.org

1, 1, 3, 21, 220, 2846, 41621, 670568, 11570877, 210605770, 3998468431, 78556582448, 1587757499592, 32866068149376, 694307793698105, 14927522659021682, 325895131806047690, 7211436102222542901, 161493494674514291108, 3655277488432342084426
Offset: 0

Views

Author

Reinhard Zumkeller, Oct 31 2012

Keywords

Examples

			n=2: number of partitions of 8 into parts of {1, 4}:
a(2) = #{4+4, 4+1+1+1+1, 8x1} = 3;
n=3: number of partitions of 27 into parts of  {1, 4, 9, 16, 25}:
a(3) = #{25+1+1, 16+9+1+1, 16+4+4+1, 16+4+5x1, 16+9x1, 9+9+9, 9+9+4+4+1, 9+9+4+5x1, 9+9+9x1, 9+4x4+1+1, 9+3x4+6x1, 9+4+4+10x1, 9+4+14x1, 9+18x1, 6x4+3x1, 5x4+7x1, 4x4+11x1, 3x4+15x1, 4+4+19x1, 4+23x1, 27x1} = 21.
		

Crossrefs

Programs

  • Haskell
    a218494 = p (tail a000290_list) . (^ 3) where
       p _          0 = 1
       p ks'@(k:ks) m = if m < k then 0 else p ks' (m - k) + p ks m
  • Maple
    b:= proc(n, i) option remember; `if`(n=0 or i=1, 1,
           b(n, i-1)+`if`(i^2>n, 0, b(n-i^2, i)))
        end:
    a:= n-> b(n^3, isqrt(n^3)):
    seq(a(n), n=0..20);  # Alois P. Heinz, Nov 08 2012
  • Mathematica
    b[n_, i_] := b[n, i] = If[n == 0 || i == 1, 1, b[n, i-1] + If[i^2>n, 0, b[n - i^2, i]]]; a[n_] := b[n^3, Sqrt[n^3] // Floor]; Table[a[n], {n, 0, 20}] (* Jean-François Alcover, Nov 11 2015, after Alois P. Heinz *)

Formula

a(n) = A001156(A000578(n)).
a(n) ~ 3^(-1/2) * (4*Pi)^(-7/6) * Zeta(3/2)^(2/3) * n^(-7/2) * exp(2^(-4/3) * 3 * Pi^(1/3) * Zeta(3/2)^(2/3) * n) [after Hardy & Ramanujan]. - Vaclav Kotesovec, Apr 10 2017
a(n) = [x^(n^3)] Product_{k>=1} 1/(1 - x^(k^2)). - Ilya Gutkovskiy, Jan 29 2018

Extensions

Extended beyond a(7) by Alois P. Heinz, Nov 08 2012

A298934 Number of partitions of n^2 into distinct cubes.

Original entry on oeis.org

1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 2, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 3, 1, 0, 0, 0, 0, 0, 0, 3, 3, 1, 0, 3, 0, 2, 4, 0, 0, 1, 0, 0, 2, 3, 1, 1, 0, 6, 3, 6, 1, 6, 0, 3, 9, 0, 6, 6, 7, 0, 10, 3, 3, 6, 0, 8, 6, 13, 2, 10, 9, 10, 19, 2, 14, 21, 7, 2, 25
Offset: 0

Views

Author

Ilya Gutkovskiy, Jan 29 2018

Keywords

Examples

			a(15) = 2 because we have [216, 8, 1] and [125, 64, 27, 8, 1].
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, 1,
          `if`(n>i^2*(i+1)^2/4, 0, b(n, i-1)+
          `if`(i^3>n, 0, b(n-i^3, i-1))))
        end:
    a:= n-> b(n^2, n):
    seq(a(n), n=0..100);  # Alois P. Heinz, Jan 29 2018
  • Mathematica
    Table[SeriesCoefficient[Product[1 + x^k^3, {k, 1, Floor[n^(2/3) + 1]}], {x, 0, n^2}], {n, 0, 84}]

Formula

a(n) = [x^(n^2)] Product_{k>=1} (1 + x^(k^3)).
a(n) = A279329(A000290(n)).

A298936 Number of ordered ways of writing n^2 as a sum of n nonnegative cubes.

Original entry on oeis.org

1, 1, 0, 6, 6, 20, 120, 7, 1689, 6636, 36540, 64020, 963996, 2894892, 19555965, 176079995, 955611188, 6684303780, 42462792168, 292378003753, 1886275214112, 13384059605364, 87399249887334, 624073002367892, 5080120229014734, 37587589611771480
Offset: 0

Views

Author

Ilya Gutkovskiy, Jan 29 2018

Keywords

Examples

			a(3) = 6 because we have [8, 1, 0], [8, 0, 1], [1, 8, 0], [1, 0, 8], [0, 8, 1] and [0, 1, 8].
		

Crossrefs

Programs

  • Maple
    f:= n -> coeff(add(x^(k^3),k=0..floor(n^(2/3)))^n,x,n^2):
    map(f, [$0..30]); # Robert Israel, Jan 29 2018
  • Mathematica
    Table[SeriesCoefficient[Sum[x^k^3, {k, 0, Floor[n^(2/3) + 1]}]^n, {x, 0, n^2}], {n, 0, 25}]

Formula

a(n) = [x^(n^2)] (Sum_{k>=0} x^(k^3))^n.

A298937 Number of ordered ways of writing n^2 as a sum of n positive cubes.

Original entry on oeis.org

1, 1, 0, 0, 0, 0, 0, 7, 1, 0, 0, 9240, 34650, 1716, 48477, 551915, 6726720, 89973520, 102639744, 1824625081, 9915389400, 30143458884, 278196062760, 1995766236541, 6611689457736, 64547920386450, 236756174748626, 2315743488707806
Offset: 0

Views

Author

Ilya Gutkovskiy, Jan 29 2018

Keywords

Examples

			a(7) = 7 because we have [8, 8, 8, 8, 8, 8, 1], [8, 8, 8, 8, 8, 1, 8], [8, 8, 8, 8, 1, 8, 8], [8, 8, 8, 1, 8, 8, 8], [8, 8, 1, 8, 8, 8, 8], [8, 1, 8, 8, 8, 8, 8] and [1, 8, 8, 8, 8, 8, 8].
		

Crossrefs

Programs

  • Mathematica
    Join[{1}, Table[SeriesCoefficient[Sum[x^k^3, {k, 1, Floor[n^(2/3) + 1]}]^n, {x, 0, n^2}], {n, 1, 27}]]

Formula

a(n) = [x^(n^2)] (Sum_{k>=1} x^(k^3))^n.

A369087 Number of partitions of the square of the n-th triangular number into cubes.

Original entry on oeis.org

1, 1, 2, 7, 39, 289, 2514, 24625, 262768, 2998410, 36104634, 454307830, 5930683832, 79871973688, 1104858227039, 15642564963293, 226021630964469, 3325082850102429, 49705611691011214, 753760884548732440, 11578963116012317128, 179963257865062829685, 2826949471456067702388, 44840817231090333901577
Offset: 0

Views

Author

Paul D. Hanna, Jan 23 2024

Keywords

Comments

The sum of the first n cubes equals the square of the n-th triangular number: (1^3 + 2^3 + 3^3 + ... + n^3) = (1 + 2 + 3 + ... + n)^2 = (n*(n+1)/2)^2.

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0 or i=1, 1,
          b(n, i-1) +`if`(i^3>n, 0, b(n-i^3, i)))
        end:
    a:= n-> (t-> b(t, iroot(t, 3)))((n*(n+1)/2)^2):
    seq(a(n), n=0..23);  # Alois P. Heinz, Jan 24 2024
  • Mathematica
    Table[SeriesCoefficient[Product[1/(1 - x^(k^3)), {k, 1, (n*(n + 1)/2)^(2/3) + 1}], {x, 0, (n*(n + 1)/2)^2}], {n, 0, 20}] (* Vaclav Kotesovec, Jan 24 2024 *)
  • PARI
    {a(n) = my(M=(n*(n+1)/2)^2); polcoeff(1/prod(k=1, ceil(M^(1/3)), 1-x^(k^3)+x*O(x^M)), M)}
    for(n=0,30, print1(a(n),", "))

Formula

a(n) equals the coefficient of x^A000537(n) in Product_{k>=1} 1/(1 - x^(k^3)) for n >= 0, where A000537(n) = (n*(n+1)/2)^2.
a(n) = A003108(A000537(n)) for n >= 0.
Limit a(n)^(1/n) = exp( (Gamma(1/3) * Zeta(4/3))^(3/4) * (2/3)^(3/2) ) = 19.6784468967446... - see formula by Vaclav Kotesovec in A003108.
a(n) ~ (Gamma(1/3)*zeta(4/3))^(3/4) * exp(sqrt(2) * 3^(-3/2) * (Gamma(1/3)*zeta(4/3))^(3/4) * (2*n+1)) / (3 * sqrt(2) * Pi^2 * n^5). - Vaclav Kotesovec, Jan 25 2024
Showing 1-6 of 6 results.