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

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

A000097 Number of partitions of n if there are two kinds of 1's and two kinds of 2's.

Original entry on oeis.org

1, 2, 5, 9, 17, 28, 47, 73, 114, 170, 253, 365, 525, 738, 1033, 1422, 1948, 2634, 3545, 4721, 6259, 8227, 10767, 13990, 18105, 23286, 29837, 38028, 48297, 61053, 76926, 96524, 120746, 150487, 187019, 231643, 286152, 352413, 432937, 530383, 648245
Offset: 0

Views

Author

Keywords

Comments

Also number of partitions of 2*n with exactly 2 odd parts (offset 1). - Vladeta Jovovic, Jan 12 2005
Also number of transitions from one partition of n+2 to another, where a transition consists of replacing any two parts with their sum. Remove all 1' and 2' from the partition, replacing them with ((number of 2') + 1) and ((number of 1') + (number of 2') + 1); these are the two parts being summed. Number of partitions of n into parts of 2 kinds with at most 2 parts of the second kind, or of n+2 into parts of 2 kinds with exactly 2 parts of the second kind. - Franklin T. Adams-Watters, Mar 20 2006
From Christian Gutschwager (gutschwager(AT)math.uni-hannover.de), Feb 10 2010: (Start)
a(n) is also the number of pairs of partitions of n+2 which differ by only one box (for bijection see the first Gutschwager link).
a(n) is also the number of partitions of n with two parts marked.
a(n) is also the number of partitions of n+1 with two different parts marked. (End)
Convolution of A000041 and A008619. - Vaclav Kotesovec, Aug 18 2015
a(n) = P(/2,n), a particular case of P(/k,n) defined as follows: P(/0,n) = A000041(n) and P(/k,n) = P(/k-1, n) + P(/k-1,n-k) + P(/k-1, n-2k) + ... Also, P(/k,n) = the convolution of A000041 and the partitions of n with exactly k parts, and g.f. P(/k,n) = (g.f. for P(n)) * 1/(1-x)...(1-x^k). - Gregory L. Simay, Mar 22 2018
a(n) is also the sum of binomial(D(p),2) in partitions p of (n+3), where D(p)= number of different sizes of parts in p. - Emily Anible, Apr 03 2018
Also partitions of 2*(n+1) with alternating sum 2. Also partitions of 2*(n+1) with reverse-alternating sum -2 or 2. - Gus Wiseman, Jun 21 2021
Define the distance graph of the partitions of n using the distance function in A366156 as follows: two vertices (partitions) share an edge if and only if the distance between the vertices is 2. Then a(n) is the number of edges in the distance graph of the partitions of n. - Clark Kimberling, Oct 12 2023

Examples

			a(3) = 9 because we have 3, 2+1, 2+1', 2'+1, 2'+1', 1+1+1, 1+1+1', 1+1'+1' and 1'+1'+1'.
From _Gus Wiseman_, Jun 22 2021: (Start)
The a(0) = 1 through a(4) = 9 partitions of 2*(n+1) with exactly 2 odd parts:
  (1,1)  (3,1)    (3,3)      (5,3)
         (2,1,1)  (5,1)      (7,1)
                  (3,2,1)    (3,3,2)
                  (4,1,1)    (4,3,1)
                  (2,2,1,1)  (5,2,1)
                             (6,1,1)
                             (3,2,2,1)
                             (4,2,1,1)
                             (2,2,2,1,1)
The a(0) = 1 through a(4) = 9 partitions of 2*(n+1) with alternating sum 2:
  (2)  (3,1)    (4,2)        (5,3)
       (2,1,1)  (2,2,2)      (3,3,2)
                (3,2,1)      (4,3,1)
                (3,1,1,1)    (3,2,2,1)
                (2,1,1,1,1)  (4,2,1,1)
                             (2,2,2,1,1)
                             (3,2,1,1,1)
                             (3,1,1,1,1,1)
                             (2,1,1,1,1,1,1)
(End)
		

References

  • H. Gupta et al., Tables of Partitions. Royal Society Mathematical Tables, Vol. 4, Cambridge Univ. Press, 1958, p. 90.
  • J. Riordan, Combinatorial Identities, Wiley, 1968, p. 199.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

First differences are in A024786.
Third column of Riordan triangle A008951 and of triangle A103923.
The case of reverse-alternating sum 1 or alternating sum 0 is A000041.
The case of reverse-alternating sum -1 or alternating sum 1 is A000070.
The normal case appears to be A004526 or A065033.
The strict case is A096914.
The case of reverse-alternating sum 2 is A120452.
The case of reverse-alternating sum -2 is A344741.
A001700 counts compositions with alternating sum 2.
A035363 counts partitions into even parts.
A058696 counts partitions of 2n.
A103919 counts partitions by sum and alternating sum (reverse: A344612).
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.
Shift of A093695.

Programs

  • Maple
    with(numtheory): etr:= proc(p) local b; b:=proc(n) option remember; local d,j; if n=0 then 1 else add(add(d*p(d), d=divisors(j)) *b(n-j), j=1..n)/n fi end end: a:= etr(n->`if`(n<3,2,1)): seq(a(n), n=0..40); # Alois P. Heinz, Sep 08 2008
  • Mathematica
    CoefficientList[Series[1/((1 - x) (1 - x^2) Product[1 - x^k, {k, 1, 100}]), {x, 0, 100}], x] (* Ben Branman, Mar 07 2012 *)
    etr[p_] := Module[{b}, b[n_] := b[n] = If[n == 0, 1, Sum[Sum[d*p[d], {d, Divisors[j]}]*b[n - j], {j, 1, n}]/n]; b]; a = etr[If[# < 3, 2, 1]&]; Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Apr 09 2014, after Alois P. Heinz *)
    (1/((1 - x) (1 - x^2) QPochhammer[x]) + O[x]^50)[[3]] (* Vladimir Reshetnikov, Nov 22 2016 *)
    Table[Length@IntegerPartitions[n,All,Join[{1,2},Range[n]]],{n,0,15}] (* Robert Price, Jul 28 2020 and Jun 21 2021 *)
    T[n_, 0] := PartitionsP[n];
    T[n_, m_] /; (n >= m (m + 1)/2) := T[n, m] = T[n - m, m - 1] + T[n - m, m];
    T[, ] = 0;
    a[n_] := T[n + 3, 2];
    Table[a[n], {n, 0, 60}] (* Jean-François Alcover, May 30 2021 *)
    ats[y_]:=Sum[(-1)^(i-1)*y[[i]],{i,Length[y]}];Table[Length[Select[IntegerPartitions[n],ats[#]==2&]],{n,0,30,2}] (* Gus Wiseman, Jun 21 2021 *)
  • PARI
    my(x = 'x + O('x^66)); Vec( 1/((1-x)*(1-x^2)*eta(x)) ) \\ Joerg Arndt, Apr 29 2013

Formula

Euler transform of 2 2 1 1 1 1 1...
G.f.: 1/( (1-x) * (1-x^2) * Product_{k>=1} (1-x^k) ).
a(n) = Sum_{j=0..floor(n/2)} A000070(n-2*j), n>=0.
a(n) = A014153(n)/2 + A087787(n)/4 + A000070(n)/4. - Vaclav Kotesovec, Nov 05 2016
a(n) ~ sqrt(3) * exp(Pi*sqrt(2*n/3)) / (4*Pi^2) * (1 + 35*Pi/(24*sqrt(6*n))). - Vaclav Kotesovec, Aug 18 2015, extended Nov 05 2016
a(n) = A120452(n) + A344741(n). - Gus Wiseman, Jun 21 2021

Extensions

More terms from Pab Ter (pabrlos(AT)yahoo.com), May 04 2004
Edited by Emeric Deutsch, Mar 23 2005
More terms from Franklin T. Adams-Watters, Mar 20 2006
Edited by Charles R Greathouse IV, Apr 20 2010

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

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}]
Showing 1-10 of 23 results. Next