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 10 results.

A098124 Number of compositions of n in which the largest part is equal to the number of parts.

Original entry on oeis.org

1, 0, 2, 1, 3, 6, 10, 15, 30, 54, 92, 160, 282, 492, 859, 1490, 2570, 4428, 7627, 13098, 22421, 38290, 65265, 111018, 188475, 319380, 540266, 912397, 1538371, 2589858, 4353820, 7309362, 12255474, 20523307, 34328731, 57357184, 95733131, 159626049
Offset: 1

Views

Author

Vladeta Jovovic, Sep 25 2004

Keywords

Examples

			a(7)=10 because we have 223, 232, 322, 133, 313, 331, 1114, 1141, 1411 and 4111.
		

Crossrefs

Programs

  • Maple
    G:=sum(((x^(k+1)-x)^k-(x^k-x)^k)/(x-1)^k,k=1..25):Gser:=series(G,x=0,45):seq(coeff(Gser,x^n),n=1..42); # Emeric Deutsch, Apr 16 2005

Formula

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

Extensions

More terms from Emeric Deutsch, Apr 16 2005

A077227 Triangle of compositions of n into exactly k parts each no more than k.

Original entry on oeis.org

1, 0, 1, 0, 2, 1, 0, 1, 3, 1, 0, 0, 6, 4, 1, 0, 0, 7, 10, 5, 1, 0, 0, 6, 20, 15, 6, 1, 0, 0, 3, 31, 35, 21, 7, 1, 0, 0, 1, 40, 70, 56, 28, 8, 1, 0, 0, 0, 44, 121, 126, 84, 36, 9, 1, 0, 0, 0, 40, 185, 252, 210, 120, 45, 10, 1, 0, 0, 0, 31, 255, 456, 462, 330, 165, 55, 11, 1, 0, 0, 0, 20
Offset: 1

Views

Author

Henry Bottomley, Oct 29 2002

Keywords

Examples

			T(6,3)=7 since 6 can be written as 1+2+3, 1+3+2, 2+1+3, 2+2+2, 2+3+1, 3+1+2, or 3+2+1.
Triangle begins:
1;
0, 1;
0, 2, 1;
0, 1, 3, 1;
0, 0, 6, 4, 1;
0, 0, 7, 10, 5, 1;
0, 0, 6, 20, 15, 6, 1;
0, 0, 3, 31, 35, 21, 7, 1;
0, 0, 1, 40, 70, 56, 28, 8, 1;
0, 0, 0, 44, 121, 126, 84, 36, 9, 1;
0, 0, 0, 40, 185, 252, 210, 120, 45, 10, 1; ...
where column sums are k^k (A000312).
		

Crossrefs

Column sums are A000312. Row sums are A077229. Central diagonal is A000984 offset. Right hand side is right hand side of A007318. Cf. A077228.

Programs

  • PARI
    T(n,k)=polcoeff(((1-x^k)/(1-x +x*O(x^n)))^k,n-k)
    for(n=1,12,for(k=1,n,print1(T(n,k),", "));print()) \\ Paul D. Hanna, Jan 25 2013

Formula

T(n, k) = A077228(n, k) - A077228(n-1, k).
If n>=k^2, T(n, k) = 0. If k<=n<2k, T(n, k) = C(n-1, k-1).
G.f. of column k is: x^k*(1-x^k)^k/(1-x)^k for k>=1. - Paul D. Hanna, Jan 25 2013

A098131 Number of compositions of n where the smallest part is greater than or equal to the number of parts.

Original entry on oeis.org

1, 1, 1, 1, 2, 3, 4, 5, 6, 8, 11, 15, 20, 26, 33, 41, 51, 64, 81, 103, 131, 166, 209, 261, 323, 397, 486, 594, 726, 888, 1087, 1331, 1629, 1991, 2428, 2952, 3577, 4320, 5202, 6249, 7493, 8973, 10736, 12838, 15345, 18334, 21894, 26127, 31149, 37092, 44107, 52368
Offset: 0

Views

Author

Vladeta Jovovic, Sep 27 2004

Keywords

Examples

			a(7)=5 because we have 7, 4+3, 3+4, 5+2 and 2+5.
		

Crossrefs

Programs

  • Maple
    G:=sum(x^(k^2)/(1-x)^k, k=0..20): Gser:=series(G,x=0,56): seq( coeff( Gser,x^n), n=0..54);  # Emeric Deutsch
  • Mathematica
    nmax = 60; Flatten[{1, Rest[CoefficientList[Series[Sum[x^(k^2)/(1-x)^k, {k, 1, Sqrt[nmax]}], {x, 0, nmax}], x]]}] (* Vaclav Kotesovec, Nov 11 2018 *)
  • PARI
    my(N=66,x='x+O('x^N)); Vec(sum(n=1,N,x^(n*n)*(1)/(1-x)^n)) \\ Joerg Arndt, Jan 23 2024

Formula

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

Extensions

More terms from Emeric Deutsch, Mar 29 2005
Prepended a(0)=1 to match g.f., Joerg Arndt, Apr 22 2014

A098132 Number of compositions of n where the smallest part is greater than the number of parts.

Original entry on oeis.org

0, 1, 1, 1, 1, 2, 3, 4, 5, 6, 7, 9, 12, 16, 21, 27, 34, 42, 51, 62, 76, 94, 117, 146, 182, 226, 279, 342, 416, 503, 606, 729, 877, 1056, 1273, 1536, 1854, 2237, 2696, 3243, 3891, 4655, 5553, 6607, 7844, 9297, 11006, 13019, 15393, 18195, 21503, 25407, 30010
Offset: 1

Views

Author

Vladeta Jovovic, Sep 27 2004

Keywords

Examples

			a(11)=7 because we have: 11, 8+3, 3+8, 7+4, 4+7, 6+5 and 5+6.
		

Crossrefs

Programs

  • Maple
    G:=sum(x^(k^2+k)/(1-x)^k,k=0..20): Gser:=series(G,x=0,67): seq(coeff(Gser,x^n),n=1..65); # Emeric Deutsch, Mar 29 2005
  • Mathematica
    nmax = 60; Rest[CoefficientList[Series[Sum[x^(k*(k+1))/(1-x)^k, {k, 1, Sqrt[nmax] + 1}], {x, 0, nmax}], x]] (* Vaclav Kotesovec, Nov 11 2018 *)

Formula

G.f.: Sum_{n>=0} x^(n*(n+1)) / (1-x)^n.

Extensions

More terms from Emeric Deutsch, Mar 29 2005

A098125 Number of compositions of n where the largest part is less than the number of parts.

Original entry on oeis.org

0, 1, 1, 4, 8, 17, 38, 83, 174, 367, 771, 1606, 3324, 6849, 14054, 28743, 58605, 119161, 241717, 489345, 988945, 1995604, 4021710, 8095815, 16281400, 32716231, 65694106, 131833462, 264423116, 530128036, 1062424867, 2128513095
Offset: 1

Views

Author

Vladeta Jovovic, Sep 25 2004

Keywords

Examples

			a(5)=8 because we have 1112, 1121, 1211, 2111, 122, 212, 221 and 11111.
		

Crossrefs

Programs

  • Maple
    G:=sum(((x^k-x)/(x-1))^k,k=0..45): Gser:=series(G,x=0,40): seq(coeff(Gser,x^n),n=1..36); # Emeric Deutsch, Apr 16 2005

Formula

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

Extensions

More terms from Emeric Deutsch, Apr 16 2005

A262007 G.f.: Sum_{n=-oo..+oo} x^n * (1 - x^n)^n / (1 - x)^n.

Original entry on oeis.org

1, 2, 1, 8, 7, 27, 45, 102, 194, 439, 844, 1775, 3608, 7342, 14891, 30283, 61113, 123625, 249355, 502430, 1011305, 2034028, 4086860, 8206874, 16469851, 33035697, 66234208, 132746099, 265961186, 532718115, 1066778721, 2135822309, 4275459594, 8557335615, 17125445126, 34268966022, 68568212859, 137187104632
Offset: 1

Views

Author

Paul D. Hanna, Sep 21 2015

Keywords

Comments

Compare to the curious identity: Sum_{n=-oo..+oo} x^n * (1 - x^n)^n = 0.
Compare also to the g.f. of A077229, where A077229(n) equals the number of compositions of n where the largest part is <= the number of parts.

Examples

			G.f.: A(x) = x + 2*x^2 + x^3 + 8*x^4 + 7*x^5 + 27*x^6 + 45*x^7 + 102*x^8 + 194*x^9 + 439*x^10 + 844*x^11 + 1775*x^12 +...
such that A(x) = N(x) + P(x) where
N(x) = Sum_{n>=1} (-1)^n * x^(n^2-n) * (1 - x)^n / (1 - x^n)^n
P(x) = Sum_{n>=0} x^n * (1 - x^n)^n / (1 - x)^n.
Explicitly,
N(x) = -1 + x^2 - 2*x^3 + 3*x^4 - 4*x^5 + 4*x^6 - 3*x^7 + 4*x^8 - 10*x^9 + 18*x^10 - 19*x^11 + 9*x^12 + 2*x^13 + x^14 - 22*x^15 + 50*x^16 +...
P(x) = 1 + x + x^2 + 3*x^3 + 5*x^4 + 11*x^5 + 23*x^6 + 48*x^7 + 98*x^8 + 204*x^9 + 421*x^10 + 863*x^11 + 1766*x^12 + 3606*x^13 + 7341*x^14 + 14913*x^15 + 30233*x^16 +...+ A077229(n)*x^n +...
		

Crossrefs

Programs

  • PARI
    {a(n) = local(A=1);
    A = sum(k=-n-1, n+1, x^k * (1-x^k)^k / (1-x +x*O(x^n))^k); polcoeff(A, n)}
    for(n=1, 31, print1(a(n), ", "))
    
  • PARI
    {a(n) = local(A=1);
    A = sum(k=-n-1, n+1, (-1)^k * x^(k^2-k) * (1 - x)^k / (1 - x^k +x*O(x^n))^k); polcoeff(A, n)}
    for(n=1, 31, print1(a(n), ", "))

Formula

G.f.: Sum_{n=-oo..+oo} (-1)^n * x^(n^2-n) * (1 - x)^n / (1 - x^n)^n.
Limit a(n)^(1/n) = 2.
a(n) ~ 2^(n-1). - Vaclav Kotesovec, Sep 03 2017

A348125 Number of compositions of n where the largest part is larger than the number of parts.

Original entry on oeis.org

0, 1, 1, 3, 5, 9, 16, 30, 52, 91, 161, 282, 490, 851, 1471, 2535, 4361, 7483, 12800, 21845, 37210, 63258, 107329, 181775, 307341, 518821, 874492, 1471869, 2473969, 4153018, 6963137, 11661191, 19507566, 32599451, 54423609, 90772692, 151263317, 251849623
Offset: 1

Views

Author

R. J. Mathar, Oct 01 2021

Keywords

Crossrefs

Formula

a(n) + A077229(n) = 2^(n-1).

Extensions

a(22)-a(38) from Alois P. Heinz, Oct 01 2021

A386474 Number of sets of lists of [n] such that no list is longer than than the total number of lists.

Original entry on oeis.org

1, 1, 1, 7, 25, 141, 1171, 9913, 85233, 907273, 11010691, 143824341, 1988010553, 29605763773, 475664908083, 8284952367721, 153508912353121, 2997209814190353, 61485486404453443, 1326994255131585373, 30144049509450774441, 718905298680190094341, 17940822818538396541843
Offset: 0

Views

Author

John Tyler Rascoe, Jul 23 2025

Keywords

Comments

Here sets of lists are set partitions of [n] such that the elements within each block are ordered but the blocks themselves are unordered.

Examples

			a(3) = 7 counts: {(1),(2),(3)}, {(1),(2,3)}, {(1),(3,2)}, {(1,2),(3)}, {(1,3),(2)}, {(2),(3,1)}, {(2,1),(3)}.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, m, l) option remember; `if`(m>n+l, 0, `if`(n=0, 1,
          add(b(n-j, max(m, j), l+1)*(n-1)!*j/(n-j)!, j=1..n)))
        end:
    a:= n-> b(n, 0$2):
    seq(a(n), n=0..22);  # Alois P. Heinz, Jul 23 2025
  • Mathematica
    With[{m = 22}, CoefficientList[1 + Series[Sum[((x - x^(i + 1))/(1 - x))^i/i!, {i, 1, m}], {x, 0, m}], x] * Range[0, m]!] (* Amiram Eldar, Jul 24 2025 *)
  • PARI
    R_x(N) = {my(x='x+O('x^(N+1))); Vec(serlaplace(sum(i=0,N,((x-x^(i+1))/(1-x))^i/i!)))}

Formula

E.g.f.: Sum_{i>=0} ((x - x^(i+1))/(1 - x))^i / i!.

A078228 a(n) = A078227(n+1)/A078227(n).

Original entry on oeis.org

2, 2, 2, 2, 3, 7, 68, 61, 97, 1876, 53771, 5178128, 1533415117
Offset: 1

Views

Author

Amarnath Murthy, Nov 23 2002

Keywords

Crossrefs

Extensions

a(8)-a(13) from Donovan Johnson, Nov 11 2008

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

Original entry on oeis.org

1, 1, 2, 3, 7, 13, 27, 54, 111, 225, 456, 926, 1877, 3796, 7671, 15483, 31212, 62859, 126484, 254296, 510892, 1025765, 2058395, 4128578, 8277344, 16589180, 33237163, 66574351, 133318484, 266924608, 534335692, 1069492787, 2140370294, 4283071475, 8570061106
Offset: 1

Views

Author

Paul D. Hanna, Jan 26 2013

Keywords

Comments

Conjecture: a(n) is the number of compositions of n if all single instances of the part 1 are frozen ([1]). Example: The compositions enumerated by a(5) = 13 are 5; 4,[1]; 3,2; 2,3; 3,1,1; 1,3,1; 1,1,3; 2,2,[1]; 2,1,1,1; 1,2,1,1; 1,1,2,1; 1,1,1,2; 1,1,1,1,1. - Gregory L. Simay, Oct 27 2022

Examples

			G.f.: A(x) = x + x^2 + 2*x^3 + 3*x^4 + 7*x^5 + 13*x^6 + 27*x^7 + 54*x^8 + ...
where
A(x) = x + x^2*(1-x^2)/(1-x) + x^3*(1-x^3)^2/(1-x)^2 + x^4*(1-x^4)^3/(1-x)^3 + ...
or, equivalently,
A(x) = x + x^2*(1+x) + x^3*(1+x+x^2)^2 + x^4*(1+x+x^2+x^3)^3 + ...
		

Crossrefs

Programs

  • PARI
    {a(n)=polcoeff(sum(k=1,n,x^k*((1-x^k)/(1-x) +x*O(x^n))^(k-1)),n)}
    for(n=1,40,print1(a(n),", "))

Formula

Equals row sums of triangle A221833.
Showing 1-10 of 10 results.