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-8 of 8 results.

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

Original entry on oeis.org

1, 0, 1, 0, 0, 2, 0, 0, 1, 2, 0, 0, 1, 1, 3, 0, 0, 0, 2, 2, 3, 0, 0, 0, 0, 5, 2, 4, 0, 0, 0, 0, 2, 6, 3, 4, 0, 0, 0, 0, 2, 3, 9, 3, 5, 0, 0, 0, 0, 0, 4, 7, 10, 4, 5, 0, 0, 0, 0, 0, 0, 11, 8, 13, 4, 6, 0, 0, 0, 0, 0, 0, 4, 15, 12, 14, 5, 6, 0, 0, 0, 0, 0, 0, 3, 7, 25, 13, 17, 5, 7
Offset: 0

Views

Author

Gus Wiseman, Oct 10 2022

Keywords

Comments

We define the half-alternating sum of a sequence (A, B, C, D, E, F, G, ...) to be A + B - C - D + E + F - G - ...

Examples

			Triangle begins:
  1
  0  1
  0  0  2
  0  0  1  2
  0  0  1  1  3
  0  0  0  2  2  3
  0  0  0  0  5  2  4
  0  0  0  0  2  6  3  4
  0  0  0  0  2  3  9  3  5
  0  0  0  0  0  4  7 10  4  5
  0  0  0  0  0  0 11  8 13  4  6
  0  0  0  0  0  0  4 15 12 14  5  6
  0  0  0  0  0  0  3  7 25 13 17  5  7
Row n = 9 counts the following partitions:
  (3222)       (333)      (432)     (441)  (9)
  (22221)      (3321)     (522)     (531)  (54)
  (21111111)   (4221)     (4311)    (621)  (63)
  (111111111)  (32211)    (5211)    (711)  (72)
               (222111)   (6111)           (81)
               (2211111)  (33111)
               (3111111)  (42111)
                          (51111)
                          (321111)
                          (411111)
		

Crossrefs

Row sums are A000041.
Number of nonzero entries in row n appears to be A004525(n+1).
Last entry of row n is A008619(n).
Column sums appear to be A029862.
The central column is A035363, skew A035544.
For original alternating sum we have A344651, ordered A097805.
The skew-alternating version is A357638.
The central column of the reverse is A357639, skew A357640.
The ordered version (compositions) is A357645, skew A357646.
The reverse version is A357704, skew A357705.
A351005 = alternately equal and unequal partitions, compositions A357643.
A351006 = alternately unequal and equal partitions, compositions A357644.
A357621 gives half-alternating sum of standard compositions, skew A357623.
A357629 gives half-alternating sum of prime indices, skew A357630.
A357633 gives half-alternating sum of Heinz partition, skew A357634.

Programs

  • Maple
    b:= proc(n, i, s, t) option remember; `if`(n=0, x^s, `if`(i<1, 0,
          b(n, i-1, s, t)+b(n-i, min(n-i, i), s+`if`(t<2, i, -i), irem(t+1, 4))))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=-n..n, 2))(b(n$2, 0$2)):
    seq(T(n), n=0..15);  # Alois P. Heinz, Oct 12 2022
  • Mathematica
    halfats[f_]:=Sum[f[[i]]*(-1)^(1+Ceiling[i/2]),{i,Length[f]}];
    Table[Length[Select[IntegerPartitions[n],halfats[#]==k&]],{n,0,12},{k,-n,n,2}]

Formula

Conjecture: The column sums are A029862.

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

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 0, 3, 1, 1, 0, 0, 1, 4, 1, 1, 0, 0, 1, 4, 4, 1, 1, 0, 0, 0, 4, 5, 4, 1, 1, 0, 0, 0, 1, 10, 5, 4, 1, 1, 0, 0, 0, 1, 5, 13, 5, 4, 1, 1, 0, 0, 0, 0, 4, 13, 14, 5, 4, 1, 1, 0, 0, 0, 0, 1, 13, 17, 14, 5, 4, 1, 1
Offset: 0

Views

Author

Gus Wiseman, Oct 10 2022

Keywords

Comments

We define the skew-alternating sum of a sequence (A, B, C, D, E, F, G, ...) to be A - B - C + D + E - F - G + ....

Examples

			Triangle begins:
  1
  0  1
  0  1  1
  0  1  1  1
  0  0  3  1  1
  0  0  1  4  1  1
  0  0  1  4  4  1  1
  0  0  0  4  5  4  1  1
  0  0  0  1 10  5  4  1  1
  0  0  0  1  5 13  5  4  1  1
  0  0  0  0  4 13 14  5  4  1  1
  0  0  0  0  1 13 17 14  5  4  1  1
  0  0  0  0  1  5 28 18 14  5  4  1  1
Row n = 7 counts the following partitions:
  .  .  .  (322)      (43)      (52)     (61)  (7)
           (331)      (421)     (511)
           (2221)     (3211)    (4111)
           (1111111)  (22111)   (31111)
                      (211111)
		

Crossrefs

Row sums are A000041.
Number of nonzero entries in row n appears to be A004396(n+1).
First nonzero entry of each row appears to converge to A146325.
The central column is A035544, half A035363.
Column sums appear to be A298311.
For original alternating sum we have A344651, ordered A097805.
The half-alternating version is A357637.
The ordered version (compositions) is A357646, half A357645.
The reverse version is A357705, half A357704.
A351005 = alternately equal and unequal partitions, compositions A357643.
A351006 = alternately unequal and equal partitions, compositions A357644.
A357621 gives half-alternating sum of standard compositions, skew A357623.
A357629 gives half-alternating sum of prime indices, skew A357630.
A357633 gives half-alternating sum of Heinz partition, skew A357634.

Programs

  • Mathematica
    skats[f_]:=Sum[f[[i]]*(-1)^(1+Ceiling[(i+1)/2]),{i,Length[f]}];
    Table[Length[Select[IntegerPartitions[n],skats[#]==k&]],{n,0,12},{k,-n,n,2}]

Formula

Conjecture: The columns are palindromes with sums A298311.

A357643 Number of integer compositions of n into parts that are alternately equal and unequal.

Original entry on oeis.org

1, 1, 2, 1, 3, 3, 5, 5, 9, 7, 17, 14, 28, 25, 49, 42, 87, 75, 150, 132, 266, 226, 466, 399, 810, 704, 1421, 1223, 2488, 2143, 4352, 3759, 7621, 6564, 13339, 11495, 23339, 20135, 40852, 35215, 71512, 61639, 125148, 107912, 219040, 188839, 383391, 330515, 670998
Offset: 0

Views

Author

Gus Wiseman, Oct 12 2022

Keywords

Examples

			The a(1) = 1 through a(8) = 9 compositions:
  (1)  (2)   (3)  (4)    (5)    (6)     (7)      (8)
       (11)       (22)   (113)  (33)    (115)    (44)
                  (112)  (221)  (114)   (223)    (116)
                                (1122)  (331)    (224)
                                (2211)  (11221)  (332)
                                                 (1133)
                                                 (3311)
                                                 (22112)
                                                 (112211)
		

Crossrefs

The even-length version is A003242, ranked by A351010, partitions A035457.
Without equal relations we have A016116, equal only A001590 (apparently).
The version for partitions is A351005.
The opposite version is A357644, partitions A351006.
A011782 counts compositions.
A357621 gives half-alternating sum of standard compositions, skew A357623.
A357645 counts compositions by half-alternating sum, skew A357646.

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],And@@Table[#[[i]]==#[[i+1]],{i,1,Length[#]-1,2}]&&And@@Table[#[[i]]!=#[[i+1]],{i,2,Length[#]-1,2}]&]],{n,0,15}]
  • PARI
    C_x(N) = {my(x='x+O('x^N), h=(1+sum(k=1,N, (x^k)/(1+x^(2*k))))/(1-sum(k=1,N, (x^(2*k))/(1+x^(2*k))))); Vec(h)}
    C_x(50) \\ John Tyler Rascoe, May 28 2024

Formula

G.f.: (1 + Sum_{k>0} (x^k)/(1 + x^(2*k)))/(1 - Sum_{k>0} (x^(2*k))/(1 + x^(2*k))). - John Tyler Rascoe, May 28 2024

Extensions

More terms from Alois P. Heinz, Oct 12 2022

A357644 Number of integer compositions of n into parts that are alternately unequal and equal.

Original entry on oeis.org

1, 1, 1, 3, 4, 7, 8, 13, 17, 25, 30, 44, 58, 77, 98, 142, 176, 245, 311, 426, 548, 758, 952, 1319, 1682, 2308, 2934, 4059, 5132, 7087, 9008, 12395, 15757, 21728, 27552, 38019, 48272, 66515, 84462, 116467, 147812, 203825, 258772, 356686, 452876, 624399, 792578
Offset: 0

Views

Author

Gus Wiseman, Oct 14 2022

Keywords

Examples

			The a(1) = 1 through a(7) = 13 compositions:
  (1)  (2)  (3)   (4)    (5)    (6)     (7)
            (12)  (13)   (14)   (15)    (16)
            (21)  (31)   (23)   (24)    (25)
                  (211)  (32)   (42)    (34)
                         (41)   (51)    (43)
                         (122)  (411)   (52)
                         (311)  (1221)  (61)
                                (2112)  (133)
                                        (322)
                                        (511)
                                        (2113)
                                        (3112)
                                        (12211)
		

Crossrefs

Without equal relations we have A000213, equal only A027383.
Even-length opposite: A003242, ranked by A351010, partitions A035457.
The version for partitions is A351006.
The opposite version is A357643, partitions A351005.
A011782 counts compositions.
A357621 gives half-alternating sum of standard compositions, skew A357623.
A357645 counts compositions by half-alternating sum, skew A357646.

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],And@@Table[#[[i]]==#[[i+1]],{i,2,Length[#]-1,2}]&&And@@Table[#[[i]]!=#[[i+1]],{i,1,Length[#]-1,2}]&]],{n,0,10}]

Extensions

More terms from Alois P. Heinz, Oct 19 2022

A035544 Number of partitions of n with equal number of parts congruent to each of 1 and 3 (mod 4).

Original entry on oeis.org

1, 0, 1, 0, 3, 0, 4, 0, 10, 0, 13, 0, 28, 0, 37, 0, 72, 0, 96, 0, 172, 0, 230, 0, 391, 0, 522, 0, 846, 0, 1129, 0, 1766, 0, 2348, 0, 3564, 0, 4722, 0, 6992, 0, 9226, 0, 13371, 0, 17568, 0, 25006, 0, 32708, 0, 45817, 0, 59668, 0, 82430, 0, 106874, 0, 145830, 0, 188260, 0
Offset: 0

Views

Author

Keywords

Comments

From Gus Wiseman, Oct 12 2022: (Start)
Also the number of integer partitions of n whose skew-alternating sum is 0, where we define the skew-alternating sum of a sequence (A, B, C, D, E, F, G, ...) to be A - B - C + D + E - F - G + ... These are the conjugates of the partitions described in the name. For example, the a(0) = 1 through a(8) = 10 partitions are:
() . (11) . (22) . (33) . (44)
(211) (321) (422)
(1111) (2211) (431)
(111111) (2222)
(3221)
(3311)
(22211)
(221111)
(2111111)
(11111111)
The ordered version (compositions) is A138364
These partitions are ranked by A357636, reverse A357632.
The reverse version is A357640 (aerated).
(End)

Examples

			From _Gus Wiseman_, Oct 12 2022: (Start)
The a(0) = 1 through a(8) = 10 partitions:
  ()  .  (2)  .  (4)   .  (6)    .  (8)
                 (22)     (42)      (44)
                 (31)     (222)     (53)
                          (321)     (62)
                                    (71)
                                    (422)
                                    (431)
                                    (2222)
                                    (3221)
                                    (3311)
(End)
		

Crossrefs

The case with at least one odd part is A035550.
Removing zeros gives A035594.
Central column k=0 of A357638.
These partitions are ranked by A357707.
A000041 counts integer partitions.
A344651 counts partitions by alternating sum, ordered A097805.

Programs

  • Mathematica
    skats[f_]:=Sum[f[[i]]*(-1)^(1+Ceiling[(i+1)/2]),{i,Length[f]}];
    Table[Length[Select[IntegerPartitions[n],skats[#]==0&]],{n,0,30}] (* Gus Wiseman,Oct 12 2022 *)

Extensions

More terms from David W. Wilson

A357645 Triangle read by rows where T(n,k) is the number of integer compositions of n with half-alternating sum k, where k ranges from -n to n in steps of 2.

Original entry on oeis.org

1, 0, 1, 0, 0, 2, 0, 0, 1, 3, 0, 0, 2, 2, 4, 0, 0, 3, 5, 3, 5, 0, 0, 4, 8, 10, 4, 6, 0, 0, 5, 11, 18, 18, 5, 7, 0, 0, 6, 14, 28, 36, 30, 6, 8, 0, 0, 7, 17, 41, 63, 65, 47, 7, 9, 0, 0, 8, 20, 58, 104, 126, 108, 70, 8, 10, 0, 0, 9, 23, 80, 164, 230, 230, 168, 100, 9, 11
Offset: 0

Views

Author

Gus Wiseman, Oct 12 2022

Keywords

Comments

We define the half-alternating sum of a sequence (A, B, C, D, E, F, G, ...) to be A + B - C - D + E + F - G - ...

Examples

			Triangle begins:
   1
   0   1
   0   0   2
   0   0   1   3
   0   0   2   2   4
   0   0   3   5   3   5
   0   0   4   8  10   4   6
   0   0   5  11  18  18   5   7
   0   0   6  14  28  36  30   6   8
   0   0   7  17  41  63  65  47   7   9
   0   0   8  20  58 104 126 108  70   8  10
Row n = 6 counts the following compositions:
  (114)   (123)    (132)     (141)  (6)
  (1113)  (213)    (222)     (231)  (15)
  (1122)  (1212)   (312)     (321)  (24)
  (1131)  (1221)   (1311)    (411)  (33)
          (2112)   (2211)           (42)
          (2121)   (3111)           (51)
          (11121)  (11112)
          (11211)  (12111)
                   (21111)
                   (111111)
		

Crossrefs

Row sums are A011782.
For original alternating sum we have A097805, unordered A344651.
Column k = n-4 appears to be A177787.
The case of partitions is A357637, skew A357638.
The central column k=0 is A357641 (aerated).
The skew-alternating version is A357646.
The reverse version for partitions is A357704, skew A357705.
A351005 = alternately equal and unequal partitions, compositions A357643.
A351006 = alternately unequal and equal partitions, compositions A357644.
A357621 gives half-alternating sum of standard compositions, skew A357623.
A357629 gives half-alternating sum of prime indices, skew A357630.
A357633 gives half-alternating sum of Heinz partition, skew A357634.

Programs

  • Mathematica
    halfats[f_]:=Sum[f[[i]]*(-1)^(1+Ceiling[i/2]),{i,Length[f]}];
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],halfats[#]==k&]],{n,0,10},{k,-n,n,2}]

A357704 Triangle read by rows where T(n,k) is the number of reversed integer partitions of n with half-alternating sum k, where k ranges from -n to n in steps of 2.

Original entry on oeis.org

1, 0, 1, 0, 0, 2, 0, 0, 1, 2, 0, 0, 2, 0, 3, 0, 0, 2, 2, 0, 3, 0, 0, 3, 1, 3, 0, 4, 0, 0, 3, 2, 4, 2, 0, 4, 0, 0, 4, 2, 6, 2, 3, 0, 5, 0, 0, 4, 3, 5, 7, 3, 3, 0, 5, 0, 0, 5, 3, 8, 4, 10, 2, 4, 0, 6, 0, 0, 5, 4, 8, 6, 11, 9, 3, 4, 0, 6, 0, 0, 6, 4, 11, 5, 15, 8, 13, 3, 5, 0, 7
Offset: 0

Views

Author

Gus Wiseman, Oct 10 2022

Keywords

Comments

We define the half-alternating sum of a sequence (A, B, C, D, E, F, G, ...) to be A + B - C - D + E + F - G - ...

Examples

			Triangle begins:
  1
  0  1
  0  0  2
  0  0  1  2
  0  0  2  0  3
  0  0  2  2  0  3
  0  0  3  1  3  0  4
  0  0  3  2  4  2  0  4
  0  0  4  2  6  2  3  0  5
  0  0  4  3  5  7  3  3  0  5
  0  0  5  3  8  4 10  2  4  0  6
  0  0  5  4  8  6 11  9  3  4  0  6
  0  0  6  4 11  5 15  8 13  3  5  0  7
  0  0  6  5 11  8 13 19 10 13  4  5  0  7
  0  0  7  5 14  8 19 13 25  9 17  4  6  0  8
  0  0  7  6 14 11 19 17 29 23 13 18  5  6  0  8
Row n = 7 counts the following reversed partitions:
  .  .  (115)   (124)   (133)      (11113)   .  (7)
        (1114)  (1222)  (223)      (111112)     (16)
        (1123)          (11122)                 (25)
                        (1111111)               (34)
		

Crossrefs

Row sums are A000041.
Last entry of row n is A008619(n).
The central column in the non-reverse case is A035363, skew A035544.
For original reverse-alternating sum we have A344612.
For original alternating sum we have A344651, ordered A097805.
The non-reverse version is A357637, skew A357638.
The central column is A357639, skew A357640.
The non-reverse ordered version (compositions) is A357645, skew A357646.
The skew-alternating version is A357705.
A351005 = alternately equal and unequal partitions, compositions A357643.
A351006 = alternately unequal and equal partitions, compositions A357644.
A357621 gives half-alternating sum of standard compositions, skew A357623.
A357629 gives half-alternating sum of prime indices, skew A357630.
A357633 gives half-alternating sum of Heinz partition, skew A357634.

Programs

  • Mathematica
    halfats[f_]:=Sum[f[[i]]*(-1)^(1+Ceiling[i/2]),{i,Length[f]}];
    Table[Length[Select[Reverse/@IntegerPartitions[n],halfats[#]==k&]],{n,0,15},{k,-n,n,2}]

A357705 Triangle read by rows where T(n,k) is the number of reversed integer partitions of n with skew-alternating sum k, where k ranges from -n to n in steps of 2.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 2, 0, 1, 0, 2, 2, 0, 1, 0, 3, 1, 2, 0, 1, 0, 3, 2, 3, 2, 0, 1, 0, 4, 2, 4, 1, 3, 0, 1, 0, 4, 3, 3, 6, 2, 3, 0, 1, 0, 5, 3, 5, 3, 7, 2, 4, 0, 1, 0, 5, 4, 5, 4, 9, 7, 3, 4, 0, 1, 0, 6, 4, 7, 3, 12, 5, 10, 3, 5, 0, 1
Offset: 0

Views

Author

Gus Wiseman, Oct 10 2022

Keywords

Comments

We define the skew-alternating sum of a sequence (A, B, C, D, E, F, G, ...) to be A - B - C + D + E - F - G + ...

Examples

			Triangle begins:
  1
  0  1
  0  1  1
  0  2  0  1
  0  2  2  0  1
  0  3  1  2  0  1
  0  3  2  3  2  0  1
  0  4  2  4  1  3  0  1
  0  4  3  3  6  2  3  0  1
  0  5  3  5  3  7  2  4  0  1
  0  5  4  5  4  9  7  3  4  0  1
  0  6  4  7  3 12  5 10  3  5  0  1
  0  6  5  7  5 10 16  7 11  4  5  0  1
  0  7  5  9  5 14 11 18  7 14  4  6  0  1
Row n = 7 counts the following reversed partitions:
  .  (16)   (25)   (34)       (1123)  (1114)   .  (7)
     (115)  (223)  (1222)             (11113)
     (124)         (111112)           (11122)
     (133)         (1111111)
		

Crossrefs

Row sums are A000041.
First nonzero entry of each row is A004526.
The central column is A357640, half A357639.
For original alternating sum we have A344651, ordered A097805.
The half-alternating version is A357704.
The ordered non-reverse version (compositions) is A357646, half A357645.
The non-reverse version is A357638, half A357637.
A351005 = alternately equal and unequal partitions, compositions A357643.
A351006 = alternately unequal and equal partitions, compositions A357644.
A357621 gives half-alternating sum of standard compositions, skew A357623.
A357629 gives half-alternating sum of prime indices, skew A357630.
A357633 gives half-alternating sum of Heinz partition, skew A357634.

Programs

  • Mathematica
    skats[f_]:=Sum[f[[i]]*(-1)^(1+Ceiling[(i+1)/2]),{i,Length[f]}];
    Table[Length[Select[Reverse/@IntegerPartitions[n],skats[#]==k&]],{n,0,11},{k,-n,n,2}]
Showing 1-8 of 8 results.