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

A344616 Alternating sum of the integer partition with Heinz number n.

Original entry on oeis.org

0, 1, 2, 0, 3, 1, 4, 1, 0, 2, 5, 2, 6, 3, 1, 0, 7, 1, 8, 3, 2, 4, 9, 1, 0, 5, 2, 4, 10, 2, 11, 1, 3, 6, 1, 0, 12, 7, 4, 2, 13, 3, 14, 5, 3, 8, 15, 2, 0, 1, 5, 6, 16, 1, 2, 3, 6, 9, 17, 1, 18, 10, 4, 0, 3, 4, 19, 7, 7, 2, 20, 1, 21, 11, 2, 8, 1, 5, 22, 3, 0, 12
Offset: 1

Views

Author

Gus Wiseman, Jun 03 2021

Keywords

Comments

The alternating sum of a partition (y_1,...,y_k) is Sum_i (-1)^(i-1) y_i, which is equal to the number of odd parts in the conjugate partition.
The Heinz number of a partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k), giving a bijective correspondence between positive integers and integer partitions.
Also the reverse-alternating sum of the prime indices of n.

Examples

			The partition (6,4,3,2,2) has Heinz number 4095 and conjugate (5,5,3,2,1,1), so a(4095) = 5.
		

Crossrefs

Positions of nonzeros are A000037.
Positions of 0's are A000290.
The version for prime factors is A071321 (reverse: A071322).
A version for compositions is A124754.
The version for prime multiplicities is A316523.
The reverse version is A316524, with sign A344617.
A000041 counts partitions of 2n with alternating sum 0.
A056239 adds up prime indices, row sums of A112798.
A103919 counts partitions by sum and alternating sum.
A335433 ranks separable partitions.
A335448 ranks inseparable partitions.
A344606 counts wiggly permutations of prime indices 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

  • Maple
    a:= n-> (l-> -add(l[i]*(-1)^i, i=1..nops(l)))(sort(map(
        i-> numtheory[pi](i[1])$i[2], ifactors(n)[2]), `>`)):
    seq(a(n), n=1..82);  # Alois P. Heinz, Jun 04 2021
  • 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]}];
    Table[ats[Reverse[primeMS[n]]],{n,100}]

Formula

a(n) = A257991(A122111(n)).
A057427(a(n)) = A049240(n).

A103919 Triangle of numbers of partitions of n with total number of odd parts equal to k from {0,...,n}.

Original entry on oeis.org

1, 0, 1, 1, 0, 1, 0, 2, 0, 1, 2, 0, 2, 0, 1, 0, 4, 0, 2, 0, 1, 3, 0, 5, 0, 2, 0, 1, 0, 7, 0, 5, 0, 2, 0, 1, 5, 0, 9, 0, 5, 0, 2, 0, 1, 0, 12, 0, 10, 0, 5, 0, 2, 0, 1, 7, 0, 17, 0, 10, 0, 5, 0, 2, 0, 1, 0, 19, 0, 19, 0, 10, 0, 5, 0, 2, 0, 1, 11, 0, 28, 0, 20, 0, 10, 0, 5, 0, 2, 0, 1, 0, 30, 0, 33, 0, 20, 0, 10, 0, 5, 0, 2, 0, 1
Offset: 0

Views

Author

Wolfdieter Lang, Mar 24 2005

Keywords

Comments

The partition (0) of n=0 is included. For n>0 no part 0 appears.
The first (k=0) column gives the number of partitions without odd parts, i.e., those with even parts only. See A035363.
Without the alternating zeros this becomes a triangle with columns given by the rows of the S_n(m) table shown in the Riordan reference.
From Gregory L. Simay, Oct 31 2015: (Start)
T(2n+k,k) = the number of partitions of n with parts 1..k of two kinds. If n<=k, then T(2n+k) = A000712(n), the number of partitions of n with parts of two kinds.
T(2n+k) = the convolution of A000041(n) and the number of partitions of n+k having exactly k parts.
T(2n+k) = d(n,k) where d(n,0) = p(n) and d(n,k) = d(n,k-1) + d(n-k,k-1) + d(n-2k,k-1) + ... (End)
From Emeric Deutsch, Oct 04 2016: (Start)
T(n,k) = number of partitions (p1 >= p2 >= p3 >= ...) of n having alternating sum p1 - p2 + p3 - ... = k. Example: T(5,3) = 2 because there are two partitions (3,1,1) and (4,1) of 5 with alternating sum 3.
The equidistribution of the partition statistics "alternating sum" and "total number of odd parts" follows by conjugation. (End)

Examples

			The triangle a(n,k) begins:
n\k 0  1  2  3  4  5  6  7  8  9 10
0:  1
1:  0  1
2:  1  0  1
3:  0  2  0  1
4:  2  0  2  0  1
5:  0  4  0  2  0  1
6:  3  0  5  0  2  0  1
7:  0  7  0  5  0  2  0  1
8:  5  0  9  0  5  0  2  0  1
9:  0 12  0 10  0  5  0  2  0  1
10: 7  0 17  0 10  0  5  0  2  0  1
... Reformatted - _Wolfdieter Lang_, Apr 28 2013
a(0,0) = 1 because n=0 has no odd part, only one even part, 0, by definition. a(5,3) = 2 because there are two partitions (1,1,3) and (1,1,1,2) of 5 with exactly 3 odd parts.
From _Gregory L. Simay_, Oct 31 2015: (Start)
T(10,4) = T(2*3+4,4) = d(3,4) = A000712(3) = 10.
T(10,2) = T(2*4+2,2) = d(4,2) = d(4,1)+d(2,1)+d(0,1) = d(4,0)+d(3,0)+d(2,0)+d(1,0)+d(0,0) + d(2,0)+d(1,0)+d(0,0) + d(0,0) = convolution sum p(4)+p(3)+2*p(2)+2*p(1)+3*p(0) = 5+3+2*2+2*1+3*1 = 17.
T(9,1) = T(8,0) + T(7,1) = 5 + 7 = 12.
(End)
		

References

  • J. Riordan, Combinatorial Identities, Wiley, 1968, p. 199.

Crossrefs

Row sums gives A000041 (partition numbers). Columns: k=0: A035363 (with zero entries) A000041 (without zero entries), k=1: A000070, k=2: A000097, k=3: A000098, k=4: A000710, 3k>=n: A000712.
Cf. A066897.
The strict version (without zeros) is A152146 interleaved with A152157.
The rows (without zeros) are A239830 interleaved with A239829.
The reverse version (without zeros) is the right half of A344612.
Removing all zeros gives A344651.
The strict reverse version (without zeros) is the right half of A344739.

Programs

  • Maple
    g:=1/product((1-t*x^(2*j-1))*(1-x^(2*j)),j=1..20): gser:=simplify(series(g,x=0,22)): P[0]:=1: for n from 1 to 18 do P[n]:=coeff(gser,x^n) od: for n from 0 to 18 do seq(coeff(P[n],t,j),j=0..n) od; # yields sequence in triangular form # Emeric Deutsch, Feb 17 2006
  • Mathematica
    T[n_, k_] := T[n, k] = Which[nJean-François Alcover, Mar 05 2014, after Paul D. Hanna *)
    Table[Length[Select[IntegerPartitions[n],Count[#,?OddQ]==k&]],{n,0,15},{k,0,n}] (* _Gus Wiseman, Jun 20 2021 *)
  • PARI
    {T(n, k)=if(n>=k, if(n==k, 1, if((n-k+1)%2==0, 0, if(k==0, sum(m=0, n, T(n\2, m)), T(n-1, k-1)+T(n-2*k, k)))))}
    for(n=0, 20, for(k=0, n, print1(T(n, k), ", ")); print(""))
    \\ Paul D. Hanna, Apr 27 2013

Formula

a(n, k) = number of partitions of n>=0, which have exactly k odd parts (and possibly even parts) for k from {0, ..., n}.
Sum_{k=0..n} k*T(n,k) = A066897(n). - Emeric Deutsch, Feb 17 2006
G.f.: G(t,x) = 1/Product_{j>=1} (1-t*x^(2*j-1))*(1-x^(2*j)). - Emeric Deutsch, Feb 17 2006
G.f. T(2n+k,k) = g.f. d(n,k) = (1/Product_{j=1..k} (1-x^j)) * g.f. p(n). - Gregory L. Simay, Oct 31 2015
T(n,k) = T(n-1,k-1) + T(n-2k,k). - Gregory L. Simay, Nov 01 2015

A344612 Triangle read by rows where T(n,k) is the number of integer partitions of n with reverse-alternating sum k ranging from -n to n in steps of 2.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 2, 1, 1, 0, 1, 2, 2, 1, 1, 0, 1, 2, 3, 3, 1, 1, 0, 1, 2, 4, 3, 3, 1, 1, 0, 1, 2, 4, 5, 5, 3, 1, 1, 0, 1, 2, 4, 7, 5, 6, 3, 1, 1, 0, 1, 2, 4, 8, 7, 9, 6, 3, 1, 1, 0, 1, 2, 4, 8, 12, 7, 11, 6, 3, 1, 1, 0, 1, 2, 4, 8, 14, 11, 14, 12, 6, 3, 1, 1
Offset: 0

Views

Author

Gus Wiseman, Jun 01 2021

Keywords

Comments

The reverse-alternating sum of a partition (y_1,...,y_k) is Sum_i (-1)^(k-i) y_i. This is also (-1)^(k-1) times the sum of the even-indexed parts minus the sum of the odd-indexed parts.
Also the number of reversed integer partitions of n with alternating sum k ranging from -n to n in steps of 2.
Also the number of integer partitions of n with (-1)^(m-1) * b = k where m is the greatest part and b is the number of odd parts, with k ranging from -n to n in steps of 2.

Examples

			Triangle begins:
                                1
                              0   1
                            0   1   1
                          0   1   1   1
                        0   1   2   1   1
                      0   1   2   2   1   1
                    0   1   2   3   3   1   1
                  0   1   2   4   3   3   1   1
                0   1   2   4   5   5   3   1   1
              0   1   2   4   7   5   6   3   1   1
            0   1   2   4   8   7   9   6   3   1   1
          0   1   2   4   8  12   7  11   6   3   1   1
        0   1   2   4   8  14  11  14  12   6   3   1   1
      0   1   2   4   8  15  19  11  18  12   6   3   1   1
    0   1   2   4   8  15  24  15  23  20  12   6   3   1   1
  0   1   2   4   8  15  26  30  15  31  21  12   6   3   1   1
For example, row n = 7 counts the following partitions:
  (61)  (52)    (43)      (331)      (322)    (511)  (7)
        (4111)  (2221)    (22111)    (421)
                (3211)    (1111111)  (31111)
                (211111)
Row n = 9 counts the following partitions:
  81  72    63      54        441        333      522    711  9
      6111  4221    3222      22221      432      621
            5211    3321      33111      531      51111
            411111  4311      2211111    32211
                    222111    111111111  42111
                    321111               3111111
                    21111111
		

Crossrefs

Row sums are A000041.
The midline k = n/2 is also A000041.
The right half (i.e., k >= 0) for even n is A344610.
The rows appear to converge to A344611 (from left) and A006330 (from right).
The non-reversed version is A344651 (A239830 interleaved with A239829).
The strict version is A344739.
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).
A316524 is the alternating sum of the prime indices of n (reverse: A344616).
A325534/A325535 count separable/inseparable partitions.
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[#]==k&]],{n,0,15},{k,-n,n,2}]
  • PARI
    row(n)={my(v=vector(n+1)); forpart(p=n, my(s=-sum(i=1, #p, p[i]*(-1)^i)); v[(s+n)/2+1]++); v} \\ Andrew Howroyd, Jan 06 2024

A344607 Number of integer partitions of n with reverse-alternating sum >= 0.

Original entry on oeis.org

1, 1, 2, 2, 4, 4, 8, 8, 15, 16, 27, 29, 48, 52, 81, 90, 135, 151, 220, 248, 352, 400, 553, 632, 859, 985, 1313, 1512, 1986, 2291, 2969, 3431, 4394, 5084, 6439, 7456, 9357, 10836, 13479, 15613, 19273, 22316, 27353, 31659, 38558, 44601, 53998, 62416, 75168
Offset: 0

Views

Author

Gus Wiseman, May 29 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 integer partitions of n with alternating sum >= 0.
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 whose conjugate parts are all even or whose length is odd. By conjugation, this is also the number of integer partitions of n whose parts are all even or whose greatest part is odd.
All integer partitions have alternating sum >= 0, so the non-reversed version is A000041.
Is this sequence weakly increasing? In particular, is A344611(n) <= A160786(n)?

Examples

			The a(1) = 1 through a(8) = 15 partitions:
  (1)  (2)   (3)    (4)     (5)      (6)       (7)        (8)
       (11)  (111)  (22)    (221)    (33)      (322)      (44)
                    (211)   (311)    (222)     (331)      (332)
                    (1111)  (11111)  (321)     (421)      (422)
                                     (411)     (511)      (431)
                                     (2211)    (22111)    (521)
                                     (21111)   (31111)    (611)
                                     (111111)  (1111111)  (2222)
                                                          (3311)
                                                          (22211)
                                                          (32111)
                                                          (41111)
                                                          (221111)
                                                          (2111111)
                                                          (11111111)
		

Crossrefs

The non-reversed version is A000041.
The opposite version (rev-alt sum <= 0) is A027187, ranked by A028260.
The strict case for n > 0 is A067659 (even bisection: A344650).
The ordered version appears to be A116406 (even bisection: A114121).
The odd bisection is A160786.
The complement is counted by A344608.
The Heinz numbers of these partitions are A344609 (complement: A119899).
The even bisection is A344611.
A000070 counts partitions with alternating sum 1 (reversed: A000004).
A000097 counts partitions with alternating sum 2 (reversed: A120452).
A035363 counts partitions with alternating sum 0, ranked by A000290.
A103919 counts partitions by sum and alternating sum.
A316524 is the alternating sum of prime indices of n (reversed: A344616).
A325534/A325535 count separable/inseparable partitions.
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
    sats[y_]:=Sum[(-1)^(i-Length[y])*y[[i]],{i,Length[y]}];
    Table[Length[Select[IntegerPartitions[n],sats[#]>=0&]],{n,0,30}]

Formula

a(n) + A344608(n) = A000041(n).
a(2n+1) = A160786(n).

A116406 Expansion of ((1 + x - 2x^2) + (1+x)*sqrt(1-4x^2))/(2(1-4x^2)).

Original entry on oeis.org

1, 1, 2, 3, 7, 11, 26, 42, 99, 163, 382, 638, 1486, 2510, 5812, 9908, 22819, 39203, 89846, 155382, 354522, 616666, 1401292, 2449868, 5546382, 9740686, 21977516, 38754732, 87167164, 154276028, 345994216, 614429672, 1374282019, 2448023843
Offset: 0

Views

Author

Paul Barry, Feb 13 2006

Keywords

Comments

Interleaving of A114121 and A032443. Row sums of A116405. Binomial transform is A116409.
Appears to be the number of n-digit binary numbers not having more zeros than ones; equivalently, the number of unrestricted Dyck paths of length n not going below the axis. - Ralf Stephan, Mar 25 2008
From Gus Wiseman, Jun 20 2021: (Start)
Also the number compositions of n with alternating sum >= 0, where the alternating sum of a sequence (y_1,...,y_k) is Sum_i (-1)^(i-1) y_i. The a(0) = 1 through a(5) = 11 compositions are:
() (1) (2) (3) (4) (5)
(11) (21) (22) (32)
(111) (31) (41)
(112) (113)
(121) (122)
(211) (212)
(1111) (221)
(311)
(1121)
(2111)
(11111)
(End)
From J. Stauduhar, Jan 14 2022: (Start)
Also, for n >= 2, first differences of partial row sums of Pascal's triangle. The first ceiling(n/2)+1 elements of rows n=0 to n=4 in Pascal's triangle are:
1
1 1
1 2
1 3 3
1 4 6
...
The cumulative sums of these partial rows form the sequence 1,3,6,13,24,..., and its first differences are a(2),a(3),a(4),... in this sequence.
(End)

Crossrefs

The alternating sum = 0 case is A001700 or A088218.
The alternating sum > 0 case appears to be A027306.
The bisections are A032443 (odd) and A114121 (even).
The alternating sum <= 0 version is A058622.
The alternating sum < 0 version is A294175.
The restriction to reversed partitions is A344607.
A103919 counts partitions by sum and alternating sum (reverse: A344612).
A124754 gives the alternating sum of standard compositions.
A344610 counts partitions by sum and positive reverse-alternating sum.
A344616 lists the alternating sums of partitions by Heinz number.

Programs

  • Mathematica
    CoefficientList[Series[((1+x-2x^2)+(1+x)Sqrt[1-4x^2])/(2(1-4x^2)),{x,0,40}],x] (* Harvey P. Dale, Aug 16 2012 *)
    ats[y_]:=Sum[(-1)^(i-1)*y[[i]],{i,Length[y]}];Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],ats[#]>=0&]],{n,0,15}] (* Gus Wiseman, Jun 20 2021 *)

Formula

a(n) = A114121(n/2)*(1+(-1)^n)/2 + A032443((n-1)/2)*(1-(-1)^n)/2.
a(n) = Sum_{k=0..floor(n/2)} binomial(n-1,k). - Paul Barry, Oct 06 2007
Conjecture: n*(n-3)*a(n) +2*(-n^2+4*n-2)*a(n-1) -4*(n-2)^2*a(n-2) +8*(n-2)*(n-3)*a(n-3)=0. - R. J. Mathar, Nov 28 2014
a(n) ~ 2^(n-2) * (1 + (3+(-1)^n)/sqrt(2*Pi*n)). - Vaclav Kotesovec, May 30 2016
a(n) = 2^(n-1) - A294175(n). - Gus Wiseman, Jun 27 2021

A344651 Irregular triangle read by rows where T(n,k) is the number of integer partitions of n with alternating sum k, with k ranging from n mod 2 to n in steps of 2.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 2, 2, 1, 4, 2, 1, 3, 5, 2, 1, 7, 5, 2, 1, 5, 9, 5, 2, 1, 12, 10, 5, 2, 1, 7, 17, 10, 5, 2, 1, 19, 19, 10, 5, 2, 1, 11, 28, 20, 10, 5, 2, 1, 30, 33, 20, 10, 5, 2, 1, 15, 47, 35, 20, 10, 5, 2, 1, 45, 57, 36, 20, 10, 5, 2, 1, 22, 73, 62, 36, 20, 10, 5, 2, 1
Offset: 0

Views

Author

Gus Wiseman, Jun 05 2021

Keywords

Comments

The alternating sum of a partition (y_1,...,y_k) is Sum_i (-1)^(i-1) y_i. This is equal to the number of odd parts in the conjugate partition, so T(n,k) is the number of integer partitions of n with k odd parts in the conjugate partition, which is also the number of partitions of n with k odd parts.
Also the number of integer partitions of n with odd-indexed parts (odd bisection) summing to k, ceiling(n/2) <= k <= n. The even-indexed version is A346633. - Gus Wiseman, Nov 29 2021

Examples

			Triangle begins:
   1
   1
   1   1
   2   1
   2   2   1
   4   2   1
   3   5   2   1
   7   5   2   1
   5   9   5   2   1
  12  10   5   2   1
   7  17  10   5   2   1
  19  19  10   5   2   1
  11  28  20  10   5   2   1
  30  33  20  10   5   2   1
  15  47  35  20  10   5   2   1
  45  57  36  20  10   5   2   1
  22  73  62  36  20  10   5   2   1
  67  92  64  36  20  10   5   2   1
  30 114 102  65  36  20  10   5   2   1
  97 147 107  65  36  20  10   5   2   1
Row n = 10 counts the following partitions (A = 10):
  (55)          (64)         (73)       (82)     (91)   (A)
  (3322)        (442)        (433)      (622)    (811)
  (4411)        (541)        (532)      (721)
  (222211)      (3331)       (631)      (7111)
  (331111)      (4222)       (5221)     (61111)
  (22111111)    (4321)       (6211)
  (1111111111)  (5311)       (42211)
                (22222)      (52111)
                (32221)      (511111)
                (33211)      (4111111)
                (43111)
                (322111)
                (421111)
                (2221111)
                (3211111)
                (31111111)
                (211111111)
The conjugate version is:
  (A)      (55)      (3331)     (331111)    (31111111)   (1111111111)
  (64)     (73)      (5311)     (511111)    (211111111)
  (82)     (91)      (7111)     (3211111)
  (442)    (433)     (33211)    (4111111)
  (622)    (532)     (43111)    (22111111)
  (4222)   (541)     (52111)
  (22222)  (631)     (61111)
           (721)     (322111)
           (811)     (421111)
           (3322)    (2221111)
           (4321)
           (4411)
           (5221)
           (6211)
           (32221)
           (42211)
           (222211)
		

Crossrefs

This is A103919 with all zeros removed.
The strict version is A152146 interleaved with A152157.
The rows are those of A239830 interleaved with those of A239829.
The reverse version is the right half of A344612.
The strict reverse version is the right half of A344739.
A000041 counts partitions of 2n with alternating sum 0, ranked by A000290.
A027187 counts partitions with rev-alternating sum <= 0, ranked by A028260.
A124754 lists alternating sums of standard compositions (reverse: A344618).
A316524 is the alternating sum of the prime indices of n (reverse: A344616).
A325534/A325535 count separable/inseparable partitions.
A344607 counts partitions with rev-alternating sum >= 0, ranked by A344609.
A344608 counts partitions with rev-alternating sum < 0, ranked by A119899.
A344610 counts partitions of n by positive rev-alternating sum.
A344611 counts partitions of 2n with rev-alternating sum >= 0.
A345197 counts compositions by sum, length, and alternating sum.
A346697 gives the sum of odd-indexed prime indices (reverse: A346699).
A346702 represents the odd bisection of compositions, sums A209281.

Programs

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

A344618 Reverse-alternating sums of standard compositions (A066099). Alternating sums of the compositions ranked by A228351.

Original entry on oeis.org

0, 1, 2, 0, 3, -1, 1, 1, 4, -2, 0, 2, 2, 0, 2, 0, 5, -3, -1, 3, 1, 1, 3, -1, 3, -1, 1, 1, 3, -1, 1, 1, 6, -4, -2, 4, 0, 2, 4, -2, 2, 0, 2, 0, 4, -2, 0, 2, 4, -2, 0, 2, 2, 0, 2, 0, 4, -2, 0, 2, 2, 0, 2, 0, 7, -5, -3, 5, -1, 3, 5, -3, 1, 1, 3, -1, 5, -3, -1, 3
Offset: 0

Views

Author

Gus Wiseman, Jun 03 2021

Keywords

Comments

Up to sign, same as A124754.
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 nonnegative integers together with the corresponding standard compositions and their reverse-alternating sums begins:
  0:     () ->  0    15: (1111) ->  0    30:  (1112) ->  1
  1:    (1) ->  1    16:    (5) ->  5    31: (11111) ->  1
  2:    (2) ->  2    17:   (41) -> -3    32:     (6) ->  6
  3:   (11) ->  0    18:   (32) -> -1    33:    (51) -> -4
  4:    (3) ->  3    19:  (311) ->  3    34:    (42) -> -2
  5:   (21) -> -1    20:   (23) ->  1    35:   (411) ->  4
  6:   (12) ->  1    21:  (221) ->  1    36:    (33) ->  0
  7:  (111) ->  1    22:  (212) ->  3    37:   (321) ->  2
  8:    (4) ->  4    23: (2111) -> -1    38:   (312) ->  4
  9:   (31) -> -2    24:   (14) ->  3    39:  (3111) -> -2
  10:  (22) ->  0    25:  (131) -> -1    40:    (24) ->  2
  11: (211) ->  2    26:  (122) ->  1    41:   (231) ->  0
  12:  (13) ->  2    27: (1211) ->  1    42:   (222) ->  2
  13: (121) ->  0    28:  (113) ->  3    43:  (2211) ->  0
  14: (112) ->  2    29: (1121) -> -1    44:   (213) ->  4
Triangle begins (row lengths A011782):
  0
  1
  2  0
  3 -1  1  1
  4 -2  0  2  2  0  2  0
  5 -3 -1  3  1  1  3 -1  3 -1  1  1  3 -1  1  1
		

Crossrefs

Up to sign, same as the reverse version A124754.
The version for Heinz numbers of partitions is A344616.
Positions of zeros are A344619.
A000041 counts partitions of 2n with alternating sum 0, ranked by A000290.
A103919 counts partitions by sum and alternating sum (reverse: A344612).
A316524 is the alternating sum of the prime indices of n (reverse: A344616).
A116406 counts compositions with alternating sum >= 0.
A344610 counts partitions by sum and positive reverse-alternating sum.
A344611 counts partitions of 2n with reverse-alternating sum >= 0.
All of the following pertain to compositions in standard order:
- The length is A000120.
- Converting to reversed ranking gives A059893.
- The rows are A066099.
- The sum is A070939.
- The runs are counted by A124767.
- The reversed version is A228351.
- Strict compositions are ranked by A233564.
- Constant compositions are ranked by A272919.
- The Heinz number is A333219.
- Anti-run compositions are ranked by A333489.

Programs

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

A344610 Triangle read by rows where T(n,k) is the number of integer partitions of 2n with reverse-alternating sum 2k.

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 3, 3, 1, 1, 5, 5, 3, 1, 1, 7, 9, 6, 3, 1, 1, 11, 14, 12, 6, 3, 1, 1, 15, 23, 20, 12, 6, 3, 1, 1, 22, 34, 35, 21, 12, 6, 3, 1, 1, 30, 52, 56, 38, 21, 12, 6, 3, 1, 1, 42, 75, 91, 62, 38, 21, 12, 6, 3, 1, 1, 56, 109, 140, 103, 63, 38, 21, 12, 6, 3, 1, 1
Offset: 0

Views

Author

Gus Wiseman, May 31 2021

Keywords

Comments

The reverse-alternating sum of a partition (y_1,...,y_k) is Sum_i (-1)^(k-i) y_i. This is equal to (-1)^(k-1) times the number of odd parts in the conjugate partition, where k is the number of parts.
Also the number of reversed integer partitions of 2n with alternating sum 2k.

Examples

			Triangle begins:
   1
   1   1
   2   1   1
   3   3   1   1
   5   5   3   1   1
   7   9   6   3   1   1
  11  14  12   6   3   1   1
  15  23  20  12   6   3   1   1
  22  34  35  21  12   6   3   1   1
  30  52  56  38  21  12   6   3   1   1
  42  75  91  62  38  21  12   6   3   1   1
  56 109 140 103  63  38  21  12   6   3   1   1
  77 153 215 163 106  63  38  21  12   6   3   1   1
Row n = 5 counts the following partitions:
  (55)          (442)        (433)      (622)    (811)  (10)
  (3322)        (541)        (532)      (721)
  (4411)        (22222)      (631)      (61111)
  (222211)      (32221)      (42211)
  (331111)      (33211)      (52111)
  (22111111)    (43111)      (4111111)
  (1111111111)  (2221111)
                (3211111)
                (211111111)
		

Crossrefs

The columns with initial 0's removed appear to converge to A006330.
The odd version is A239829.
The non-reversed version is A239830.
Row sums are A344611, odd bisection of A344607.
Including odd n and negative k gives A344612 (strict: A344739).
The strict case is A344649 (row sums: A344650).
A000041 counts partitions of 2n with alternating sum 0, ranked by A000290.
A103919 counts partitions by sum and alternating sum.
A120452 counts partitions of 2n with rev-alt 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.
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],k==sats[#]&]],{n,0,15,2},{k,0,n,2}]

A344619 The a(n)-th composition in standard order (A066099) has alternating sum 0.

Original entry on oeis.org

0, 3, 10, 13, 15, 36, 41, 43, 46, 50, 53, 55, 58, 61, 63, 136, 145, 147, 150, 156, 162, 165, 167, 170, 173, 175, 180, 185, 187, 190, 196, 201, 203, 206, 210, 213, 215, 218, 221, 223, 228, 233, 235, 238, 242, 245, 247, 250, 253, 255, 528, 545, 547, 550, 556, 568
Offset: 1

Views

Author

Gus Wiseman, Jun 03 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 sequence of terms together with the corresponding compositions begins:
    0: ()
    3: (1,1)
   10: (2,2)
   13: (1,2,1)
   15: (1,1,1,1)
   36: (3,3)
   41: (2,3,1)
   43: (2,2,1,1)
   46: (2,1,1,2)
   50: (1,3,2)
   53: (1,2,2,1)
   55: (1,2,1,1,1)
   58: (1,1,2,2)
   61: (1,1,1,2,1)
   63: (1,1,1,1,1,1)
  136: (4,4)
  145: (3,4,1)
  147: (3,3,1,1)
  150: (3,2,1,2)
  156: (3,1,1,3)
		

Crossrefs

The version for Heinz numbers of partitions is A000290, counted by A000041.
These are the positions of zeros in A344618.
A103919 counts partitions by sum and alternating sum (reverse: A344612).
A116406 counts compositions with alternating sum >= 0.
A124754 gives the alternating sum of standard compositions.
A316524 is the alternating sum of the prime indices of n.
A344604 counts wiggly compositions with twins.
A344610 counts partitions by sum and positive reverse-alternating sum.
A344611 counts partitions of 2n with reverse-alternating sum >= 0.
A344616 gives the alternating sum of reversed prime indices.
All of the following pertain to compositions in standard order:
- The length is A000120.
- Converting to reversed ranking gives A059893.
- The rows are A066099.
- The sum is A070939.
- The runs are counted by A124767.
- The reversed version is A228351.
- Strict compositions are ranked by A233564.
- Constant compositions are ranked by A272919.
- The Heinz number is A333219.
- Anti-run compositions are ranked by A333489.

Programs

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

A344611 Number of integer partitions of 2n with reverse-alternating sum >= 0.

Original entry on oeis.org

1, 2, 4, 8, 15, 27, 48, 81, 135, 220, 352, 553, 859, 1313, 1986, 2969, 4394, 6439, 9357, 13479, 19273, 27353, 38558, 53998, 75168, 104022, 143172, 196021, 267051, 362086, 488733, 656802, 879026, 1171747, 1555997, 2058663, 2714133, 3566122, 4670256, 6096924, 7935184
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 integer partitions of 2n with alternating sum >= 0.
The reverse-alternating sum of a partition is equal to (-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 partitions of 2n whose conjugate parts are all even or whose length is odd. By conjugation, this is also the number of partitions of 2n whose parts are all even or whose greatest part is odd.

Examples

			The a(0) = 1 through a(4) = 15 partitions:
  ()  (2)   (4)     (6)       (8)
      (11)  (22)    (33)      (44)
            (211)   (222)     (332)
            (1111)  (321)     (422)
                    (411)     (431)
                    (2211)    (521)
                    (21111)   (611)
                    (111111)  (2222)
                              (3311)
                              (22211)
                              (32111)
                              (41111)
                              (221111)
                              (2111111)
                              (11111111)
		

Crossrefs

The non-reversed version is A058696 (partitions of 2n).
The ordered version appears to be A114121.
Odd bisection of A344607.
Row sums of A344610.
The strict case is A344650.
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.
A103919 counts partitions by sum and alternating sum.
A120452 counts partitions of 2n with reverse-alternating sum 2.
A316524 is the alternating sum of the prime indices of n (reverse: A344616).
A325534/A325535 count separable/inseparable partitions.
A344612 counts partitions by sum and rev-alt sum (strict: A344739).
A344618 gives reverse-alternating sums of standard compositions.
A344741 counts partitions of 2n with reverse-alternating sum -2.

Programs

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

Formula

Conjecture: a(n) <= A160786(n). The difference is 0, 0, 0, 0, 1, 2, 4, 9, 16, 28, 48, 79, ...

Extensions

More terms from Bert Dobbelaere, Jun 12 2021
Showing 1-10 of 22 results. Next