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-3 of 3 results.

A338585 Number of partitions of the n-th triangular number into exactly n positive triangular numbers.

Original entry on oeis.org

1, 1, 0, 0, 1, 2, 3, 4, 9, 16, 29, 52, 92, 173, 307, 554, 1002, 1792, 3216, 5738, 10149, 17942, 31769, 55684, 97478, 170356, 295644, 512468, 886358, 1523779, 2614547, 4476152, 7627119, 12966642, 21988285, 37142199, 62591912, 105215149, 176266155, 294591431
Offset: 0

Views

Author

Ilya Gutkovskiy, Nov 08 2020

Keywords

Examples

			The 5th triangular number is 15 and 15 = 1 + 1 + 1 + 6 + 6 = 3 + 3 + 3 + 3 + 3, so a(5) = 2.
		

Crossrefs

Programs

  • Maple
    h:= proc(n) option remember; `if`(n<1, 0,
          `if`(issqr(8*n+1), n, h(n-1)))
        end:
    b:= proc(n, i, k) option remember; `if`(n=0, `if`(k=0, 1, 0),
          `if`(i*kn, 0, b(n, h(i-1), k)+b(n-i, h(min(n-i, i)), k-1)))
        end:
    a:= n-> (t-> b(t, h(t), n))(n*(n+1)/2):
    seq(a(n), n=0..42);  # Alois P. Heinz, Nov 10 2020
  • Mathematica
    h[n_] := h[n] = If[n < 1, 0, If[IntegerQ@Sqrt[8n+1], n, h[n-1]]];
    b[n_, i_, k_] := b[n, i, k] = If[n == 0, If[k == 0, 1, 0], If[i k < n || k > n, 0, b[n, h[i-1], k] + b[n-i, h[Min[n-i, i]], k-1]]];
    a[n_] := b[#, h[#], n]&[n(n+1)/2];
    a /@ Range[0, 42](* Jean-François Alcover, Nov 15 2020, after Alois P. Heinz *)
  • SageMath
    # Returns a list of length n, slow.
    def GeneralizedEulerTransform(n, a):
        R. = ZZ[[]]
        f = prod((1 - y*x^a(k) + O(x, y)^a(n)) for k in (1..n))
        coeffs = f.inverse().coefficients()
        coeff = lambda k: coeffs[x^a(k)*y^k] if x^a(k)*y^k in coeffs else 0
        return [coeff(k) for k in range(n)]
    def A338585List(n): return GeneralizedEulerTransform(n, lambda n: n*(n+1)/2)
    print(A338585List(12)) # Peter Luschny, Nov 12 2020

Formula

a(n) = [x^A000217(n) y^n] Product_{j>=1} 1 / (1 - y*x^A000217(j)).
a(n) = A319797(A000217(n),n).

A338778 Number of ordered ways of writing n-th tetrahedral number as a sum of n positive tetrahedral numbers.

Original entry on oeis.org

1, 1, 0, 0, 0, 20, 195, 1890, 6286, 94584, 1065120, 12345432, 194450586, 2844976135, 44569913570, 740023110855, 13144353701940, 241663182769494, 4707408836458200, 95865898167054186, 2038122531703155798, 45103282424247100962, 1037559653596650520776, 24776005985596646165127
Offset: 0

Views

Author

Ilya Gutkovskiy, Nov 08 2020

Keywords

Examples

			The 5th tetrahedral number is 35 and 35 = 1 + 4 + 10 + 10 + 10 (20 permutations), so a(5) = 20.
		

Crossrefs

Formula

a(n) = [x^A000292(n)] (Sum_{j>=1} x^A000292(j))^n.

A341773 Number of partitions of 2*n into exactly n nonzero tetrahedral numbers.

Original entry on oeis.org

1, 0, 0, 1, 0, 0, 1, 0, 0, 2, 0, 0, 2, 0, 0, 2, 0, 0, 3, 1, 0, 3, 1, 0, 3, 1, 0, 4, 2, 0, 4, 2, 0, 4, 3, 0, 5, 4, 1, 5, 4, 1, 5, 5, 1, 6, 6, 2, 6, 6, 2, 6, 7, 3, 7, 9, 4, 8, 9, 4, 8, 10, 5, 9, 12, 6, 10, 12, 7, 10, 13, 8, 12, 15, 10, 13, 16, 11, 13, 17, 12
Offset: 0

Views

Author

Ilya Gutkovskiy, Feb 19 2021

Keywords

Crossrefs

Programs

  • Mathematica
    nmax = 80; CoefficientList[Series[Product[1/(1 - x^(Binomial[k + 4, 3] - 1)), {k, 0, nmax}], {x, 0, nmax}], x]

Formula

G.f.: Product_{k>=0} 1 / (1 - x^(binomial(k+4,3)-1)).
Showing 1-3 of 3 results.