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 12 results. Next

A357136 Triangle read by rows where T(n,k) is the number of integer compositions of n with alternating sum k = 0..n. Part of the full triangle A097805.

Original entry on oeis.org

1, 0, 1, 1, 0, 1, 0, 2, 0, 1, 3, 0, 3, 0, 1, 0, 6, 0, 4, 0, 1, 10, 0, 10, 0, 5, 0, 1, 0, 20, 0, 15, 0, 6, 0, 1, 35, 0, 35, 0, 21, 0, 7, 0, 1, 0, 70, 0, 56, 0, 28, 0, 8, 0, 1, 126, 0, 126, 0, 84, 0, 36, 0, 9, 0, 1, 0, 252, 0, 210, 0, 120, 0, 45, 0, 10, 0, 1
Offset: 0

Views

Author

Gus Wiseman, Sep 30 2022

Keywords

Comments

A composition of n is a finite sequence of positive integers summing to n.
The alternating sum of a sequence (y_1,...,y_k) is Sum_i (-1)^(i-1) y_i.

Examples

			Triangle begins:
    1
    0   1
    1   0   1
    0   2   0   1
    3   0   3   0   1
    0   6   0   4   0   1
   10   0  10   0   5   0   1
    0  20   0  15   0   6   0   1
   35   0  35   0  21   0   7   0   1
    0  70   0  56   0  28   0   8   0   1
  126   0 126   0  84   0  36   0   9   0   1
    0 252   0 210   0 120   0  45   0  10   0   1
  462   0 462   0 330   0 165   0  55   0  11   0   1
    0 924   0 792   0 495   0 220   0  66   0  12   0   1
For example, row n = 5 counts the following compositions:
  .  (32)     .  (41)   .  (5)
     (122)       (113)
     (221)       (212)
     (1121)      (311)
     (2111)
     (11111)
		

Crossrefs

The full triangle counting compositions by alternating sum is A097805.
The version for partitions is A103919, full triangle A344651.
This is the right-half of even-indexed rows of A260492.
The triangle without top row and left column is A108044.
Ranking and counting compositions:
- product = sum: A335404, counted by A335405.
- sum = twice alternating sum: A348614, counted by A262977.
- length = alternating sum: A357184, counted by A357182.
- length = absolute value of alternating sum: A357185, counted by A357183.
A003242 counts anti-run compositions, ranked by A333489.
A011782 counts compositions.
A025047 counts alternating compositions, ranked by A345167.
A032020 counts strict compositions, ranked by A233564.
A124754 gives alternating sums of standard compositions.
A238279 counts compositions by sum and number of maximal runs.

Programs

  • Mathematica
    Prepend[Table[If[EvenQ[nn],Prepend[#,0],#]&[Riffle[Table[Binomial[nn,k],{k,Floor[nn/2],nn}],0]],{nn,0,10}],{1}]

A262977 a(n) = binomial(4*n-1,n).

Original entry on oeis.org

1, 3, 21, 165, 1365, 11628, 100947, 888030, 7888725, 70607460, 635745396, 5752004349, 52251400851, 476260169700, 4353548972850, 39895566894540, 366395202809685, 3371363686069236, 31074067324187580, 286845713747883300, 2651487106659130740, 24539426037817994160
Offset: 0

Views

Author

Vladimir Kruchinin, Oct 06 2015

Keywords

Comments

From Gus Wiseman, Sep 28 2022: (Start)
Also the number of integer compositions of 4n with alternating sum 2n, where the alternating sum of a sequence (y_1,...,y_k) is Sum_i (-1)^(i-1) y_i. These compositions are ranked by A348614. The a(12) = 21 compositions are:
(6,2) (1,2,5) (1,1,5,1) (1,1,1,1,4)
(2,2,4) (2,1,4,1) (1,1,2,1,3)
(3,2,3) (3,1,3,1) (1,1,3,1,2)
(4,2,2) (4,1,2,1) (1,1,4,1,1)
(5,2,1) (5,1,1,1) (2,1,1,1,3)
(2,1,2,1,2)
(2,1,3,1,1)
(3,1,1,1,2)
(3,1,2,1,1)
(4,1,1,1,1)
The following pertain to this interpretation:
- The case of partitions is A000712, reverse A006330.
- Allowing any alternating sum gives A013777 (compositions of 4n).
- A011782 counts compositions of n.
- A034871 counts compositions of 2n with alternating sum 2k.
- A097805 counts compositions by alternating (or reverse-alternating) sum.
- A103919 counts partitions by sum and alternating sum (reverse: A344612).
- A345197 counts compositions by length and alternating sum.
(End)

Crossrefs

Programs

  • Magma
    [Binomial(4*n-1,n): n in [0..20]]; // Vincenzo Librandi, Oct 06 2015
    
  • Mathematica
    Table[Binomial[4 n - 1, n], {n, 0, 40}] (* Vincenzo Librandi, Oct 06 2015 *)
  • Maxima
    B(x):=sum(binomial(4*n-1,n-1)*3/(4*n-1)*x^n,n,1,30);
    taylor(x*diff(B(x),x,1)/B(x),x,0,20);
    
  • PARI
    a(n) = binomial(4*n-1,n); \\ Michel Marcus, Oct 06 2015

Formula

G.f.: A(x)=x*B'(x)/B(x), where B(x) if g.f. of A006632.
a(n) = Sum_{k=0..n}(binomial(n-1,n-k)*binomial(3*n,k)).
a(n) = 3*A224274(n), for n > 0. - Michel Marcus, Oct 12 2015
From Peter Bala, Nov 04 2015: (Start)
The o.g.f. equals f(x)/g(x), where f(x) is the o.g.f. for A005810 and g(x) is the o.g.f. for A002293. More generally, f(x)*g(x)^k is the o.g.f. for the sequence binomial(4*n + k,n). Cf. A005810 (k = 0), A052203 (k = 1), A257633 (k = 2), A224274 (k = 3) and A004331 (k = 4). (End)
a(n) = [x^n] 1/(1 - x)^(3*n). - Ilya Gutkovskiy, Oct 03 2017
a(n) = A071919(3n-1,n+1) = A097805(4n,n+1). - Gus Wiseman, Sep 28 2022
From Peter Bala, Feb 14 2024: (Start)
a(n) = (-1)^n * binomial(-3*n, n).
a(n) = hypergeom([1 - 3*n, -n], [1], 1).
The g.f. A(x) satisfies A(x/(1 + x)^4) = 1/(1 - 3*x). (End)
a(n) = Sum_{k = 0..n} binomial(2*n+k-1, k)*binomial(2*n-k-1, n-k). - Peter Bala, Sep 16 2024
G.f.: 1/(4-3*g) where g = 1+x*g^4 is the g.f. of A002293. - Seiichi Manyama, Aug 17 2025

A357182 Number of integer compositions of n with the same length as their alternating sum.

Original entry on oeis.org

1, 1, 0, 0, 1, 3, 1, 4, 6, 20, 13, 48, 50, 175, 141, 512, 481, 1719, 1491, 5400, 4929, 17776, 15840, 57420, 52079, 188656, 169989, 617176, 559834, 2033175, 1842041, 6697744, 6085950, 22139780, 20123989, 73262232, 66697354, 242931321, 221314299, 806516560
Offset: 0

Views

Author

Gus Wiseman, Sep 28 2022

Keywords

Comments

A composition of n is a finite sequence of positive integers summing to n.
The alternating sum of a sequence (y_1,...,y_k) is Sum_i (-1)^(i-1) y_i.

Examples

			The a(1) = 1 through a(8) = 6 compositions:
  (1)  (31)  (113)  (42)  (124)  (53)
             (212)        (223)  (1151)
             (311)        (322)  (2141)
                          (421)  (3131)
                                 (4121)
                                 (5111)
		

Crossrefs

For product instead of length we have A114220.
For sum equal to twice alternating sum we have A262977, ranked by A348614.
For product equal to sum we have A335405, ranked by A335404.
For absolute value we have A357183.
These compositions are ranked by A357184.
The case of partitions is A357189.
A003242 counts anti-run compositions, ranked by A333489.
A011782 counts compositions.
A025047 counts alternating compositions, ranked by A345167.
A124754 gives alternating sums of standard compositions.
A238279 counts compositions by sum and number of maximal runs.
A261983 counts non-anti-run compositions.
A357136 counts compositions by alternating sum.

Programs

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

Extensions

a(21)-a(39) from Alois P. Heinz, Sep 29 2022

A357184 Numbers k such that the k-th composition in standard order has the same length as its alternating sum.

Original entry on oeis.org

0, 1, 9, 19, 22, 28, 34, 69, 74, 84, 104, 132, 135, 141, 153, 177, 225, 265, 271, 274, 283, 286, 292, 307, 310, 316, 328, 355, 358, 364, 376, 400, 451, 454, 460, 472, 496, 520, 523, 526, 533, 538, 553, 562, 593, 610, 673, 706, 833, 898, 1041, 1047, 1053, 1058
Offset: 1

Views

Author

Gus Wiseman, Sep 28 2022

Keywords

Comments

A composition of n is a finite sequence of positive integers summing to n. 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 alternating sum of a sequence (y_1,...,y_k) is Sum_i (-1)^(i-1) y_i.

Examples

			The sequence together with the corresponding compositions begins:
    0: ()
    1: (1)
    9: (3,1)
   19: (3,1,1)
   22: (2,1,2)
   28: (1,1,3)
   34: (4,2)
   69: (4,2,1)
   74: (3,2,2)
   84: (2,2,3)
  104: (1,2,4)
  132: (5,3)
  135: (5,1,1,1)
  141: (4,1,2,1)
  153: (3,1,3,1)
  177: (2,1,4,1)
  225: (1,1,5,1)
		

Crossrefs

See link for sequences related to standard compositions.
For product equal to sum we have A335404, counted by A335405.
For sum equal to twice alternating sum we have A348614, counted by A262977.
These compositions are counted by A357182.
For absolute value we have A357184, counted by A357183.
The case of partitions is counted by A357189.
A003242 counts anti-run compositions, ranked by A333489.
A011782 counts compositions.
A025047 counts alternating compositions, ranked by A345167.
A032020 counts strict compositions, ranked by A233564.
A124754 gives alternating sums of standard compositions.
A238279 counts compositions by sum and number of maximal runs.
A357136 counts compositions by alternating sum.

Programs

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

A357183 Number of integer compositions with the same length as the absolute value of their alternating sum.

Original entry on oeis.org

1, 1, 0, 0, 2, 3, 2, 5, 12, 22, 26, 58, 100, 203, 282, 616, 962, 2045, 2982, 6518, 9858, 21416, 31680, 69623, 104158, 228930, 339978, 751430, 1119668, 2478787, 3684082, 8182469, 12171900, 27082870, 40247978, 89748642, 133394708, 297933185, 442628598, 990210110
Offset: 0

Views

Author

Gus Wiseman, Sep 28 2022

Keywords

Comments

A composition of n is a finite sequence of positive integers summing to n.
The alternating sum of a sequence (y_1,...,y_k) is Sum_i (-1)^(i-1) y_i.

Examples

			The a(1) = 1 through a(8) = 12 compositions:
  (1)  (13)  (113)  (24)  (124)  (35)
       (31)  (212)  (42)  (151)  (53)
             (311)        (223)  (1115)
                          (322)  (1151)
                          (421)  (1214)
                                 (1313)
                                 (1412)
                                 (1511)
                                 (2141)
                                 (3131)
                                 (4121)
                                 (5111)
		

Crossrefs

For product instead of length we have A114220.
For sum equal to twice alternating sum we have A262977, ranked by A348614.
For product equal to sum we have A335405, ranked by A335404.
This is the absolute value version of A357182.
These compositions are ranked by A357185.
The case of partitions is A357189.
A003242 counts anti-run compositions, ranked by A333489.
A011782 counts compositions.
A025047 counts alternating compositions, ranked by A345167.
A124754 gives alternating sums of standard compositions.
A238279 counts compositions by sum and number of maximal runs.
A261983 counts non-anti-run compositions.
A357136 counts compositions by alternating sum.

Programs

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

Extensions

a(21)-a(39) from Alois P. Heinz, Sep 29 2022

A357185 Numbers k such that the k-th composition in standard order has the same length as the absolute value of its alternating sum.

Original entry on oeis.org

0, 1, 9, 12, 19, 22, 28, 34, 40, 69, 74, 84, 97, 104, 132, 135, 141, 144, 153, 177, 195, 198, 204, 216, 225, 240, 265, 271, 274, 283, 286, 292, 307, 310, 316, 321, 328, 355, 358, 364, 376, 386, 400, 451, 454, 460, 472, 496, 520, 523, 526, 533, 538, 544, 553
Offset: 1

Views

Author

Gus Wiseman, Sep 28 2022

Keywords

Comments

A composition of n is a finite sequence of positive integers summing to n. 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 alternating sum of a sequence (y_1,...,y_k) is Sum_i (-1)^(i-1) y_i.

Examples

			The sequence together with the corresponding compositions begins:
    0: ()
    1: (1)
    9: (3,1)
   12: (1,3)
   19: (3,1,1)
   22: (2,1,2)
   28: (1,1,3)
   34: (4,2)
   40: (2,4)
   69: (4,2,1)
   74: (3,2,2)
   84: (2,2,3)
   97: (1,5,1)
  104: (1,2,4)
  132: (5,3)
  135: (5,1,1,1)
  141: (4,1,2,1)
		

Crossrefs

See link for sequences related to standard compositions.
For sum equal to twice alternating sum we have A348614, counted by A262977.
For product equal to sum we have A335404, counted by A335405.
These compositions are counted by A357183.
This is the absolute value version of A357184, counted by A357183.
A003242 counts anti-run compositions, ranked by A333489.
A011782 counts compositions.
A025047 counts alternating compositions, ranked by A345167.
A032020 counts strict compositions, ranked by A233564.
A124754 gives alternating sums of standard compositions.
A238279 counts compositions by sum and number of maximal runs.
A357136 counts compositions by alternating sum.

Programs

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

A349159 Numbers whose sum of prime indices is twice their alternating sum.

Original entry on oeis.org

1, 12, 63, 66, 112, 190, 255, 325, 408, 434, 468, 609, 805, 832, 931, 946, 1160, 1242, 1353, 1380, 1534, 1539, 1900, 2035, 2067, 2208, 2296, 2387, 2414, 2736, 3055, 3108, 3154, 3330, 3417, 3509, 3913, 4185, 4340, 4503, 4646, 4650, 4664, 4864, 5185, 5684, 5863
Offset: 1

Views

Author

Gus Wiseman, Nov 23 2021

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.
The alternating sum of a sequence (y_1,...,y_k) is Sum_i (-1)^(i-1) y_i.
The Heinz number of a partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k), so these are also Heinz numbers of partitions whose sum is twice their alternating sum.

Examples

			The terms and their prime indices begin:
     1: ()
    12: (2,1,1)
    63: (4,2,2)
    66: (5,2,1)
   112: (4,1,1,1,1)
   190: (8,3,1)
   255: (7,3,2)
   325: (6,3,3)
   408: (7,2,1,1,1)
   434: (11,4,1)
   468: (6,2,2,1,1)
   609: (10,4,2)
   805: (9,4,3)
   832: (6,1,1,1,1,1,1)
   931: (8,4,4)
   946: (14,5,1)
  1160: (10,3,1,1,1)
		

Crossrefs

These partitions are counted by A000712 up to 0's.
An ordered version is A348614, negative A349154.
The negative version is A348617.
The reverse version is A349160, counted by A006330 up to 0's.
A025047 counts alternating or wiggly compositions, complement A345192.
A027193 counts partitions with rev-alt sum > 0, ranked by A026424.
A034871, A097805, and A345197 count compositions by alternating sum.
A035363 = partitions with alt sum 0, ranked by A066207, complement A086543.
A056239 adds up prime indices, row sums of A112798, row lengths A001222.
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.
A325534 counts separable partitions, ranked by A335433.
A325535 counts inseparable partitions, ranked by A335448.
A344607 counts partitions with rev-alt sum >= 0, ranked by A344609.
A346697 adds up odd-indexed prime indices.
A346698 adds up even-indexed prime indices.

Programs

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

Formula

A056239(a(n)) = 2*A316524(a(n)).
A346697(a(n)) = 3*A346698(a(n)).

A349160 Numbers whose sum of prime indices is twice their reverse-alternating sum.

Original entry on oeis.org

1, 10, 12, 39, 63, 66, 88, 112, 115, 190, 228, 255, 259, 306, 325, 408, 434, 468, 517, 544, 609, 620, 783, 793, 805, 832, 870, 931, 946, 1150, 1160, 1204, 1241, 1242, 1353, 1380, 1392, 1534, 1539, 1656, 1691, 1722, 1845, 1900, 2035, 2067, 2208, 2296, 2369
Offset: 1

Views

Author

Gus Wiseman, Nov 25 2021

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.
The reverse-alternating sum of a sequence (y_1,...,y_k) is Sum_i (-1)^(k-i) y_i.
The Heinz number of a partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k), so these are also Heinz numbers of partitions whose sum is twice their reverse-alternating sum.

Examples

			The terms and their prime indices begin:
     1: ()
    10: (3,1)
    12: (2,1,1)
    39: (6,2)
    63: (4,2,2)
    66: (5,2,1)
    88: (5,1,1,1)
   112: (4,1,1,1,1)
   115: (9,3)
   190: (8,3,1)
   228: (8,2,1,1)
   255: (7,3,2)
   259: (12,4)
   306: (7,2,2,1)
   325: (6,3,3)
   408: (7,2,1,1,1)
   434: (11,4,1)
   468: (6,2,2,1,1)
		

Crossrefs

These partitions are counted by A006330 up to 0's.
The negative reverse version is A348617.
An ordered version is A349153, non-reverse A348614.
The non-reverse version is A349159.
A027193 counts partitions with rev-alt sum > 0, ranked by A026424.
A034871, A097805, A345197 count compositions by alternating sum.
A056239 adds up prime indices, row sums of A112798, row lengths A001222.
A103919 counts partitions by alternating sum, reverse A344612.
A325534 counts separable partitions, ranked by A335433.
A325535 counts inseparable partitions, ranked by A335448.
A346697 adds up odd-indexed prime indices.
A346698 adds up even-indexed prime indices.

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],Total[primeMS[#]]==2*sats[primeMS[#]]&]

Formula

A056239(a(n)) = 2*A344616(a(n)).
A346700(a(n)) = 3*A346699(a(n)).

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

Original entry on oeis.org

0, 9, 130, 135, 141, 153, 177, 193, 225, 2052, 2059, 2062, 2069, 2074, 2079, 2089, 2098, 2103, 2109, 2129, 2146, 2151, 2157, 2169, 2209, 2242, 2247, 2253, 2265, 2289, 2369, 2434, 2439, 2445, 2457, 2481, 2529, 2561, 2689, 2818, 2823, 2829, 2841, 2865, 2913
Offset: 1

Views

Author

Gus Wiseman, Nov 22 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: ()
     9: (3,1)
   130: (6,2)
   135: (5,1,1,1)
   141: (4,1,2,1)
   153: (3,1,3,1)
   177: (2,1,4,1)
   193: (1,6,1)
   225: (1,1,5,1)
  2052: (9,3)
  2059: (8,2,1,1)
  2062: (8,1,1,2)
  2069: (7,2,2,1)
  2074: (7,1,2,2)
  2079: (7,1,1,1,1,1)
  2089: (6,2,3,1)
  2098: (6,1,3,2)
  2103: (6,1,2,1,1,1)
		

Crossrefs

These compositions are counted by A224274 up to 0's.
An unordered version is A348617, counted by A001523 up to 0's.
The positive version is A349153, unreversed A348614.
The unreversed version is A349154.
Positive unordered unreversed: A349159, counted by A000712 up to 0's.
A positive 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[#]]&]

A348617 Numbers whose sum of prime indices is twice their negated alternating sum.

Original entry on oeis.org

1, 10, 39, 88, 115, 228, 259, 306, 517, 544, 620, 783, 793, 870, 1150, 1204, 1241, 1392, 1656, 1691, 1722, 1845, 2369, 2590, 2596, 2775, 2944, 3038, 3277, 3280, 3339, 3498, 3692, 3996, 4247, 4440, 4935, 5022, 5170, 5226, 5587, 5644, 5875, 5936, 6200, 6321
Offset: 1

Views

Author

Gus Wiseman, Nov 26 2021

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.
The alternating sum of a sequence (y_1,...,y_k) is Sum_i (-1)^(i-1) y_i.
The Heinz number of a partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k), so these are also Heinz numbers of partitions whose sum is twice their negated alternating sum.

Examples

			The terms and their prime indices begin:
     1: ()
    10: (3,1)
    39: (6,2)
    88: (5,1,1,1)
   115: (9,3)
   228: (8,2,1,1)
   259: (12,4)
   306: (7,2,2,1)
   517: (15,5)
   544: (7,1,1,1,1,1)
   620: (11,3,1,1)
   783: (10,2,2,2)
   793: (18,6)
   870: (10,3,2,1)
  1150: (9,3,3,1)
  1204: (14,4,1,1)
  1241: (21,7)
  1392: (10,2,1,1,1,1)
  1656: (9,2,2,1,1,1)
  1691: (24,8)
		

Crossrefs

These partitions are counted by A001523 up to 0's.
An ordered version is A349154, nonnegative A348614, reverse A349155.
The nonnegative version is A349159, counted by A000712 up to 0's.
The reverse nonnegative version is A349160, counted by A006330 up to 0's.
A027193 counts partitions with rev-alt sum > 0, ranked by A026424.
A034871, A097805, A345197 count compositions by alternating sum.
A035363 = partitions with alt sum 0, ranked by A066207, complement A086543.
A056239 adds up prime indices, row sums of A112798, row lengths A001222.
A103919 counts partitions by alternating sum, reverse A344612.
A344607 counts partitions with rev-alt sum >= 0, ranked by A344609.
A346697 adds up odd-indexed prime indices.
A346698 adds up even-indexed prime indices.

Programs

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

Formula

A056239(a(n)) = -2*A316524(a(n)).
A346698(a(n)) = 3*A346697(a(n)).
Showing 1-10 of 12 results. Next