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-10 of 34 results. Next

A282582 Number of compositions (ordered partitions) of n into tetrahedral (or triangular pyramidal) numbers (A000292).

Original entry on oeis.org

1, 1, 1, 1, 2, 3, 4, 5, 7, 10, 15, 21, 29, 40, 57, 81, 114, 159, 223, 314, 444, 625, 878, 1233, 1736, 2445, 3441, 4838, 6804, 9573, 13473, 18957, 26668, 37514, 52780, 74264, 104488, 147000, 206808, 290961, 409369, 575955, 810314, 1140029, 1603924, 2256603, 3174867, 4466763, 6284339, 8841533, 12439323
Offset: 0

Views

Author

Ilya Gutkovskiy, Feb 19 2017

Keywords

Examples

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

Crossrefs

Programs

  • Mathematica
    nmax = 50; CoefficientList[Series[1/(1 - Sum[x^(k (k + 1) (k + 2)/6), {k, 1, nmax}]), {x, 0, nmax}], x]
  • PARI
    Vec(1/(1 - sum(k=1, 50, x^(k*(k + 1)*(k + 2)/6)) + O(x^51))) \\ Indranil Ghosh, Mar 15 2017

Formula

G.f.: 1/(1 - Sum_{k>=1} x^(k*(k+1)*(k+2)/6)).

A331843 Number of compositions (ordered partitions) of n into distinct triangular numbers.

Original entry on oeis.org

1, 1, 0, 1, 2, 0, 1, 2, 0, 2, 7, 2, 0, 2, 6, 1, 4, 6, 2, 12, 24, 3, 8, 0, 8, 32, 6, 2, 13, 26, 6, 34, 36, 0, 32, 150, 3, 20, 50, 14, 54, 126, 32, 32, 12, 55, 160, 78, 122, 44, 174, 4, 72, 294, 36, 201, 896, 128, 62, 180, 176, 164, 198, 852, 110, 320, 159, 212, 414
Offset: 0

Views

Author

Ilya Gutkovskiy, Jan 29 2020

Keywords

Examples

			a(10) = 7 because we have [10], [6, 3, 1], [6, 1, 3], [3, 6, 1], [3, 1, 6], [1, 6, 3] and [1, 3, 6].
		

Crossrefs

Programs

  • Maple
    h:= proc(n) option remember; `if`(n<1, 0,
          `if`(issqr(8*n+1), 1+h(n-1), h(n-1)))
        end:
    b:= proc(n, i, p) option remember; (t->
          `if`(t*(i+2)/3n, 0, b(n-t, i-1, p+1)))))((i*(i+1)/2))
        end:
    a:= n-> b(n, h(n), 0):
    seq(a(n), n=0..73);  # Alois P. Heinz, Jan 31 2020
  • Mathematica
    h[n_] := h[n] = If[n<1, 0, If[IntegerQ @ Sqrt[8n+1], 1 + h[n-1], h[n-1]]];
    b[n_, i_, p_] := b[n, i, p] = Function[t, If[t (i + 2)/3 < n, 0, If[n == 0, p!, b[n, i-1, p] + If[t>n, 0, b[n - t, i - 1, p + 1]]]]][(i(i + 1)/2)];
    a[n_] := b[n, h[n], 0];
    a /@ Range[0, 73] (* Jean-François Alcover, Apr 27 2020, after Alois P. Heinz *)

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.

A106337 Number of ways of writing n as the sum of n triangular numbers.

Original entry on oeis.org

1, 1, 1, 4, 13, 31, 82, 253, 757, 2173, 6341, 18888, 56266, 167324, 499773, 1499059, 4503557, 13546893, 40824379, 123233868, 372472353, 1127080252, 3414310032, 10353722919, 31425764410, 95463814056, 290222666436, 882954212908, 2688037654049, 8188468874808
Offset: 0

Views

Author

Paul D. Hanna, Apr 29 2005

Keywords

Comments

Number of compositions of n into n triangular numbers with 0's allowed. a(3) = 4: [1,1,1], [0,0,3], [0,3,0], [3,0,0]. - Alois P. Heinz, Jul 31 2017
The radius of convergence is equal to A106335. - Vaclav Kotesovec, Nov 15 2017

Examples

			G106336(x) = exp(x + 1/2*x^2 + 4/3*x^3 + 13/4*x^4 + 31/5*x^5 +...).
G106336(x) = 1 + x + x^2 + 2*x^3 + 5*x^4 + 11*x^5 +...+ A106336(n)*x^n +...
G106336(x) = 1 + x*G106336(x) + (x*G106336(x))^3 + (x*G106336(x))^6 +...
		

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(n, i), i=0..n))(b(n)):
    seq(a(n), n=0..50);  # Alois P. Heinz, Jul 31 2017
  • Mathematica
    QP = QPochhammer; a[0] = 1; a[n_] := SeriesCoefficient[(QP[-1, x]*QP[x^2]/2 )^n, {x, 0, n}]; Table[a[n], {n, 0, 27}] (* Jean-François Alcover, Jun 04 2017 *)
  • PARI
    {a(n)=local(X); if(n<1,1,X=x+x*O(x^n); polcoeff(eta(X^2)^(2*n)/eta(X)^n,n))}

Formula

Log.g.f.: Sum_{n>=1} a(n)/n*x^n = log(G106336(x)), where G106336(x) is the g.f. of A106336 and satisfies: Sum_{n>=0} (x*G106336(x))^(n*(n+1)/2) = G106336(x).
a(n) = [x^n] Product_{j=1..n} (1+x^j-x^(2*j)-x^(3*j))^n. - Alois P. Heinz, Aug 01 2017

Extensions

a(0) changed to 1 by Alois P. Heinz, Jul 31 2017

A181324 G.f. 1/(1-sum(n=1,N,x^(n*(3*n-1)/2))).

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 3, 4, 5, 6, 8, 11, 16, 22, 29, 38, 50, 68, 93, 126, 169, 225, 302, 407, 550, 742, 997, 1339, 1799, 2421, 3261, 4390, 5906, 7941, 10680, 14371, 19341, 26028, 35017, 47105, 63370, 85261, 114723, 154360, 207679, 279405, 375907, 505759, 680479, 915554, 1231813
Offset: 0

Views

Author

Joerg Arndt, Jan 27 2011

Keywords

Comments

Number of compositions into positive pentagonal numbers (A000326). [Joerg Arndt, Jun 10 2011]

Crossrefs

A023361 ( g.f. 1/(1-sum(n=1,N,x^(n*(n+1)/2))) ).

Programs

  • PARI
    N=99; x='x+O('x^N);
    Vec(1/(1-sum(n=1,N,x^(n*(3*n-1)/2)))) /* show terms */

A224677 Number of compositions of n*(n+1)/2 into sums of positive triangular numbers.

Original entry on oeis.org

1, 1, 2, 7, 40, 351, 4876, 104748, 3487153, 179921982, 14387581923, 1783124902639, 342504341570010, 101962565961894431, 47044167891731682278, 33640402686770010577421, 37282664267078280296013183, 64038780633654058635677191329, 170478465430659361252118580217675
Offset: 0

Views

Author

Paul D. Hanna, Apr 14 2013

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n) option remember; local i; if n=0 then 1 else 0;
          for i while i*(i+1)/2<=n do %+b(n-i*(i+1)/2) od; %  fi
        end:
    a:= n-> b(n*(n+1)/2):
    seq(a(n), n=0..20);  # Alois P. Heinz, Feb 05 2018
  • Mathematica
    b[n_] := b[n] = If[n==0, 1, Sum[If[IntegerQ[Sqrt[8j+1]], b[n-j], 0], {j, 1, n}]];
    a[n_] := b[n(n+1)/2];
    a /@ Range[0, 20] (* Jean-François Alcover, Oct 31 2020, after Alois P. Heinz in A023361 *)
  • PARI
    {a(n)=polcoeff(1/(1-sum(r=1,n+1, x^(r*(r+1)/2)+x*O(x^(n*(n+1)/2)))), n*(n+1)/2)}
    for(n=0, 20, print1(a(n), ", "))

Formula

a(n) = A023361(n*(n+1)/2), where A023361(n) is the number of compositions of n into positive triangular numbers.
a(n) = [x^(n*(n+1)/2)] 1/(1 - Sum_{k>=1} x^(k*(k+1)/2)).

A322798 Number of compositions (ordered partitions) of n into hexagonal numbers (A000384).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 2, 3, 4, 5, 6, 7, 9, 12, 16, 22, 29, 37, 47, 60, 77, 101, 133, 174, 226, 292, 376, 486, 632, 823, 1072, 1394, 1808, 2342, 3036, 3939, 5116, 6648, 8636, 11211, 14548, 18875, 24493, 31795, 41283, 53604, 69594, 90338, 117251, 152184, 197540
Offset: 0

Views

Author

Ilya Gutkovskiy, Dec 26 2018

Keywords

Crossrefs

Programs

  • Maple
    h:= proc(n) option remember; `if`(n<1, 0, (t->
          `if`(t*(2*t-1)>n, t-1, t))(1+h(n-1)))
        end:
    a:= proc(n) option remember; `if`(n=0, 1,
          add(a(n-i*(2*i-1)), i=1..h(n)))
        end:
    seq(a(n), n=0..60);  # Alois P. Heinz, Dec 28 2018
  • Mathematica
    nmax = 50; CoefficientList[Series[1/(1 - Sum[x^(k (2 k - 1)), {k, 1, nmax}]), {x, 0, nmax}], x]

Formula

G.f.: 1/(1 - Sum_{k>=1} x^(k*(2*k-1))).

A322799 Number of compositions (ordered partitions) of n into heptagonal numbers (A000566).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 2, 3, 4, 5, 6, 7, 8, 10, 13, 17, 22, 29, 37, 46, 57, 71, 89, 112, 143, 183, 233, 295, 372, 468, 588, 741, 937, 1188, 1506, 1908, 2414, 3049, 3848, 4857, 6136, 7757, 9812, 12414, 15702, 19852, 25089, 31703, 40061, 50631, 64004, 80923, 102318
Offset: 0

Views

Author

Ilya Gutkovskiy, Dec 26 2018

Keywords

Crossrefs

Programs

  • Maple
    h:= proc(n) option remember; `if`(n<1, 0, (t->
          `if`(t*(5*t-3)/2>n, t-1, t))(1+h(n-1)))
        end:
    a:= proc(n) option remember; `if`(n=0, 1,
          add(a(n-i*(5*i-3)/2), i=1..h(n)))
        end:
    seq(a(n), n=0..60);  # Alois P. Heinz, Dec 28 2018
  • Mathematica
    nmax = 53; CoefficientList[Series[1/(1 - Sum[x^(k (5 k - 3)/2), {k, 1, nmax}]), {x, 0, nmax}], x]

Formula

G.f.: 1/(1 - Sum_{k>=1} x^(k*(5*k-3)/2)).

A322800 Number of compositions (ordered partitions) of n into octagonal numbers (A000567).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 14, 18, 23, 29, 37, 46, 56, 68, 83, 102, 126, 156, 195, 244, 304, 377, 466, 575, 709, 874, 1080, 1338, 1660, 2061, 2557, 3170, 3926, 4857, 6006, 7428, 9191, 11380, 14096, 17465, 21640, 26807, 33197, 41099
Offset: 0

Views

Author

Ilya Gutkovskiy, Dec 26 2018

Keywords

Crossrefs

Programs

  • Maple
    h:= proc(n) option remember; `if`(n<1, 0, (t->
          `if`(t*(3*t-2)>n, t-1, t))(1+h(n-1)))
        end:
    a:= proc(n) option remember; `if`(n=0, 1,
          add(a(n-i*(3*i-2)), i=1..h(n)))
        end:
    seq(a(n), n=0..60);  # Alois P. Heinz, Dec 28 2018
  • Mathematica
    nmax = 54; CoefficientList[Series[1/(1 - Sum[x^(k (3 k - 2)), {k, 1, nmax}]), {x, 0, nmax}], x]

Formula

G.f.: 1/(1 - Sum_{k>=1} x^(k*(3*k-2))).

A347730 Number of compositions (ordered partitions) of n into at most 2 triangular numbers.

Original entry on oeis.org

1, 1, 1, 1, 2, 0, 2, 2, 0, 2, 1, 2, 1, 2, 0, 1, 4, 0, 2, 0, 1, 3, 2, 0, 2, 2, 0, 2, 1, 2, 1, 4, 0, 0, 2, 0, 3, 2, 2, 2, 0, 0, 3, 2, 0, 1, 4, 0, 2, 2, 0, 4, 0, 0, 0, 3, 3, 2, 2, 0, 2, 2, 0, 0, 2, 2, 3, 2, 0, 2, 2, 0, 3, 2, 0, 0, 4, 0, 1, 2
Offset: 0

Views

Author

Ilya Gutkovskiy, Sep 11 2021

Keywords

Crossrefs

Formula

a(n) = c(n) + Sum_{k=1..n-1} c(k) * c(n-k), where c = A010054. - Wesley Ivan Hurt, Jan 06 2024
Showing 1-10 of 34 results. Next