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.

Previous Showing 21-30 of 31 results. Next

A349153 Numbers k such that the k-th composition in standard order has sum equal to twice its reverse-alternating sum.

Original entry on oeis.org

0, 11, 12, 14, 133, 138, 143, 148, 155, 158, 160, 168, 179, 182, 188, 195, 198, 204, 208, 216, 227, 230, 236, 240, 248, 2057, 2066, 2071, 2077, 2084, 2091, 2094, 2101, 2106, 2111, 2120, 2131, 2134, 2140, 2149, 2154, 2159, 2164, 2171, 2174, 2192, 2211, 2214
Offset: 1

Views

Author

Gus Wiseman, Nov 17 2021

Keywords

Comments

The k-th composition in standard order (graded reverse-lexicographic, A066099) is obtained by taking the set of positions of 1's in the reversed binary expansion of k, prepending 0, taking first differences, and reversing again. This gives a bijective correspondence between nonnegative integers and integer compositions.
The reverse-alternating sum of a sequence (y_1,...,y_k) is Sum_i (-1)^(k-i) y_i.

Examples

			The terms and corresponding compositions begin:
    0: ()
   11: (2,1,1)
   12: (1,3)
   14: (1,1,2)
  133: (5,2,1)
  138: (4,2,2)
  143: (4,1,1,1,1)
  148: (3,2,3)
  155: (3,1,2,1,1)
  158: (3,1,1,1,2)
  160: (2,6)
  168: (2,2,4)
  179: (2,1,3,1,1)
  182: (2,1,2,1,2)
  188: (2,1,1,1,3)
		

Crossrefs

These compositions are counted by A262977 up to 0's.
Except for 0, a subset of A345917.
The unreversed version is A348614.
The unreversed negative version is A349154.
The negative version is A349155.
A non-reverse unordered version is A349159, counted by A000712 up to 0's.
An unordered version is A349160, counted by A006330 up to 0's.
A003242 counts Carlitz compositions.
A011782 counts compositions.
A025047 counts alternating or wiggly compositions, complement A345192.
A034871, A097805, and A345197 count compositions by alternating sum.
A103919 counts partitions by alternating sum, reverse A344612.
A116406 counts compositions with alternating sum >=0, ranked by A345913.
A138364 counts compositions with alternating sum 0, ranked by A344619.
Statistics of standard compositions:
- The compositions themselves are the rows of A066099.
- Number of parts is given by A000120, distinct A334028.
- Sum and product of parts are given by A070939 and A124758.
- Maximum and minimum parts are given by A333766 and A333768.
- Heinz number is given by A333219.
Classes of standard compositions:
- Partitions and strict partitions are ranked by A114994 and A333256.
- Multisets and sets are ranked by A225620 and A333255.
- Strict and constant compositions are ranked by A233564 and A272919.
- Carlitz compositions are ranked by A333489, complement A348612.
- Alternating compositions are ranked by A345167, complement A345168.

Programs

  • Mathematica
    stc[n_]:=Differences[ Prepend[Join@@Position[ Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    sats[y_]:=Sum[(-1)^(i-Length[y])*y[[i]],{i,Length[y]}];
    Select[Range[0,1000],Total[stc[#]]==2*sats[stc[#]]&]

A357847 Number of integer compositions of n whose length is twice their alternating sum.

Original entry on oeis.org

1, 0, 0, 1, 0, 1, 3, 1, 8, 11, 15, 46, 59, 127, 259, 407, 888, 1591, 2925, 5896, 10607, 20582, 39446, 73448, 142691, 269777, 513721, 988638, 1876107, 3600313, 6893509, 13165219, 25288200, 48408011, 92824505, 178248758, 341801149, 656641084, 1261298356
Offset: 0

Views

Author

Gus Wiseman, Oct 16 2022

Keywords

Comments

The alternating sum of a sequence (y_1,...,y_k) is Sum_i (-1)^(i-1) y_i.

Examples

			The a(0) = 1 through a(9) = 15 compositions:
  ()  .  .  (21)  .  (32)  (1131)  (43)  (1142)  (54)
                           (2121)        (1241)  (111141)
                           (3111)        (2132)  (112131)
                                         (2231)  (113121)
                                         (3122)  (114111)
                                         (3221)  (211131)
                                         (4112)  (212121)
                                         (4211)  (213111)
                                                 (311121)
                                                 (312111)
                                                 (411111)
		

Crossrefs

The version for partitions is A357709, ranked by A357848.
A011782 counts compositions.
A025047 counts alternating compositions.
A103919 counts partitions by alternating sum, full triangle A344651.
A357136 counts compositions by alternating sum, full triangle A097805.
A357182 counts compositions w/ length = alternating sum, ranked by A357184.
A357189 counts partitions w/ length = alternating sum, ranked by A357486.

Programs

  • Mathematica
    ats[y_]:=Sum[(-1)^(i-1)*y[[i]],{i,Length[y]}];
    Table[Length[Select[Join @@ Permutations/@IntegerPartitions[n],Length[#]==2ats[#]&]],{n,0,10}]

Extensions

a(21)-a(38) from Alois P. Heinz, Oct 19 2022

A371814 a(n) = Sum_{k=0..n} (-1)^k * binomial(4*n-k-1,n-k).

Original entry on oeis.org

1, 2, 16, 128, 1068, 9142, 79612, 701864, 6244892, 55962920, 504375396, 4567003520, 41513817444, 378596616452, 3462411408136, 31742042431048, 291616814436124, 2684123914512280, 24746511514749280, 228491677484832896, 2112549277665243328
Offset: 0

Views

Author

Seiichi Manyama, Apr 06 2024

Keywords

Crossrefs

Programs

  • PARI
    a(n) = sum(k=0, n, (-1)^k*binomial(4*n-k-1, n-k));

Formula

a(n) = [x^n] 1/((1+x) * (1-x)^(3*n)).
a(n) = binomial(4*n-1, n)*hypergeom([1, -n], [1-4*n], -1). - Stefano Spezia, Apr 07 2024
From Vaclav Kotesovec, Apr 07 2024: (Start)
Recurrence: 24*n*(3*n - 2)*(3*n - 1)*(415*n^3 - 1898*n^2 + 2871*n - 1436)*a(n) = (838715*n^6 - 5099533*n^5 + 12225995*n^4 - 14652035*n^3 + 9157250*n^2 - 2799192*n + 322560)*a(n-1) + 8*(2*n - 3)*(4*n - 7)*(4*n - 5)*(415*n^3 - 653*n^2 + 320*n - 48)*a(n-2).
a(n) ~ 2^(8*n + 1/2) / (5 * sqrt(Pi*n) * 3^(3*n - 1/2)). (End)
a(n) = Sum_{k=0..n} (-2)^(n-k) * binomial(4*n,k). - Seiichi Manyama, Jul 30 2025
G.f.: g/((-1+2*g) * (4-3*g)) where g = 1+x*g^4 is the g.f. of A002293. - Seiichi Manyama, Aug 13 2025
a(n) = Sum_{k=0..n} (-1)^k * 2^(n-k) * binomial(4*n,k) * binomial(4*n-k-1,n-k). - Seiichi Manyama, Aug 15 2025
G.f.: 1/(1 - x*g^3*(-4+6*g)) where g = 1+x*g^4 is the g.f. of A002293. - Seiichi Manyama, Aug 17 2025

A387034 a(n) = Sum_{k=0..n} binomial(4*n-4,k).

Original entry on oeis.org

1, 1, 11, 93, 794, 6885, 60460, 536155, 4791323, 43081973, 389329652, 3533047572, 32174057272, 293874981603, 2691171713924, 24700051833634, 227150464141969, 2092620625940629, 19308393192688804, 178406554524801820, 1650535921328322392, 15287533448476027572
Offset: 0

Views

Author

Seiichi Manyama, Aug 13 2025

Keywords

Crossrefs

Programs

  • Magma
    [&+[Binomial(4*n-4, k): k in [0..n]]: n in [0..25]]; // Vincenzo Librandi, Sep 03 2025
  • Mathematica
    Table[Sum[Binomial[4*n-4,k], {k,0,n}], {n,0,25}] (* Vaclav Kotesovec, Aug 20 2025 *)
  • PARI
    a(n) = sum(k=0, n, binomial(4*n-4, k));
    

Formula

a(n) = [x^n] (1+x)^(4*n-4)/(1-x).
a(n) = [x^n] 1/((1-x)^(3*n-4) * (1-2*x)).
a(n) = Sum_{k=0..n} 2^k * (-1)^(n-k) * binomial(4*n-4,k) * binomial(4*n-k-5,n-k).
a(n) = Sum_{k=0..n} 2^k * binomial(4*n-k-5,n-k).
G.f.: 1/(g^3 * (2-g) * (4-3*g)) where g = 1+x*g^4 is the g.f. of A002293.
D-finite with recurrence: 128*(4*n-11)*(2*n-5)*(4*n-9)*(44*n^3-122*n^2+18*n+105)*a(n-2)-8*(3784*n^6-37684*n^5+141548*n^4-238406*n^3+145758*n^2+37290*n-51975)*a(n-1)+3*n*(3*n-5)*(3*n-7)*(44*n^3-254*n^2+394*n-79)*a(n) = 0. - Georg Fischer, Aug 17 2025
a(n) ~ 2^(8*n - 17/2) / (sqrt(Pi*n) * 3^(3*n - 9/2)). - Vaclav Kotesovec, Aug 20 2025

A387035 a(n) = Sum_{k=0..n} binomial(4*n-3,k).

Original entry on oeis.org

1, 2, 16, 130, 1093, 9402, 82160, 726206, 6474541, 58115146, 524472448, 4754293704, 43257431931, 394821713910, 3613377083248, 33146854168628, 304692552429413, 2805871076597738, 25880523571338272, 239058748663208600, 2211058130414688244, 20474163633488699944
Offset: 0

Views

Author

Seiichi Manyama, Aug 13 2025

Keywords

Crossrefs

Programs

  • Magma
    [&+[Binomial(4*n-3, k): k in [0..n]]: n in [0..25]]; // Vincenzo Librandi, Sep 03 2025
  • Mathematica
    Table[Sum[Binomial[4*n-3,k],{k,0,n}],{n,0,30}] (* Vincenzo Librandi, Sep 03 2025 *)
  • PARI
    a(n) = sum(k=0, n, binomial(4*n-3, k));
    

Formula

a(n) = [x^n] (1+x)^(4*n-3)/(1-x).
a(n) = [x^n] 1/((1-x)^(3*n-3) * (1-2*x)).
a(n) = Sum_{k=0..n} 2^k * (-1)^(n-k) * binomial(4*n-3,k) * binomial(4*n-k-4,n-k).
a(n) = Sum_{k=0..n} 2^k * binomial(4*n-k-4,n-k).
G.f.: 1/(g^2 * (2-g) * (4-3*g)) where g = 1+x*g^4 is the g.f. of A002293.
D-finite with recurrence: 128*(4*n-7)*(2*n-5)*(4*n-9)*(22*n^3-50*n^2+5*n+30)*a(n-2) -8*(1892*n^6-16004*n^5+51038*n^4-73470*n^3+39874*n^2+6165*n-9450)*a(n-1) +3*n*(3*n-4)*(3*n-5)*(22*n^3-116*n^2+171*n-47)*a(n) = 0. - Georg Fischer, Aug 17 2025

A387036 a(n) = Sum_{k=0..n} binomial(4*n-2,k).

Original entry on oeis.org

1, 3, 22, 176, 1471, 12616, 110056, 971712, 8656937, 77663192, 700614760, 6349125440, 57754842117, 527046644056, 4822774262296, 44235726874816, 406582639811581, 3743845040832376, 34529632747211560, 318931047174438720, 2949641596923575548, 27312107861301870368
Offset: 0

Views

Author

Seiichi Manyama, Aug 13 2025

Keywords

Crossrefs

Programs

  • Magma
    [&+[Binomial(4*n-2, k): k in [0..n]]: n in [0..25]]; // Vincenzo Librandi, Sep 03 2025
  • Mathematica
    Table[Sum[Binomial[4*n-2,k],{k,0,n}],{n,0,30}] (* Vincenzo Librandi, Sep 03 2025 *)
  • PARI
    a(n) = sum(k=0, n, binomial(4*n-2, k));
    

Formula

a(n) = [x^n] (1+x)^(4*n-2)/(1-x).
a(n) = [x^n] 1/((1-x)^(3*n-2) * (1-2*x)).
a(n) = Sum_{k=0..n} 2^k * (-1)^(n-k) * binomial(4*n-2,k) * binomial(4*n-k-3,n-k).
a(n) = Sum_{k=0..n} 2^k * binomial(4*n-k-3,n-k).
G.f.: 1/(g * (2-g) * (4-3*g)) where g = 1+x*g^4 is the g.f. of A002293.
D-finite with recurrence: 128*(4*n-7)*(2*n-3)*(4*n-9)*(22*n^2-17*n-15)*a(n-2) -8*(1892*n^5-11274*n^4+23326*n^3-18132*n^2+1323*n+2835)*a(n-1) +3*n*(3*n-4)*(3*n-5)*(22*n^2-61*n+24)*a(n) = 0. - Georg Fischer, Aug 17 2025

A357709 Number of integer partitions of n whose length is twice their alternating sum.

Original entry on oeis.org

1, 0, 0, 1, 0, 1, 1, 1, 2, 2, 4, 3, 6, 6, 9, 11, 13, 18, 21, 28, 32, 44, 49, 65, 76, 96, 114, 141, 170, 204, 250, 295, 361, 425, 516, 606, 734, 858, 1031, 1210, 1440, 1690, 2000, 2347, 2759, 3240, 3786, 4441, 5174, 6053, 7030, 8210, 9509, 11074, 12807, 14870
Offset: 0

Views

Author

Gus Wiseman, Oct 16 2022

Keywords

Comments

The alternating sum of a sequence (y_1,...,y_k) is Sum_i (-1)^(i-1) y_i. The alternating sum of a partition is also the number of odd conjugate parts.

Examples

			The a(1) = 0 through a(12) = 6 partitions:
  .  .  21  .  32  3111  43  3221  54      3331  65      4332
                             4211  411111  4222  422111  4431
                                           4321  521111  5322
                                           5311          5421
                                                         6411
                                                         51111111
		

Crossrefs

This is the "twice" version of A357189, ranked by A357486.
The version for compositions is A357847.
These partitions are ranked by A357848.
A000041 counts partitions, strict A000009.
A025047 counts alternating compositions.
A103919 counts partitions by alternating sum, full triangle A344651.
A357136 counts compositions by alternating sum, full triangle A097805.
A357182 counts compositions w/ length = alternating sum, ranked by A357184.

Programs

  • Mathematica
    ats[y_]:=Sum[(-1)^(i-1)*y[[i]],{i,Length[y]}];
    Table[Length[Select[IntegerPartitions[n],Length[#]==2ats[#]&]],{n,0,30}]

A357848 Heinz numbers of integer partitions whose length is twice their alternating sum.

Original entry on oeis.org

1, 6, 15, 35, 40, 77, 84, 90, 143, 189, 210, 220, 221, 224, 250, 323, 364, 437, 462, 490, 495, 504, 525, 528, 667, 748, 819, 858, 899, 988, 1029, 1040, 1134, 1147, 1155, 1188, 1210, 1320, 1326, 1375, 1400, 1408, 1517, 1564, 1683, 1690, 1763, 1904, 1938, 2021
Offset: 1

Views

Author

Gus Wiseman, Oct 16 2022

Keywords

Comments

The Heinz number of a partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k). This gives a bijective correspondence between positive integers and integer partitions.
The alternating sum of a sequence (y_1,...,y_k) is Sum_i (-1)^(i-1) y_i.

Examples

			The terms together with their prime indices begin:
     1: {}
     6: {1,2}
    15: {2,3}
    35: {3,4}
    40: {1,1,1,3}
    77: {4,5}
    84: {1,1,2,4}
    90: {1,2,2,3}
   143: {5,6}
   189: {2,2,2,4}
   210: {1,2,3,4}
   220: {1,1,3,5}
   221: {6,7}
   224: {1,1,1,1,1,4}
		

Crossrefs

These partitions are counted by A357709.
The version for compositions is counted by A357847.
A000041 counts partitions, strict A000009.
A003963 multiplies prime indices.
A025047 counts alternating compositions.
A056239 adds up prime indices.
A103919 counts partitions by alternating sum, full triangle A344651.
A357136 counts compositions by alternating sum, full triangle A097805.
A357182 counts compositions w/ length = alternating sum, ranked by A357184.
A357189 counts partitions w/ length = alternating sum, ranked by A357486.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    sats[y_]:=Sum[(-1)^(i-Length[y])*y[[i]],{i,Length[y]}];
    Select[Range[1000],Length[primeMS[#]]==2sats[primeMS[#]]&]

A371817 a(n) = Sum_{k=0..floor(n/3)} (-1)^k * binomial(4*n-3*k-1,n-3*k).

Original entry on oeis.org

1, 3, 21, 164, 1353, 11508, 99808, 877425, 7790745, 69704921, 627438606, 5675535000, 51546958296, 469764721533, 4293594852225, 39341599326304, 361271345551257, 3323924166943410, 30634431485945569, 282767849049333909, 2613630939017216898
Offset: 0

Views

Author

Seiichi Manyama, Apr 06 2024

Keywords

Crossrefs

Programs

  • PARI
    a(n) = sum(k=0, n\3, (-1)^k*binomial(4*n-3*k-1, n-3*k));

Formula

a(n) = [x^n] 1/((1+x^3) * (1-x)^(3*n)).
a(n) = binomial(4*n-1, n)*hypergeom([1, (1-n)/3, (2-n)/3, -n/3], [(1-4*n)/3, (2-4*n)/3, 1-4*n/3], -1). - Stefano Spezia, Apr 07 2024

A371815 a(n) = Sum_{k=0..floor(n/2)} (-1)^k * binomial(4*n-2*k-1,n-2*k).

Original entry on oeis.org

1, 3, 20, 156, 1288, 10963, 95132, 836650, 7430956, 66501696, 598720080, 5416612336, 49201807276, 448442474938, 4099103160424, 37562606691526, 344959939645980, 3174051631201636, 29254814741949680, 270047153053464712, 2496167217049673468
Offset: 0

Views

Author

Seiichi Manyama, Apr 06 2024

Keywords

Crossrefs

Programs

  • PARI
    a(n) = sum(k=0, n\2, (-1)^k*binomial(4*n-2*k-1, n-2*k));

Formula

a(n) = [x^n] 1/((1+x^2) * (1-x)^(3*n)).
a(n) = binomial(4*n-1, n)*hypergeom([1, (1-n)/2, -n/2], [1/2-2*n, 1-2*n], -1). - Stefano Spezia, Apr 07 2024
Previous Showing 21-30 of 31 results. Next