cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-10 of 12 results. Next

A242618 Number T(n,k) of partitions of n, where k is the difference between the number of odd parts and the number of even parts, both counted without multiplicity; triangle T(n,k), n>=0, read by rows.

Original entry on oeis.org

1, 1, 1, 0, 1, 1, 2, 2, 1, 1, 1, 4, 2, 1, 1, 2, 3, 3, 2, 1, 8, 3, 3, 2, 4, 6, 5, 5, 4, 13, 8, 4, 1, 5, 5, 11, 13, 7, 1, 11, 20, 14, 9, 2, 1, 6, 13, 17, 26, 11, 3, 1, 22, 31, 27, 15, 5, 2, 12, 18, 34, 44, 18, 7, 4, 40, 47, 51, 23, 11, 5, 16, 36, 56, 72, 34, 11, 1
Offset: 0

Views

Author

Alois P. Heinz, May 19 2014

Keywords

Comments

T(n,0) = A241638(n).
Sum_{k<0} T(n,k) = A241640(n).
Sum_{k<=0} T(n,k) = A241639(n).
Sum_{k>=0} T(n,k) = A241637(n).
Sum_{k>0} T(n,k) = A241636(n).
T(n^2,n) = T(n^2+n,-n) = 1.
T(n^2+n,n) = Sum_{k} T(n,k) = A000041(n).
T(n^2+3*n,-n) = A000712(n).

Examples

			Triangle T(n,k) begins:
: n\k : -3  -2  -1   0   1   2   3 ...
+-----+---------------------------
:  0  :              1;
:  1  :                  1;
:  2  :          1,  0,  1;
:  3  :              1,  2;
:  4  :          2,  1,  1,  1;
:  5  :              4,  2,  1;
:  6  :      1,  2,  3,  3,  2;
:  7  :          1,  8,  3,  3;
:  8  :      2,  4,  6,  5,  5;
:  9  :          4, 13,  8,  4,  1;
: 10  :      5,  5, 11, 13,  7,  1;
: 11  :         11, 20, 14,  9,  2;
: 12  :  1,  6, 13, 17, 26, 11,  3;
: 13  :      1, 22, 31, 27, 15,  5;
: 14  :  2, 12, 18, 34, 44, 18,  7;
		

Crossrefs

Row sums give A000041.
Cf. A240009 (parts counted with multiplicity), A240021 (distinct parts), A242626 (compositions counted without multiplicity).

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
          expand(b(n, i-1)+add(b(n-i*j, i-1)*x^(2*irem(i, 2)-1), j=1..n/i))))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=ldegree(p)..degree(p)))(b(n$2)):
    seq(T(n), n=0..20);
  • Mathematica
    b[n_, i_] := b[n, i] = If[n == 0, 1, If[i < 1, 0, Expand[b[n, i - 1] + Sum[b[n - i*j, i - 1]*x^(2*Mod[i, 2] - 1), {j, 1, n/i}]]]]; T[n_] := Function[p, Table[Coefficient[p, x, i], {i, Exponent[p, x, Min], Exponent[p, x]}]][b[n, n]]; Table[T[n], {n, 0, 20}] // Flatten (* Jean-François Alcover, Dec 12 2016 after Alois P. Heinz *)

A242821 Number of compositions of n with equal number of even and odd parts, both counted without multiplicity.

Original entry on oeis.org

1, 0, 0, 2, 3, 11, 14, 33, 43, 82, 141, 260, 514, 1049, 2321, 4789, 10454, 21735, 46213, 94782, 196060, 398662, 810178, 1631089, 3278372, 6556096, 13088339, 26063238, 51824061, 102926784, 204239173, 405087125, 803109813, 1592179369, 3156298826, 6258390137
Offset: 0

Views

Author

Alois P. Heinz, May 23 2014

Keywords

Examples

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

Crossrefs

Column k=0 of A242626.
Cf. A098123 (counted with multiplicity).

A242836 Number of compositions of n with difference -5 between the number of odd parts and the number of even parts, both counted without multiplicity.

Original entry on oeis.org

120, 0, 480, 0, 1800, 0, 5580, 0, 16224, 0, 43884, 0, 111828, 5040, 295752, 90720, 918144, 836640, 3717552, 5937840, 18033888, 36198000, 92552004, 199157040, 468066444, 1018608720, 2283162630, 4928557200, 10715965290, 22825049040, 48562957800, 102021279960
Offset: 30

Views

Author

Alois P. Heinz, May 23 2014

Keywords

Comments

First odd term is a(114) = 348277353263626685406276711.

Examples

			a(30) = 120 = 5!: all permutations of {2,4,6,8,10}.
		

Crossrefs

Column k=-5 of A242626.

A242837 Number of compositions of n with difference -4 between the number of odd parts and the number of even parts, both counted without multiplicity.

Original entry on oeis.org

24, 0, 84, 0, 288, 0, 822, 0, 2226, 0, 5304, 720, 15034, 10680, 55624, 84360, 265200, 527640, 1342608, 2886960, 6673176, 14433240, 31725930, 67718568, 144265370, 302771208, 631156708, 1303769496, 2673673704, 5447789784, 11028089996, 22211684328, 44491303391
Offset: 20

Views

Author

Alois P. Heinz, May 23 2014

Keywords

Comments

First odd term is a(52) = 44491303391.

Examples

			a(20) = 24 = 4!: all permutations of {2,4,6,8}.
		

Crossrefs

Column k=-4 of A242626.

A242838 Number of compositions of n with difference -3 between the number of odd parts and the number of even parts, both counted without multiplicity.

Original entry on oeis.org

6, 0, 18, 0, 56, 0, 146, 0, 312, 120, 1037, 1440, 4658, 9624, 23906, 52524, 117032, 255732, 542186, 1150920, 2370395, 4902948, 9912558, 20084700, 40045005, 79902108, 157676536, 310969848, 608833717, 1190681692, 2317419418, 4505327884, 8732462296, 16911676140
Offset: 12

Views

Author

Alois P. Heinz, May 23 2014

Keywords

Examples

			a(12) = 6 = 3!: all permutations of {2,4,6}.
		

Crossrefs

Column k=-3 of A242626.

A242839 Number of compositions of n with difference -2 between the number of odd parts and the number of even parts, both counted without multiplicity.

Original entry on oeis.org

2, 0, 5, 0, 14, 0, 22, 24, 104, 228, 518, 1272, 2621, 5986, 11836, 25396, 49077, 100200, 192678, 381724, 730806, 1424956, 2727666, 5271456, 10111091, 19503830, 37551786, 72600610, 140531739, 273027876, 531953163, 1040051736, 2040532257, 4017104634, 7935847124
Offset: 6

Views

Author

Alois P. Heinz, May 23 2014

Keywords

Examples

			a(6) = 2: [2,4], [4,2].
a(8) = 5: [2,2,4], [2,4,2], [4,2,2], [2,6], [6,2].
a(13) = 24 = 4!: all permutations of {1,2,4,6}.
		

Crossrefs

Column k=-2 of A242626.

A242840 Number of compositions of n with difference -1 between the number of odd parts and the number of even parts, both counted without multiplicity.

Original entry on oeis.org

1, 0, 2, 0, 2, 6, 15, 44, 74, 202, 351, 766, 1301, 2626, 4677, 8993, 16466, 31671, 60266, 116751, 229180, 452667, 905627, 1815394, 3673666, 7429123, 15109955, 30696510, 62512866, 127140993, 258745131, 525845884, 1068309682, 2167462318, 4393853912, 8896007640
Offset: 2

Views

Author

Alois P. Heinz, May 23 2014

Keywords

Examples

			a(2) = 1: [2].
a(4) = 2: [2,2], [4].
a(6) = 2: [2,2,2], [6].
a(7) = 6: [1,2,4], [1,4,2], [2,1,4], [2,4,1], [4,1,2], [4,2,1].
a(8) = 15: [2,2,2,2], [1,1,2,4], [1,1,4,2], [1,2,1,4], [1,2,4,1], [1,4,1,2], [1,4,2,1], [2,1,1,4], [2,1,4,1], [2,4,1,1], [4,1,1,2], [4,1,2,1], [4,2,1,1], [4,4], [8].
		

Crossrefs

Column k=-1 of A242626.

A242841 Number of compositions of n with difference 1 between the number of odd parts and the number of even parts, both counted without multiplicity.

Original entry on oeis.org

1, 1, 2, 1, 2, 8, 14, 45, 99, 230, 451, 953, 1798, 3503, 6683, 12693, 24209, 46155, 89200, 172767, 338255, 664453, 1317945, 2620363, 5243700, 10509348, 21141700, 42578221, 85897588, 173380086, 350184780, 707320136, 1428681390, 2885015407, 5823971576
Offset: 1

Views

Author

Alois P. Heinz, May 23 2014

Keywords

Examples

			a(1) = 1: [1].
a(2) = 1: [1,1].
a(3) = 2: [1,1,1], [3].
a(4) = 1: [1,1,1,1].
a(5) = 2: [1,1,1,1,1], [5].
a(6) = 8: [1,1,1,1,1,1], [1,2,3], [1,3,2], [2,1,3], [2,3,1], [3,1,2], [3,2,1], [3,3].
a(7) = 14: [1,1,1,1,1,1,1], [1,1,2,3], [1,1,3,2], [1,2,1,3], [1,2,3,1], [1,3,1,2], [1,3,2,1], [2,1,1,3], [2,1,3,1], [2,3,1,1], [3,1,1,2], [3,1,2,1], [3,2,1,1], [7].
		

Crossrefs

Column k=1 of A242626.

A242842 Number of compositions of n with difference 2 between the number of odd parts and the number of even parts, both counted without multiplicity.

Original entry on oeis.org

2, 3, 6, 11, 20, 25, 41, 85, 148, 355, 751, 1701, 3756, 8255, 17513, 37038, 76349, 156618, 317591, 639142, 1279302, 2546711, 5057675, 10010975, 19788607, 39058684, 77055159, 151930328, 299600229, 590849561, 1165782514, 2301229945, 4545782370, 8985884632
Offset: 4

Views

Author

Alois P. Heinz, May 23 2014

Keywords

Examples

			a(4) = 2: [1,3], [3,1].
a(5) = 3: [1,1,3], [1,3,1], [3,1,1].
a(6) = 6: [1,1,1,3], [1,1,3,1], [1,3,1,1], [3,1,1,1], [1,5], [5,1].
		

Crossrefs

Column k=2 of A242626.

A242843 Number of compositions of n with difference 3 between the number of odd parts and the number of even parts, both counted without multiplicity.

Original entry on oeis.org

6, 12, 26, 54, 104, 194, 357, 590, 1012, 1814, 3137, 5990, 11400, 22864, 46715, 97788, 206639, 438654, 930092, 1969748, 4147412, 8696479, 18137872, 37638970, 77738200, 159832004, 327315948, 667736364, 1357690562, 2751972885, 5562836882, 11216402410
Offset: 9

Views

Author

Alois P. Heinz, May 23 2014

Keywords

Examples

			a(9) = 6 = 3!: all permutations of {1,3,5}.
		

Crossrefs

Column k=3 of A242626.
Showing 1-10 of 12 results. Next