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 11-20 of 44 results. Next

A344608 Number of integer partitions of n with reverse-alternating sum < 0.

Original entry on oeis.org

0, 0, 0, 1, 1, 3, 3, 7, 7, 14, 15, 27, 29, 49, 54, 86, 96, 146, 165, 242, 275, 392, 449, 623, 716, 973, 1123, 1498, 1732, 2274, 2635, 3411, 3955, 5059, 5871, 7427, 8620, 10801, 12536, 15572, 18065, 22267, 25821, 31602, 36617, 44533, 51560, 62338, 72105, 86716
Offset: 0

Views

Author

Gus Wiseman, May 30 2021

Keywords

Comments

The reverse-alternating sum of a partition (y_1,...,y_k) is Sum_i (-1)^(k-i) y_i.
Also the number of reversed of integer partitions of n with alternating sum < 0.
No integer partitions have alternating sum < 0, so the non-reversed version is all zeros.
Is this sequence weakly increasing? Note: a(2n + 2) = A236914(n), a(2n) = A344743(n).
A formula for the reverse-alternating sum of a partition is: (-1)^(k-1) times the number of odd parts in the conjugate partition, where k is the number of parts. So a(n) is the number of integer partitions of n of even length whose conjugate parts are not all odd. Partitions of the latter type are counted by A086543. By conjugation, a(n) is also the number of integer partitions of n of even maximum whose parts are not all odd.

Examples

			The a(3) = 1 through a(9) = 14 partitions:
  (21)  (31)  (32)    (42)    (43)      (53)      (54)
              (41)    (51)    (52)      (62)      (63)
              (2111)  (3111)  (61)      (71)      (72)
                              (2221)    (3221)    (81)
                              (3211)    (4211)    (3222)
                              (4111)    (5111)    (3321)
                              (211111)  (311111)  (4221)
                                                  (4311)
                                                  (5211)
                                                  (6111)
                                                  (222111)
                                                  (321111)
                                                  (411111)
                                                  (21111111)
		

Crossrefs

The opposite version (rev-alt sum > 0) is A027193, ranked by A026424.
The strict case (for n > 2) is A067659 (odd bisection: A344650).
The Heinz numbers of these partitions are A119899 (complement: A344609).
The bisections are A236914 (odd) and A344743 (even).
The ordered version appears to be A294175 (even bisection: A008549).
The complement is counted by A344607 (even bisection: A344611).
A000041 counts partitions of 2n with alternating sum 0, ranked by A000290.
A027187 counts partitions with alternating sum <= 0, ranked by A028260.
A103919 counts partitions by sum and alternating sum (reverse: A344612).
A120452 counts partitions with rev-alternating sum 2 (negative: A344741).
A316524 is the alternating sum of the prime indices of n (reverse: A344616).
A325534/A325535 count separable/inseparable partitions.
A344604 counts wiggly compositions with twins.
A344610 counts partitions by sum and positive reverse-alternating sum.
A344618 gives reverse-alternating sums of standard compositions.

Programs

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

A277579 Number of partitions of n for which the number of even parts is equal to the positive alternating sum of the parts.

Original entry on oeis.org

1, 0, 1, 1, 1, 2, 3, 3, 4, 6, 7, 9, 13, 15, 19, 25, 31, 38, 48, 59, 74, 90, 111, 136, 166, 201, 246, 297, 357, 431, 522, 621, 745, 892, 1063, 1263, 1503, 1780, 2109, 2491, 2941, 3463, 4077, 4783, 5616, 6576, 7689, 8981, 10486, 12207, 14209, 16516, 19178, 22231
Offset: 0

Views

Author

Emeric Deutsch and Alois P. Heinz, Oct 20 2016

Keywords

Comments

In the first Maple program (improvable) AS gives the positive alternating sum of a finite sequence s, EP gives the number of even terms of a finite sequence of positive integers.
For the specified value of n, the second Maple program lists the partitions of n counted by a(n).
Also the number of integer partitions of n with as many even parts as odd parts in the conjugate partition. - Gus Wiseman, Jul 26 2021

Examples

			a(9) = 6: [2,1,1,1,1,1,1,1], [3,2,1,1,1,1], [3,3,2,1], [4,2,2,1], [4,3,1,1], [5,4].
a(10) = 7: [1,1,1,1,1,1,1,1,1,1], [3,2,2,1,1,1], [3,3,1,1,1,1], [4,2,1,1,1,1], [4,3,2,1], [5,5], [6,4].
a(11) = 9: [2,1,1,1,1,1,1,1,1,1], [3,2,1,1,1,1,1,1], [3,3,2,1,1,1], [3,3,3,2], [4,2,2,1,1,1], [4,3,1,1,1,1], [5,2,2,2], [5,4,1,1], [6,5].
		

Crossrefs

The sign-sensitive version is A035457 (aerated version of A000009).
Comparing odd parts to odd conjugate parts gives A277103.
Comparing product of parts to product of conjugate parts gives A325039.
Comparing the rev-alt sum to that of the conjugate gives A345196.
A000041 counts partitions of 2n with alternating sum 0, ranked by A000290.
A103919 counts partitions by sum and alternating sum (reverse: A344612).
A120452 counts partitions of 2n with rev-alt sum 2 (negative: A344741).
A124754 gives alternating sums of standard compositions (reverse: A344618).
A316524 is the alternating sum of the prime indices of n (reverse: A344616).
A344610 counts partitions by sum and positive reverse-alternating sum.
A344611 counts partitions of 2n with reverse-alternating sum >= 0.

Programs

  • Maple
    with(combinat): AS := proc (s) options operator, arrow: abs(add((-1)^(i-1)*s[i], i = 1 .. nops(s))) end proc: EP := proc (s) local ct, j: ct := 0: for j to nops(s) do if `mod`(s[j], 2) = 0 then ct := ct+1 else  end if end do: ct end proc: a := proc (n) local P, c, k: P := partition(n): c := 0: for k to nops(P) do if AS(P[k]) = EP(P[k]) then c := c+1 else  end if end do: c end proc: seq(a(n), n = 0 .. 30);
    n := 8: with(combinat): AS := proc (s) options operator, arrow: abs(add((-1)^(i-1)*s[i], i = 1 .. nops(s))) end proc: EP := proc (s) local ct, j: ct := 0: for j to nops(s) do if `mod`(s[j], 2) = 0 then ct := ct+1 else  end if end do: ct end proc: P := partition(n): C := {}: for k to nops(P) do if AS(P[k]) = EP(P[k]) then C := `union`(C, {P[k]}) else  end if end do: C;
    # alternative Maple program:
    b:= proc(n, i, s, t) option remember; `if`(n=0,
          `if`(s=0, 1, 0), `if`(i<1, 0, b(n, i-1, s, t)+
          `if`(i>n, 0, b(n-i, i, s+t*i-irem(i+1, 2), -t))))
        end:
    a:= n-> b(n$2, 0, 1):
    seq(a(n), n=0..60);
  • Mathematica
    b[n_, i_, s_, t_] := b[n, i, s, t] = If[n == 0, If[s == 0, 1, 0], If[i<1, 0, b[n, i-1, s, t] + If[i>n, 0, b[n-i, i, s + t*i - Mod[i+1, 2], -t]]]]; a[n_] := b[n, n, 0, 1]; Table[a[n], {n, 0, 60}] (* Jean-François Alcover, Dec 21 2016, translated from Maple *)
    conj[y_]:=If[Length[y]==0,y,Table[Length[Select[y,#>=k&]],{k,1,Max[y]}]]; Table[Length[Select[IntegerPartitions[n],Count[#,?EvenQ]==Count[conj[#],?OddQ]&]],{n,0,15}] (* Gus Wiseman, Jul 26 2021 *)
  • Sage
    def a(n):
        AS = lambda s: abs(sum((-1)^i*t for i,t in enumerate(s)))
        EP = lambda s: sum((t+1)%2 for t in s)
        return sum(AS(p) == EP(p) for p in Partitions(n))
    print([a(n) for n in (0..30)]) # Peter Luschny, Oct 21 2016

A277103 Number of partitions of n for which the number of odd parts is equal to the positive alternating sum of the parts.

Original entry on oeis.org

1, 1, 0, 1, 3, 3, 1, 3, 10, 10, 4, 10, 27, 27, 13, 28, 69, 69, 37, 72, 161, 162, 96, 171, 361, 364, 230, 388, 768, 777, 522, 836, 1581, 1605, 1128, 1739, 3145, 3203, 2345, 3495, 6094, 6225, 4712, 6831, 11511, 11794, 9198, 13010, 21293, 21875, 17496, 24239
Offset: 0

Views

Author

Emeric Deutsch, Oct 18 2016

Keywords

Comments

It follows by conjugation that the partition statistics "alternating sum" and "number of odd parts" are equidistributed. Consequently, the self-conjugate partitions satisfy the required condition.
In the first Maple program (improvable) AS gives the positive alternating sum of a finite sequence s, OP gives the number of odd terms of a finite sequence of positive integers.
For the specified value of n, the second Maple program lists the partitions of n counted by a(n).
Number of integer partitions of n with the same number of odd parts as their conjugate. - Gus Wiseman, Jun 27 2021

Examples

			a(3) = 1 because we have [2,1]. The partitions [3] and [1,1,1] do not qualify.
a(4) = 3 because we have [3,1], [2,2], and [2,1,1]. The partitions [4] and [1,1,1,1] do not qualify.
		

Crossrefs

Comparing even parts to odd conjugate parts gives A277579.
Comparing product of parts to product of conjugate parts gives A325039.
The reverse version is A345196.
A000041 counts partitions of 2n with alternating sum 0, ranked by A000290.
A103919 counts partitions by sum and alternating sum (reverse: A344612).
A120452 counts partitions of 2n with rev-alt sum 2 (negative: A344741).
A124754 gives alternating sums of standard compositions (reverse: A344618).
A316524 is the alternating sum of the prime indices of n (reverse: A344616).
A344610 counts partitions by sum and positive reverse-alternating sum.
A344611 counts partitions of 2n with reverse-alternating sum >= 0.

Programs

  • Maple
    with(combinat): AS := proc (s) options operator, arrow: abs(add((-1)^(i-1)*s[i], i = 1 .. nops(s))) end proc: OP := proc (s) local ct, j: ct := 0: for j to nops(s) do if `mod`(s[j], 2) = 1 then ct := ct+1 else  end if end do: ct end proc: a := proc (n) local P, c, k: P := partition(n): c := 0: for k to nops(P) do if AS(P[k]) = OP(P[k]) then c := c+1 else end if end do: c end proc: seq(a(n), n = 0 .. 50);
    n := 8: with(combinat): AS := proc (s) options operator, arrow: abs(add((-1)^(i-1)*s[i], i = 1 .. nops(s))) end proc: OP := proc (s) local ct, j: ct := 0: for j to nops(s) do if `mod`(s[j], 2) = 1 then ct := ct+1 else  end if end do: ct end proc: P := partition(n): C := {}: for k to nops(P) do if AS(P[k]) = OP(P[k]) then C := `union`(C, {P[k]}) else  end if end do: C;
    # alternative Maple program:
    b:= proc(n, i, s, t) option remember; `if`(n=0,
          `if`(s=0, 1, 0), `if`(i<1, 0, b(n, i-1, s, t)+
          `if`(i>n, 0, b(n-i, i, s+t*i-irem(i, 2), -t))))
        end:
    a:= n-> b(n$2, 0, 1):
    seq(a(n), n=0..60);  # Alois P. Heinz, Oct 19 2016
  • Mathematica
    b[n_, i_, s_, t_] := b[n, i, s, t] = If[n == 0, If[s == 0, 1, 0], If[i<1, 0, b[n, i-1, s, t] + If[i>n, 0, b[n-i, i, s + t*i - Mod[i, 2], -t]]]]; a[n_] := b[n, n, 0, 1]; Table[a[n], {n, 0, 60}] (* Jean-François Alcover, Dec 21 2016, after Alois P. Heinz *)
    conj[y_]:=If[Length[y]==0,y,Table[Length[Select[y,#>=k&]],{k,1,Max[y]}]]; Table[Length[Select[IntegerPartitions[n],Count[#,?OddQ]==Count[conj[#],?OddQ]&]],{n,0,15}] (* Gus Wiseman, Jun 27 2021 *)

A344609 Numbers whose alternating sum of prime indices is >= 0.

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 8, 9, 11, 12, 13, 16, 17, 18, 19, 20, 23, 25, 27, 28, 29, 30, 31, 32, 36, 37, 41, 42, 43, 44, 45, 47, 48, 49, 50, 52, 53, 59, 61, 63, 64, 66, 67, 68, 70, 71, 72, 73, 75, 76, 78, 79, 80, 81, 83, 89, 92, 97, 98, 99, 100, 101, 102, 103, 105, 107
Offset: 1

Views

Author

Gus Wiseman, May 30 2021

Keywords

Comments

Also Heinz numbers of partitions whose reverse-alternating sum is >= 0. These are partitions whose conjugate parts are all even or whose length is odd.
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.

Examples

			The sequence of terms together with their prime indices begins:
      1: {}            20: {1,1,3}         45: {2,2,3}
      2: {1}           23: {9}             47: {15}
      3: {2}           25: {3,3}           48: {1,1,1,1,2}
      4: {1,1}         27: {2,2,2}         49: {4,4}
      5: {3}           28: {1,1,4}         50: {1,3,3}
      7: {4}           29: {10}            52: {1,1,6}
      8: {1,1,1}       30: {1,2,3}         53: {16}
      9: {2,2}         31: {11}            59: {17}
     11: {5}           32: {1,1,1,1,1}     61: {18}
     12: {1,1,2}       36: {1,1,2,2}       63: {2,2,4}
     13: {6}           37: {12}            64: {1,1,1,1,1,1}
     16: {1,1,1,1}     41: {13}            66: {1,2,5}
     17: {7}           42: {1,2,4}         67: {19}
     18: {1,2,2}       43: {14}            68: {1,1,7}
     19: {8}           44: {1,1,5}         70: {1,3,4}
For example, the prime indices of 70 are {1,3,4} with alternating sum 1 - 3 + 4 = 2, so 70 is in the sequence. On the other hand, the prime indices of 24 are {1,1,1,2} with alternating sum 1 - 1 + 1 - 2 = -1, so 24 is not in the sequence.
		

Crossrefs

The opposite (nonpositive) version is A028260, counted by A027187.
The strict case (n > 0) is counted by A067659, odd bisection A344650.
Permutations of prime indices of these terms are counted by A116406.
Complement of A119899, Heinz numbers of the partitions counted by A344608.
Positions of nonnegative terms in A316524 or A344617.
Heinz numbers of the partitions counted by A344607.
A000041 counts partitions of 2n with alternating sum 0, ranked by A000290.
A000070 counts partitions with alternating sum 1.
A000097 counts partitions with alternating sum 2.
A056239 adds up prime indices, row sums of A112798.
A103919 counts partitions by sum and alternating sum.
A120452 counts partitions with reverse-alternating sum 2.
A316524 is the alternating sum of the prime indices of n (reverse: A344616).
A335433/A335448 rank separable/inseparable partitions.
A344604 counts wiggly compositions with twins.
A344610 counts partitions by sum and positive reverse-alternating sum.
A344612 counts partitions by sum and reverse-alternating sum.
A344618 gives reverse-alternating sums of standard compositions.

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[100],ats[primeMS[#]]>=0&]

A345911 Numbers k such that the k-th composition in standard order (row k of A066099) has reverse-alternating sum 1.

Original entry on oeis.org

1, 6, 7, 20, 21, 26, 27, 30, 31, 72, 73, 82, 83, 86, 87, 92, 93, 100, 101, 106, 107, 110, 111, 116, 117, 122, 123, 126, 127, 272, 273, 290, 291, 294, 295, 300, 301, 312, 313, 324, 325, 330, 331, 334, 335, 340, 341, 346, 347, 350, 351, 360, 361, 370, 371, 374
Offset: 1

Views

Author

Gus Wiseman, Jul 01 2021

Keywords

Comments

The reverse-alternating sum of a sequence (y_1,...,y_k) is Sum_i (-1)^(k-i) y_i.
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.

Examples

			The sequence of terms together with the corresponding compositions begins:
     1: (1)
     6: (1,2)
     7: (1,1,1)
    20: (2,3)
    21: (2,2,1)
    26: (1,2,2)
    27: (1,2,1,1)
    30: (1,1,1,2)
    31: (1,1,1,1,1)
    72: (3,4)
    73: (3,3,1)
    82: (2,3,2)
    83: (2,3,1,1)
    86: (2,2,1,2)
    87: (2,2,1,1,1)
		

Crossrefs

These compositions are counted by A000984 (bisection of A126869).
The version for Heinz numbers of partitions is A001105.
A version using runs of binary digits is A066879.
These are positions of 1's in A344618.
The non-reverse version is A345909.
The opposite (negative 1) version is A345912.
The version for prime indices is A345958.
Standard compositions: A000120, A066099, A070939, A228351, A124754, A344618.
A000041 counts partitions of 2n with alternating sum 0, ranked by A000290.
A011782 counts compositions.
A097805 counts compositions by alternating or reverse-alternating sum.
A103919 counts partitions by sum and alternating sum (reverse: A344612).
A316524 gives the alternating sum of prime indices (reverse: A344616).
A344610 counts partitions by sum and positive reverse-alternating sum.
A344611 counts partitions of 2n with reverse-alternating sum >= 0.
A345197 counts compositions by sum, length, and alternating sum.
Compositions of n, 2n, or 2n+1 with alternating/reverse-alternating sum k:
- k = 0: counted by A088218, ranked by A344619/A344619.
- k = 1: counted by A000984, ranked by A345909/A345911.
- k = -1: counted by A001791, ranked by A345910/A345912.
- k = 2: counted by A088218, ranked by A345925/A345922.
- k = -2: counted by A002054, ranked by A345924/A345923.
- k >= 0: counted by A116406, ranked by A345913/A345914.
- k <= 0: counted by A058622(n-1), ranked by A345915/A345916.
- k > 0: counted by A027306, ranked by A345917/A345918.
- k < 0: counted by A294175, ranked by A345919/A345920.
- k != 0: counted by A058622, ranked by A345921/A345921.
- k even: counted by A081294, ranked by A053754/A053754.
- k odd: counted by A000302, ranked by A053738/A053738.

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,100],sats[stc[#]]==1&]

A345922 Numbers k such that the k-th composition in standard order (row k of A066099) has reverse-alternating sum 2.

Original entry on oeis.org

2, 11, 12, 14, 37, 40, 42, 47, 51, 52, 54, 59, 60, 62, 137, 144, 146, 151, 157, 163, 164, 166, 171, 172, 174, 181, 184, 186, 191, 197, 200, 202, 207, 211, 212, 214, 219, 220, 222, 229, 232, 234, 239, 243, 244, 246, 251, 252, 254, 529, 544, 546, 551, 557, 569
Offset: 1

Views

Author

Gus Wiseman, Jul 10 2021

Keywords

Comments

The reverse-alternating sum of a sequence (y_1,...,y_k) is Sum_i (-1)^(k-i) y_i.
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.

Examples

			The initial terms and the corresponding compositions:
      2: (2)            144: (3,5)
     11: (2,1,1)        146: (3,3,2)
     12: (1,3)          151: (3,2,1,1,1)
     14: (1,1,2)        157: (3,1,1,2,1)
     37: (3,2,1)        163: (2,4,1,1)
     40: (2,4)          164: (2,3,3)
     42: (2,2,2)        166: (2,3,1,2)
     47: (2,1,1,1,1)    171: (2,2,2,1,1)
     51: (1,3,1,1)      172: (2,2,1,3)
     52: (1,2,3)        174: (2,2,1,1,2)
     54: (1,2,1,2)      181: (2,1,2,2,1)
     59: (1,1,2,1,1)    184: (2,1,1,4)
     60: (1,1,1,3)      186: (2,1,1,2,2)
     62: (1,1,1,1,2)    191: (2,1,1,1,1,1,1)
    137: (4,3,1)        197: (1,4,2,1)
		

Crossrefs

These compositions are counted by A088218.
The case of partitions is counted by A120452.
These are the positions of 2's in A344618.
The opposite (negative 2) version is A345923.
The version for unreversed alternating sum is A345925.
The version for Heinz numbers of partitions is A345961.
A000041 counts partitions of 2n with alternating sum 0, ranked by A000290.
A011782 counts compositions.
A097805 counts compositions by alternating (or reverse-alternating) sum.
A103919 counts partitions by sum and alternating sum (reverse: A344612).
A316524 gives the alternating sum of prime indices (reverse: A344616).
A344610 counts partitions by sum and positive reverse-alternating sum.
A344611 counts partitions of 2n with reverse-alternating sum >= 0.
A345197 counts compositions by sum, length, and alternating sum.
Standard compositions: A000120, A066099, A070939, A228351, A124754, A344618.
Compositions of n, 2n, or 2n+1 with alternating/reverse-alternating sum k:
- k = 0: counted by A088218, ranked by A344619/A344619.
- k = 1: counted by A000984, ranked by A345909/A345911.
- k = -1: counted by A001791, ranked by A345910/A345912.
- k = 2: counted by A088218, ranked by A345925/A345922.
- k = -2: counted by A002054, ranked by A345924/A345923.
- k >= 0: counted by A116406, ranked by A345913/A345914.
- k <= 0: counted by A058622(n-1), ranked by A345915/A345916.
- k > 0: counted by A027306, ranked by A345917/A345918.
- k < 0: counted by A294175, ranked by A345919/A345920.
- k != 0: counted by A058622, ranked by A345921/A345921.
- k even: counted by A081294, ranked by A053754/A053754.
- k odd: counted by A000302, ranked by A053738/A053738.

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,100],sats[stc[#]]==2&]

A345923 Numbers k such that the k-th composition in standard order (row k of A066099) has reverse-alternating sum -2.

Original entry on oeis.org

9, 34, 39, 45, 49, 57, 132, 139, 142, 149, 154, 159, 161, 169, 178, 183, 189, 194, 199, 205, 209, 217, 226, 231, 237, 241, 249, 520, 531, 534, 540, 549, 554, 559, 564, 571, 574, 577, 585, 594, 599, 605, 612, 619, 622, 629, 634, 639, 642, 647, 653, 657, 665
Offset: 1

Views

Author

Gus Wiseman, Jul 10 2021

Keywords

Comments

The reverse-alternating sum of a sequence (y_1,...,y_k) is Sum_i (-1)^(k-i) y_i.
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.

Examples

			The initial terms and the corresponding compositions:
      9: (3,1)            183: (2,1,2,1,1,1)
     34: (4,2)            189: (2,1,1,1,2,1)
     39: (3,1,1,1)        194: (1,5,2)
     45: (2,1,2,1)        199: (1,4,1,1,1)
     49: (1,4,1)          205: (1,3,1,2,1)
     57: (1,1,3,1)        209: (1,2,4,1)
    132: (5,3)            217: (1,2,1,3,1)
    139: (4,2,1,1)        226: (1,1,4,2)
    142: (4,1,1,2)        231: (1,1,3,1,1,1)
    149: (3,2,2,1)        237: (1,1,2,1,2,1)
    154: (3,1,2,2)        241: (1,1,1,4,1)
    159: (3,1,1,1,1,1)    249: (1,1,1,1,3,1)
    161: (2,5,1)          520: (6,4)
    169: (2,2,3,1)        531: (5,3,1,1)
    178: (2,1,3,2)        534: (5,2,1,2)
		

Crossrefs

These compositions are counted by A088218.
These are the positions of 2's in A344618.
The case of partitions of 2n is A344741.
The opposite (negative 2) version is A345923.
The version for unreversed alternating sum is A345925.
The version for Heinz numbers of partitions is A345961.
A000041 counts partitions of 2n with alternating sum 0, ranked by A000290.
A011782 counts compositions.
A097805 counts compositions by alternating (or reverse-alternating) sum.
A103919 counts partitions by sum and alternating sum (reverse: A344612).
A120452 counts partitions of 2n with reverse-alternating sum 2.
A316524 gives the alternating sum of prime indices (reverse: A344616).
A344610 counts partitions by sum and positive reverse-alternating sum.
A344611 counts partitions of 2n with reverse-alternating sum >= 0.
A345197 counts compositions by sum, length, and alternating sum.
Standard compositions: A000120, A066099, A070939, A228351, A124754, A344618.
Compositions of n, 2n, or 2n+1 with alternating/reverse-alternating sum k:
- k = 0: counted by A088218, ranked by A344619/A344619.
- k = 1: counted by A000984, ranked by A345909/A345911.
- k = -1: counted by A001791, ranked by A345910/A345912.
- k = 2: counted by A088218, ranked by A345925/A345922.
- k = -2: counted by A002054, ranked by A345924/A345923.
- k >= 0: counted by A116406, ranked by A345913/A345914.
- k <= 0: counted by A058622(n-1), ranked by A345915/A345916.
- k > 0: counted by A027306, ranked by A345917/A345918.
- k < 0: counted by A294175, ranked by A345919/A345920.
- k != 0: counted by A058622, ranked by A345921/A345921.
- k even: counted by A081294, ranked by A053754/A053754.
- k odd: counted by A000302, ranked by A053738/A053738.

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,100],sats[stc[#]]==-2&]

A345924 Numbers k such that the k-th composition in standard order (row k of A066099) has alternating sum -2.

Original entry on oeis.org

12, 40, 49, 51, 54, 60, 144, 161, 163, 166, 172, 184, 194, 197, 199, 202, 205, 207, 212, 217, 219, 222, 232, 241, 243, 246, 252, 544, 577, 579, 582, 588, 600, 624, 642, 645, 647, 650, 653, 655, 660, 665, 667, 670, 680, 689, 691, 694, 700, 720, 737, 739, 742
Offset: 1

Views

Author

Gus Wiseman, Jul 11 2021

Keywords

Comments

The alternating sum of a sequence (y_1,...,y_k) is Sum_i (-1)^(i-1) y_i.
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.

Examples

			The initial terms and the corresponding compositions:
     12: (1,3)          202: (1,3,2,2)        582: (3,4,1,2)
     40: (2,4)          205: (1,3,1,2,1)      588: (3,3,1,3)
     49: (1,4,1)        207: (1,3,1,1,1,1)    600: (3,2,1,4)
     51: (1,3,1,1)      212: (1,2,2,3)        624: (3,1,1,5)
     54: (1,2,1,2)      217: (1,2,1,3,1)      642: (2,6,2)
     60: (1,1,1,3)      219: (1,2,1,2,1,1)    645: (2,5,2,1)
    144: (3,5)          222: (1,2,1,1,1,2)    647: (2,5,1,1,1)
    161: (2,5,1)        232: (1,1,2,4)        650: (2,4,2,2)
    163: (2,4,1,1)      241: (1,1,1,4,1)      653: (2,4,1,2,1)
    166: (2,3,1,2)      243: (1,1,1,3,1,1)    655: (2,4,1,1,1,1)
    172: (2,2,1,3)      246: (1,1,1,2,1,2)    660: (2,3,2,3)
    184: (2,1,1,4)      252: (1,1,1,1,1,3)    665: (2,3,1,3,1)
    194: (1,5,2)        544: (4,6)            667: (2,3,1,2,1,1)
    197: (1,4,2,1)      577: (3,6,1)          670: (2,3,1,1,1,2)
    199: (1,4,1,1,1)    579: (3,5,1,1)        680: (2,2,2,4)
		

Crossrefs

These compositions are counted by A002054.
These are the positions of -2's in A124754.
The version for reverse-alternating sum is A345923.
The opposite (positive 2) version is A345925.
The version for Heinz numbers of partitions is A345962.
A000041 counts partitions of 2n with alternating sum 0, ranked by A000290.
A011782 counts compositions.
A097805 counts compositions by alternating (or reverse-alternating) sum.
A103919 counts partitions by sum and alternating sum (reverse: A344612).
A120452 counts partitions of 2n with reverse-alternating sum 2.
A316524 gives the alternating sum of prime indices (reverse: A344616).
A345197 counts compositions by sum, length, and alternating sum.
Standard compositions: A000120, A066099, A070939, A228351, A124754, A344618.
Compositions of n, 2n, or 2n+1 with alternating/reverse-alternating sum k:
- k = 0: counted by A088218, ranked by A344619/A344619.
- k = 1: counted by A000984, ranked by A345909/A345911.
- k = -1: counted by A001791, ranked by A345910/A345912.
- k = 2: counted by A088218, ranked by A345925/A345922.
- k = -2: counted by A002054, ranked by A345924/A345923.
- k >= 0: counted by A116406, ranked by A345913/A345914.
- k <= 0: counted by A058622(n-1), ranked by A345915/A345916.
- k > 0: counted by A027306, ranked by A345917/A345918.
- k < 0: counted by A294175, ranked by A345919/A345920.
- k != 0: counted by A058622, ranked by A345921/A345921.
- k even: counted by A081294, ranked by A053754/A053754.
- k odd: counted by A000302, ranked by A053738/A053738.

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],ats[stc[#]]==-2&]

A345925 Numbers k such that the k-th composition in standard order (row k of A066099) has alternating sum 2.

Original entry on oeis.org

2, 9, 11, 14, 34, 37, 39, 42, 45, 47, 52, 57, 59, 62, 132, 137, 139, 142, 146, 149, 151, 154, 157, 159, 164, 169, 171, 174, 178, 181, 183, 186, 189, 191, 200, 209, 211, 214, 220, 226, 229, 231, 234, 237, 239, 244, 249, 251, 254, 520, 529, 531, 534, 540, 546
Offset: 1

Views

Author

Gus Wiseman, Jul 11 2021

Keywords

Comments

The alternating sum of a sequence (y_1,...,y_k) is Sum_i (-1)^(i-1) y_i.
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.

Examples

			The initial terms and corresponding compositions:
      2: (2)            137: (4,3,1)
      9: (3,1)          139: (4,2,1,1)
     11: (2,1,1)        142: (4,1,1,2)
     14: (1,1,2)        146: (3,3,2)
     34: (4,2)          149: (3,2,2,1)
     37: (3,2,1)        151: (3,2,1,1,1)
     39: (3,1,1,1)      154: (3,1,2,2)
     42: (2,2,2)        157: (3,1,1,2,1)
     45: (2,1,2,1)      159: (3,1,1,1,1,1)
     47: (2,1,1,1,1)    164: (2,3,3)
     52: (1,2,3)        169: (2,2,3,1)
     57: (1,1,3,1)      171: (2,2,2,1,1)
     59: (1,1,2,1,1)    174: (2,2,1,1,2)
     62: (1,1,1,1,2)    178: (2,1,3,2)
    132: (5,3)          181: (2,1,2,2,1)
		

Crossrefs

These compositions are counted by A088218.
These are the positions of 2's in A124754.
The case of partitions of 2n is A344741.
The version for reverse-alternating sum is A345922.
The opposite (negative 2) version is A345924.
The version for Heinz numbers of partitions is A345960 (reverse: A345961).
A000041 counts partitions of 2n with alternating sum 0, ranked by A000290.
A011782 counts compositions.
A097805 counts compositions by alternating (or reverse-alternating) sum.
A103919 counts partitions by sum and alternating sum (reverse: A344612).
A120452 counts partitions of 2n with reverse-alternating sum 2.
A316524 gives the alternating sum of prime indices (reverse: A344616).
A345197 counts compositions by sum, length, and alternating sum.
Standard compositions: A000120, A066099, A070939, A228351, A124754, A344618.
Compositions of n, 2n, or 2n+1 with alternating/reverse-alternating sum k:
- k = 0: counted by A088218, ranked by A344619/A344619.
- k = 1: counted by A000984, ranked by A345909/A345911.
- k = -1: counted by A001791, ranked by A345910/A345912.
- k = 2: counted by A088218, ranked by A345925/A345922.
- k = -2: counted by A002054, ranked by A345924/A345923.
- k >= 0: counted by A116406, ranked by A345913/A345914.
- k <= 0: counted by A058622(n-1), ranked by A345915/A345916.
- k > 0: counted by A027306, ranked by A345917/A345918.
- k < 0: counted by A294175, ranked by A345919/A345920.
- k != 0: counted by A058622, ranked by A345921/A345921.
- k even: counted by A081294, ranked by A053754/A053754.
- k odd: counted by A000302, ranked by A053738/A053738.

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],ats[stc[#]]==2&]

A345958 Numbers whose prime indices have reverse-alternating sum 1.

Original entry on oeis.org

2, 6, 8, 15, 18, 24, 32, 35, 50, 54, 60, 72, 77, 96, 98, 128, 135, 140, 143, 150, 162, 200, 216, 221, 240, 242, 288, 294, 308, 315, 323, 338, 375, 384, 392, 437, 450, 486, 512, 540, 560, 572, 578, 600, 648, 667, 693, 722, 726, 735, 800, 864, 875, 882, 884, 899
Offset: 1

Views

Author

Gus Wiseman, Jul 11 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. Of course, the reverse-alternating sum of prime indices is also the alternating sum of reversed prime indices.
Also numbers with exactly one odd conjugate prime index. Conjugate prime indices are listed by A321650, ranked by A122111.

Examples

			The initial terms and their prime indices:
   2: {1}
   6: {1,2}
   8: {1,1,1}
  15: {2,3}
  18: {1,2,2}
  24: {1,1,1,2}
  32: {1,1,1,1,1}
  35: {3,4}
  50: {1,3,3}
  54: {1,2,2,2}
  60: {1,1,2,3}
  72: {1,1,1,2,2}
  77: {4,5}
  96: {1,1,1,1,1,2}
  98: {1,4,4}
		

Crossrefs

The k > 0 version is A000037.
These multisets are counted by A000070.
The k = 0 version is A000290, counted by A000041.
The version for unreversed-alternating sum is A001105.
These partitions are counted by A035363.
These are the positions of 1's in A344616.
The k = 2 version is A345961, counted by A120452.
A000984/A345909/A345911 count/rank compositions with alternating sum 1.
A001791/A345910/A345912 count/rank compositions with alternating sum -1.
A088218 counts compositions with alternating sum 0, ranked by A344619.
A025047 counts wiggly compositions.
A027187 counts partitions with reverse-alternating sum <= 0.
A056239 adds up prime indices, row sums of A112798.
A097805 counts compositions by alternating (or reverse-alternating) sum.
A103919 counts partitions by sum and alternating sum (reverse: A344612).
A316524 gives the alternating sum of prime indices.
A325534 and A325535 count separable and inseparable partitions.
A344606 counts alternating permutations of prime indices.
A344607 counts partitions with reverse-alternating sum >= 0.
A344610 counts partitions by sum and positive reverse-alternating sum.

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[100],sats[primeMS[#]]==1&]
Previous Showing 11-20 of 44 results. Next