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

A102712 Sum of largest parts of all compositions of n.

Original entry on oeis.org

1, 3, 8, 19, 43, 94, 202, 428, 899, 1875, 3890, 8036, 16544, 33962, 69552, 142149, 290017, 590814, 1202016, 2442706, 4958974, 10058216, 20384498, 41282346, 83549603, 168992081, 341627732, 690279026, 1394115072, 2814430326, 5679552630, 11457287926, 23104929222
Offset: 1

Views

Author

Vladeta Jovovic, Feb 05 2005

Keywords

Examples

			a(4) = 19 because we have (4), (3)1, 1(3), (2)2, (2)11, 1(2)1, 11(2) and (1)111; the largest parts, shown between parentheses, add up to 19.
		

Crossrefs

Column k=1 of A322428.

Programs

  • Maple
    G:=sum(n*(1-x)^2*x^n/((1-2*x+x^n)*(1-2*x+x^(n+1))),n=1..45): Gser:=series(G,x=0,40): seq(coeff(Gser,x^n),n=1..36); # Emeric Deutsch, Mar 29 2005
    # second Maple program:
    b:= proc(n, m, t) option remember;
          `if`(m=1, 1,
          `if`(n add(m*b(n, m, false), m=1..n):
    seq(a(n), n=1..40);  # Alois P. Heinz, Oct 21 2011
  • Mathematica
    nn=33;f[list_]:=Sum[list[[i]]i,{i,1,Length[list]}];Drop[Map[f,Transpose[Table[CoefficientList[Series[1/(1-(x-x^(k+1))/(1-x))-1/(1-(x-x^k)/(1-x)),{x,0,nn}],x],{k,1,nn}]]],1] (* Geoffrey Critzer, Apr 06 2014 *)

Formula

G.f.: Sum(n*(1-x)^2*x^n/((1-2*x+x^n)*(1-2*x+x^(n+1))), n=1..infinity).
G.f.: (1-x)/(1-2*x)*Sum(x^n/(1-2*x+x^n),n=1..infinity). - Vladeta Jovovic, Apr 28 2008

Extensions

More terms from Emeric Deutsch, Mar 29 2005

A336902 Sum of the smallest parts of all compositions of n into distinct parts.

Original entry on oeis.org

0, 1, 2, 5, 6, 11, 18, 25, 32, 53, 84, 107, 156, 205, 302, 497, 618, 863, 1206, 1597, 2228, 3569, 4440, 6191, 8256, 11329, 14642, 20477, 30390, 38555, 52578, 69625, 92696, 122141, 160500, 211955, 310476, 386941, 521102, 678617, 901386, 1155383, 1529742, 1940749
Offset: 0

Views

Author

Alois P. Heinz, Aug 07 2020

Keywords

Examples

			a(6) = 18 = 1 + 1 + 1 + 1 + 1 + 1 + 2 + 2 + 1 + 1 + 6: (1)23, (1)32, 2(1)3, 23(1), 3(1)2, 32(1), (2)4, 4(2), (1)5, 5(1), (6).
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, p) option remember; `if`(i*(i+1)/2 b(n$2, 1):
    seq(a(n), n=0..50);
  • Mathematica
    b[n_, i_, p_] := b[n, i, p] = If[i(i+1)/2 < n || i < 1, 0,
         If[i == n, i*p!, b[n-i, Min[n-i, i-1], p+1]] + b[n, i-1, p]];
    a[n_] := b[n, n, 1];
    Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Jul 12 2021, after Alois P. Heinz *)

Formula

a(n) == n (mod 2).

A336903 Sum of the largest parts of all compositions of n into distinct parts.

Original entry on oeis.org

0, 1, 2, 7, 10, 19, 42, 61, 98, 151, 304, 403, 654, 925, 1400, 2431, 3328, 4903, 7056, 10117, 13952, 23419, 30406, 44683, 61308, 87289, 116822, 164359, 247774, 327715, 457542, 624445, 855062, 1148023, 1559188, 2058643, 3043506, 3906637, 5375732, 7111975, 9679852
Offset: 0

Views

Author

Alois P. Heinz, Aug 07 2020

Keywords

Examples

			a(6) = 42 = 3 + 3 + 3 + 3 + 3 + 3 + 4 + 4 + 5 + 5 + 6: 12(3), 1(3)2, 21(3), 2(3)1, (3)12, (3)21, 2(4), (4)2, 1(5), (5)1, (6).
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, p) option remember; `if`(i*(i+1)/2 `if`(n=0, 0, b(n$2, 0)):
    seq(a(n), n=0..50);
  • Mathematica
    b[n_, i_, p_] := b[n, i, p] = If[i(i + 1)/2 < n, 0,
         If[n == 0, p!, b[n - i, Min[n - i, i - 1], p + 1]*
         If[p == 0, i, 1] + b[n, i - 1, p]]];
    a[n_] := If[n == 0, 0, b[n, n, 0]];
    Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Jul 12 2021, after Alois P. Heinz *)

Formula

a(n) == n (mod 2).

A097941 Total number of smallest parts in all compositions of n.

Original entry on oeis.org

1, 3, 6, 15, 31, 72, 155, 340, 738, 1595, 3424, 7335, 15642, 33243, 70432, 148808, 313571, 659188, 1382682, 2894369, 6047397, 12613209, 26265098, 54610722, 113387831, 235117449, 486933645, 1007290340, 2081469759, 4296789924, 8861401891, 18258651137, 37589337434
Offset: 1

Views

Author

Vladeta Jovovic, Sep 05 2004

Keywords

Crossrefs

Programs

  • Mathematica
    Drop[ CoefficientList[ Series[(1 - x)^2*Sum[x^k/(1 - x - x^k)^2, {k, 50}], {x, 0, 30}], x], 1] (* Robert G. Wilson v, Sep 08 2004 *)

Formula

G.f.: (1-x)^2 * Sum_{k>=1} x^k/(1-x-x^k)^2.
a(n) ~ n*2^(n-3). - Vaclav Kotesovec, Apr 30 2014
a(n) = Sum_{k=0..n} k * A238342(n,k). - Alois P. Heinz, Oct 15 2024

Extensions

More terms from Robert G. Wilson v, Sep 08 2004

A099238 Square array read by antidiagonals with rows generated by 1/(1-x-x^(k+1)).

Original entry on oeis.org

1, 1, 2, 1, 1, 4, 1, 1, 2, 8, 1, 1, 1, 3, 16, 1, 1, 1, 2, 5, 32, 1, 1, 1, 1, 3, 8, 64, 1, 1, 1, 1, 2, 4, 13, 128, 1, 1, 1, 1, 1, 3, 6, 21, 256, 1, 1, 1, 1, 1, 2, 4, 9, 34, 512, 1, 1, 1, 1, 1, 1, 3, 5, 13, 55, 1024, 1, 1, 1, 1, 1, 1, 2, 4, 7, 19, 89, 2048
Offset: 0

Views

Author

Paul Barry, Oct 08 2004

Keywords

Comments

Sections of rows are given by array A099233. Sums of antidiagonals yield A097939.
The triangle of diagonals terminated after reaching the repeating value is A329146. - Andrey Zabolotskiy, Sep 01 2020

Examples

			Rows begin
1,   2,   4,   8,  16,  32,  64, 128, 256, ... (A000079)
1,   1,   2,   3,   5,   8,  13,  21,  34, ... (A000045)
1,   1,   1,   2,   3,   4,   6,   9,  13, ... (A000930)
1,   1,   1,   1,   2,   3,   4,   5,   7, ... (A003269)
1,   1,   1,   1,   1,   2,   3,   4,   5, ... (A003520)
		

Formula

Square array T(n, k) = Sum_{j=0..floor(n/(k+1))} binomial(n-k*j, j), n, k>=0.

A322427 Sum T(n,k) of k-th smallest parts of all compositions of n; triangle T(n,k), n>=1, 1<=k<=n, read by rows.

Original entry on oeis.org

1, 3, 1, 6, 5, 1, 12, 12, 7, 1, 22, 28, 20, 9, 1, 42, 54, 54, 30, 11, 1, 79, 106, 115, 92, 42, 13, 1, 151, 200, 239, 218, 144, 56, 15, 1, 291, 376, 471, 486, 378, 212, 72, 17, 1, 566, 708, 904, 1014, 908, 612, 298, 90, 19, 1, 1106, 1346, 1709, 2030, 2014, 1584, 939, 404, 110, 21, 1
Offset: 1

Views

Author

Alois P. Heinz, Dec 07 2018

Keywords

Examples

			The 4 compositions of 3 are: 111, 12, 21, 3.  The sums of k-th smallest parts for k=1..3 give: 1+1+1+3 = 6, 1+2+2+0 = 5, 1+0+0+0 = 1.
Triangle T(n,k) begins:
    1;
    3,   1;
    6,   5,   1;
   12,  12,   7,    1;
   22,  28,  20,    9,   1;
   42,  54,  54,   30,  11,   1;
   79, 106, 115,   92,  42,  13,   1;
  151, 200, 239,  218, 144,  56,  15,  1;
  291, 376, 471,  486, 378, 212,  72, 17,  1;
  566, 708, 904, 1014, 908, 612, 298, 90, 19, 1;
  ...
		

Crossrefs

Column k=1 gives A097939.
Row sums give A001787.
Cf. A322428.

Programs

  • Maple
    b:= proc(n, l) option remember; `if`(n=0, add(l[i]*x^i,
          i=1..nops(l)), add(b(n-j, sort([l[], j])), j=1..n))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=1..degree(p)))(b(n, [])):
    seq(T(n), n=1..12);
  • Mathematica
    b[n_, l_] := b[n, l] = If[n == 0, Sum[l[[i]] x^i, {i, 1, Length[l]}], Sum[b[n - j, Sort[Append[l, j]]], {j, 1, n}]];
    T[n_] := Function[p, Table[Coefficient[p, x, i], {i, 1, Exponent[p, x]}]][ b[n, {}]];
    Array[T, 12] // Flatten (* Jean-François Alcover, Dec 29 2018, after Alois P. Heinz *)

A336579 Sum of prime parts, counted without multiplicity, in all compositions of n.

Original entry on oeis.org

0, 0, 2, 7, 14, 38, 83, 193, 421, 917, 1969, 4210, 8908, 18763, 39287, 81940, 170270, 352726, 728663, 1501711, 3088326, 6339424, 12991312, 26583389, 54323352, 110876435, 226057023, 460432903, 936963134, 1905110662, 3870698364, 7858803605, 15945759386
Offset: 0

Views

Author

Alois P. Heinz, Jul 26 2020

Keywords

Examples

			a(4) = 2 + 2 + 2 + 2 + 3 + 3 = 14: 1111, 11(2), 1(2)1, (2)11, (2)2, 1(3), (3)1, 4.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, p) option remember; `if`(n=0, [p!, 0],
          `if`(i<1, 0, add((p-> [0, `if`(j>0 and isprime(i),
           p[1]*i, 0)]+p)(b(n-i*j, i-1, p+j)/j!), j=0..n/i)))
        end:
    a:= n-> b(n$2, 0)[2]:
    seq(a(n), n=0..38);
  • Mathematica
    b[n_, i_, p_] := b[n, i, p] = If[n == 0, {p!, 0},
         If[i < 1, {0, 0}, Sum[Function[q, {0, If[j > 0 && PrimeQ[i],
         q[[1]]*i, 0]} + q][b[n - i*j, i - 1, p + j]/j!], {j, 0, n/i}]]];
    a[n_] := b[n, n, 0][[2]];
    Table[a[n], {n, 0, 38}] (* Jean-François Alcover, Mar 17 2022, after Alois P Heinz *)

A171682 Number of compositions of n with the smallest part in the first position.

Original entry on oeis.org

1, 2, 3, 6, 10, 20, 37, 72, 140, 275, 540, 1069, 2118, 4206, 8365, 16659, 33204, 66231, 132179, 263913, 527119, 1053113, 2104428, 4205987, 8407382, 16807410, 33603024, 67187111, 134343790, 268638648, 537198557, 1074270342, 2148336463, 4296343787, 8592156886, 17183457812, 34365534564
Offset: 1

Views

Author

Vladeta Jovovic, Dec 15 2009

Keywords

Comments

First differences of A097939.

Examples

			The a(6)=20 such compositions of 6 are
[ 1]  [ 1 1 1 1 1 1 ]
[ 2]  [ 1 1 1 1 2 ]
[ 3]  [ 1 1 1 2 1 ]
[ 4]  [ 1 1 1 3 ]
[ 5]  [ 1 1 2 1 1 ]
[ 6]  [ 1 1 2 2 ]
[ 7]  [ 1 1 3 1 ]
[ 8]  [ 1 1 4 ]
[ 9]  [ 1 2 1 1 1 ]
[10]  [ 1 2 1 2 ]
[11]  [ 1 2 2 1 ]
[12]  [ 1 2 3 ]
[13]  [ 1 3 1 1 ]
[14]  [ 1 3 2 ]
[15]  [ 1 4 1 ]
[16]  [ 1 5 ]
[17]  [ 2 2 2 ]
[18]  [ 2 4 ]
[19]  [ 3 3 ]
[20]  [ 6 ]
- _Joerg Arndt_, Jan 01 2013.
		

Crossrefs

Cf. A079500.

Programs

  • Mathematica
    nn=37;Drop[CoefficientList[Series[Sum[x^i/(1-x^i/(1-x)),{i,1,nn}],{x,0,nn}],x],1]  (* Geoffrey Critzer, Mar 12 2013 *)
  • PARI
    N=66; x='x+O('x^N);
    gf= (1-x) * sum(k=1,N, x^k/(1-x-x^k) );
    Vec(gf)
    /* Joerg Arndt, Jan 01 2013 */

Formula

G.f.: (1-x) * Sum_{k>=1} x^k/(1-x-x^k). [Joerg Arndt, Jan 01 2013]
a(n) ~ 2^(n-2). - Vaclav Kotesovec, Sep 10 2014
G.f.: Sum_{n>=1} q^n/(1-Sum_{k>=n} q^k). - Joerg Arndt, Jan 03 2024

Extensions

Added more terms, Joerg Arndt, Jan 01 2013

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

Original entry on oeis.org

1, 3, 5, 8, 12, 18, 28, 42, 65, 103, 160, 252, 404, 644, 1026, 1648, 2654, 4269, 6873, 11086, 17898, 28902, 46681, 75427, 121920, 197116, 318731, 515425, 833593, 1348316, 2181023, 3528149, 5707571, 9233632, 14938484, 24168539, 39102325, 63264687, 102358843, 165612728
Offset: 1

Views

Author

Paul D. Hanna, Jul 18 2013

Keywords

Comments

a(n) = column sums in an array with rows consisting of n' compositions into X and (X+1) parts; n'>0, X=1...inf.
1 1 2 3 5 8 13 21 34 55 89...
1 0 1 1 1 2 2 3 4 5 7
1 0 0 1 1 0 1 2 1 1 3
1 0 0 0 1 1 0 0 1 2 1
1 0 0 0 0 1 1 0 0 0 1
1 0 0 0 0 0 1 1 0 0 0
1 0 0 0 0 0 0 1 1 0 0
1 0 0 0 0 0 0 0 1 1 0
1 0 0 0 0 0 0 0 0 1 1
1 0 0 0 0 0 0 0 0 0 1...
+=1 3 5 8 12 18 28 42 65 103...
- Bob Selcoe, Feb 07 2014

Examples

			G.f.: A(x) = x + 3*x^2 + 5*x^3 + 8*x^4 + 12*x^5 + 18*x^6 + 28*x^7 + 42*x^8 +...
where
A(x) = x*(1+x)/(1-x) + x^2*(1+x)^2/(1-x^2) + x^3*(1+x)^3/(1-x^3) + x^4*(1+x)^4/(1-x^4) + x^5*(1+x)^5/(1-x^5) + x^6*(1+x)^6/(1-x^6) +...
		

Crossrefs

Cf. A097939.

Programs

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

Formula

G.f.: Sum_{n>=1} x^n * Sum_{d|n} (1+x)^d.
a(n) ~ 1/sqrt(5) * ((1+sqrt(5))/2)^(n+1). - Vaclav Kotesovec, Oct 28 2014
Showing 1-9 of 9 results.