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

A106336 Number of ways of writing n as the sum of n+1 triangular numbers, divided by n+1.

Original entry on oeis.org

1, 1, 1, 2, 5, 11, 25, 64, 169, 442, 1172, 3180, 8730, 24116, 67159, 188568, 532741, 1512695, 4315996, 12369324, 35587923, 102747636, 297601382, 864525312, 2518185362, 7353088206, 21520084301, 63115752910, 185474840912, 546042990300, 1610314638958
Offset: 0

Views

Author

Paul D. Hanna, Apr 29 2005

Keywords

Comments

Apparently: Number of Dyck n-paths with each ascent length being a triangular number. - David Scambler, May 09 2012

Examples

			G.f.: A(x) = 1 + x + x^2 + 2*x^3 + 5*x^4 + 11*x^5 + 25*x^6 + 64*x^7 +...
A(x) = F(x*A(x)) where F(x) = 1 + x + x^3 + x^6 + x^10 + x^15 + x^21 + ...
The radius of convergence equals r = 0.322627632692191133... (A106335)
at which the g.f. converges to A(r) = 1.987369721184684145... (A106334).
		

Crossrefs

Programs

  • Maple
    b:= proc(n) option remember; expand(`if`(n=0, 1,
          add(`if`(issqr(8*j+1), x*b(n-j), 0), j=1..n)))
        end:
    a:= n-> (p-> add(coeff(p, x, i)*binomial(1+n, i),
                 i=0..n)/(n+1))(b(n)):
    seq(a(n), n=0..35);  # Alois P. Heinz, Jul 31 2017
  • Mathematica
    f[x_, y_, d_] := f[x, y, d] = If[x < 0 || y < x, 0, If[x == 0 && y == 0, 1, f[x-1, y, 0] + f[x, y - If[d == 0, 1, Ceiling[Sqrt[2*d]]],If[d == 0, 1, Ceiling[Sqrt[2*d]] + d]]]]; Table[f[n, n, 0], {n, 0, 30}] (* David Scambler, May 09 2012 *)
  • PARI
    {a(n) = my(X); if(n<0,0,X=x+x*O(x^n); polcoef(eta(X^2)^(2*n+2)/eta(X)^(n+1)/(n+1),n))}
    
  • PARI
    {a(n) = if(n<0,0,polcoef( sum(k=1,(sqrtint(8*n+1)+1)\2,x^((k^2-k)/2),x*O(x^n))^(n+1)/(n+1),n))}
    
  • PARI
    {a(n) = my(A=1+x+x*O(x^n)); for(i=1,n, A=prod(m=1,n,(1+(x*A)^m)*(1-(x*A)^(2*m))));polcoef(A,n)} \\ Paul D. Hanna, Oct 23 2010
    
  • PARI
    {a(n) = my(A=1+x); for(i=1,n, A=exp(sum(m=1,n,(x*A)^m/(1+(x*A)^m+x*O(x^n))/m)));polcoef(A,n)} \\ Paul D. Hanna, Jun 01 2011

Formula

G.f.: A(x) = (1/x) * Series_Reversion( x*eta(x)/eta(x^2)^2 ).
G.f. A(x) = Sum_{n>=0} a(n)*x^n satisfies the following formulas.
(1) A(x) = F(x*A(x)) where F(x) = Sum_{n>=0} x^(n*(n+1)/2).
(2) log(A(x)) = Sum_{n>=1} A106337(n)/n*x^n.
(3) A(x) = Product_{n>=1} (1 + (x*A(x))^n)*(1 - (x*A(x))^(2*n)). - Paul D. Hanna, Oct 23 2010
(4) A(x) = exp( Sum_{n>=1} (x^n*A(x)^n/(1 + x^n*A(x)^n))/n ). - Paul D. Hanna, Jun 01 2011
From Paul D. Hanna, Jun 11 2025: (Start)
(5) A(x)^4 = Sum_{n>=0} (2*n+1) * (x*A(x))^n / (1 - (x*A(x))^(2*n+1)).
(6) A(x^2)^2 = Sum_{n>=0} (x*A(x^2)^(1/2))^n / (1 + (x*A(x^2)^(1/2))^(2*n+1)).
(End)
a(n) ~ c / (n^(3/2) * A106335^n), where c = A366174 = 0.49833479793360342260635926402850016443069428233051290201996853498... - Vaclav Kotesovec, Oct 07 2020

Extensions

Edited by Paul D. Hanna, Jun 01 2011

A298858 Number of ordered ways of writing n-th triangular number as a sum of n nonzero triangular numbers.

Original entry on oeis.org

1, 1, 0, 0, 4, 11, 86, 777, 4670, 36075, 279482, 2345201, 21247326, 197065752, 1983741228, 20769081251, 228078253168, 2604226354265, 30880251148086, 379415992755572, 4818158748326064, 63116999199457944, 851467484377802094, 11811530978240316682, 168243449082524484856
Offset: 0

Views

Author

Ilya Gutkovskiy, Jan 27 2018

Keywords

Examples

			a(4) = 4 because fourth triangular number is 10 and we have [3, 3, 3, 1], [3, 3, 1, 3], [3, 1, 3, 3] and [1, 3, 3, 3].
		

Crossrefs

Programs

  • Mathematica
    Table[SeriesCoefficient[(EllipticTheta[2, 0, Sqrt[x]]/(2 x^(1/8)) - 1)^n, {x, 0, n (n + 1)/2}], {n, 0, 24}]

Formula

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

A286180 Square array A(n,k), n>=0, k>=0, read by antidiagonals, where column k is the expansion of (Product_{j>0} (1 + x^j) * (1 - x^(2*j)))^k in powers of x.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 2, 0, 0, 1, 3, 1, 1, 0, 1, 4, 3, 2, 0, 0, 1, 5, 6, 4, 2, 0, 0, 1, 6, 10, 8, 6, 0, 1, 0, 1, 7, 15, 15, 13, 3, 3, 0, 0, 1, 8, 21, 26, 25, 12, 6, 2, 0, 0, 1, 9, 28, 42, 45, 31, 14, 9, 0, 0, 0, 1, 10, 36, 64, 77, 66, 35, 24, 3, 2, 1, 0, 1, 11, 45
Offset: 0

Views

Author

Seiichi Manyama, May 07 2017

Keywords

Comments

A(n, k) is the number of ways of writing n as the sum of k triangular numbers.

Examples

			Square array begins:
   1, 1, 1, 1,  1,  1, ...
   0, 1, 2, 3,  4,  5, ...
   0, 0, 1, 3,  6, 10, ...
   0, 1, 2, 4,  8, 15, ...
   0, 0, 2, 6, 13, 25, ...
		

Crossrefs

Main diagonal gives A106337.

Programs

  • Mathematica
    Table[Function[k, SeriesCoefficient[Product[(1 + x^i) (1 - x^(2 i)), {i, Infinity}]^k, {x, 0, n}]][j - n], {j, 0, 12}, {n, 0, j}] // Flatten (* Michael De Vlieger, May 07 2017 *)

Formula

G.f. of column k: (Product_{j>0} (1 + x^j) * (1 - x^(2*j)))^k.

A291700 Number of ways of writing n as a sum of n nonnegative cubes.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 9, 73, 361, 1321, 3961, 10297, 24025, 51481, 103081, 196521, 368425, 720937, 1589161, 4069801, 11511721, 33341353, 94142313, 253860201, 650564201, 1588228228, 3716917597, 8418378043, 18699454621, 41451042556, 93508305513, 218218347865, 530189399785
Offset: 0

Views

Author

Ilya Gutkovskiy, Aug 30 2017

Keywords

Crossrefs

Main diagonal of A290054.

Programs

  • Mathematica
    Table[SeriesCoefficient[Sum[x^k^3, {k, 0, n}]^n, {x, 0, n}], {n, 0, 34}]

Formula

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

A296045 a(n) = [x^n] Product_{k>=1} ((1 + x^(2*k-1))/(1 - x^(2*k)))^n.

Original entry on oeis.org

1, 1, 3, 13, 55, 231, 981, 4222, 18351, 80320, 353453, 1562364, 6932185, 30856541, 137725710, 616190583, 2762605791, 12408541299, 55825435656, 251523510045, 1134741006825, 5125453110196, 23175983361270, 104899547541255, 475228898015025, 2154737528486881, 9777332125043577
Offset: 0

Views

Author

Ilya Gutkovskiy, Dec 03 2017

Keywords

Crossrefs

Programs

  • Mathematica
    Table[SeriesCoefficient[Product[((1 + x^(2 k - 1))/(1 - x^(2 k)))^n, {k, 1, n}], {x, 0, n}], {n, 0, 26}]
    Table[SeriesCoefficient[Product[((1 + x^k)/(1 - x^(4 k)))^n, {k, 1, n}], {x, 0, n}], {n, 0, 26}]
    Table[SeriesCoefficient[(2 (-x)^(1/8)/EllipticTheta[2, 0, Sqrt[-x]])^n, {x, 0, n}], {n, 0, 26}]
    Table[(-1)^n * 2^n * SeriesCoefficient[1/(QPochhammer[-1, x]*QPochhammer[x^2])^n, {x, 0, n}], {n, 0, 30}] (* Vaclav Kotesovec, Oct 07 2020 *)
    (* Calculation of constants {d,c}: *) Chop[{1/r, 4/Sqrt[Pi*(77/2 - 4*s*(-r*s)^(7/8) * Derivative[0, 0, 2][EllipticTheta][2, 0, Sqrt[-r*s]])]} /. FindRoot[{s == (2*(-r*s)^(1/8))/EllipticTheta[2, 0, Sqrt[-r*s]], 7*I*r + 2*(-r*s)^(7/8)*Sqrt[r*s] * Derivative[0, 0, 1][EllipticTheta][2, 0, Sqrt[-r*s]] == 0}, {r, 1/5}, {s, 2}, WorkingPrecision -> 70]] (* Vaclav Kotesovec, Jan 17 2024 *)

Formula

a(n) = [x^n] Product_{k>=1} ((1 + x^k)/(1 - x^(4*k)))^n.
a(n) ~ c * d^n / sqrt(n), where d = 4.62579056836776492108784045382518984897... (see A192540) and c = 0.255113338880004277664416308115912337... - Vaclav Kotesovec, Dec 05 2017

A303170 Number of ordered ways of writing n as a sum of n tetrahedral numbers.

Original entry on oeis.org

1, 1, 1, 1, 5, 21, 61, 141, 309, 757, 2111, 6051, 16721, 44617, 118301, 318501, 871781, 2400741, 6596953, 18067329, 49460555, 135697395, 373271515, 1028451579, 2835353337, 7819016521, 21572619771, 59562583471, 164586609409, 455114644297, 1259191262441, 3485551053561
Offset: 0

Views

Author

Ilya Gutkovskiy, Apr 19 2018

Keywords

Crossrefs

Main diagonal of A290429.

Programs

  • Mathematica
    Table[SeriesCoefficient[Sum[x^(k (k + 1) (k + 2)/6), {k, 0, n}]^n, {x, 0, n}], {n, 0, 31}]

Formula

a(n) = [x^n] (Sum_{k>=0} x^(k*(k+1)*(k+2)/6))^n.
a(n) = A290429(n,n).

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).

A338465 Number of ways to write 2*n as an ordered sum of n nonzero triangular numbers.

Original entry on oeis.org

1, 0, 2, 0, 6, 5, 20, 42, 70, 261, 297, 1430, 1584, 7293, 9634, 35945, 60150, 176596, 366401, 886977, 2150421, 4624410, 12205074, 25065216, 67616872, 139894305, 369551925, 793214982, 2011977414, 4517758504, 10992821055, 25669627965, 60531471286, 145112506352
Offset: 0

Views

Author

Ilya Gutkovskiy, Jan 31 2021

Keywords

Comments

Also number of ways to write n as an ordered sum of n nonnegative numbers one less than a triangular number.

Crossrefs

Programs

  • Mathematica
    Table[SeriesCoefficient[(EllipticTheta[2, 0, Sqrt[x]]/(2 x^(1/8)) - 1)^n, {x, 0, 2 n}], {n, 0, 33}]

Formula

a(n) = [x^(2*n)] (theta_2(sqrt(x)) / (2 * x^(1/8)) - 1)^n, where theta_2() is the Jacobi theta function.
a(n) = [x^n] (Sum_{k>=0} x^(k*(k + 3)/2))^n.
Showing 1-8 of 8 results.