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

A241638 Number of partitions p of n such that (number of even numbers in p) = (number of odd numbers in p).

Original entry on oeis.org

1, 0, 0, 1, 1, 4, 3, 8, 6, 13, 11, 20, 17, 31, 34, 47, 56, 78, 103, 125, 167, 203, 281, 315, 433, 487, 673, 745, 989, 1101, 1472, 1623, 2116, 2386, 3052, 3430, 4347, 4948, 6168, 7104, 8673, 10068, 12210, 14234, 17047, 20007, 23671, 27869, 32739, 38609, 45010
Offset: 0

Views

Author

Clark Kimberling, Apr 27 2014

Keywords

Comments

Each number in p is counted once, regardless of its multiplicity.

Examples

			a(6) counts these 3 partitions:  411, 2211, 21111.
		

Crossrefs

Programs

  • Mathematica
    z = 30; f[n_] := f[n] = IntegerPartitions[n]; s0[p_] := Count[Mod[DeleteDuplicates[p], 2],   0];
    s1[p_] := Count[Mod[DeleteDuplicates[p], 2], 1];
    Table[Count[f[n], p_ /; s0[p] < s1[p]], {n, 0, z}]  (* A241636 *)
    Table[Count[f[n], p_ /; s0[p] <= s1[p]], {n, 0, z}] (* A241637 *)
    Table[Count[f[n], p_ /; s0[p] == s1[p]], {n, 0, z}] (* A241638 *)
    Table[Count[f[n], p_ /; s0[p] >= s1[p]], {n, 0, z}] (* A241639 *)
    Table[Count[f[n], p_ /; s0[p] > s1[p]], {n, 0, z}]  (* A241640 *)

Formula

a(n) = A241637(n) - A241636(n) = A241639(n) - A241640(n) for n >= 0.
a(n) + A241636(n) + A241640(n) = A000041(n) for n >= 0.
a(n) = A242618(n,0). - Alois P. Heinz, May 19 2014

A240009 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; triangle T(n,k), n>=0, -floor(n/2)+(n mod 2)<=k<=n, read by rows.

Original entry on oeis.org

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

Views

Author

Alois P. Heinz, Mar 30 2014

Keywords

Comments

T(n,k) = T(n+k,-k).
Sum_{k=-floor(n/2)+(n mod 2)..-1} T(n,k) = A108949(n).
Sum_{k=-floor(n/2)+(n mod 2)..0} T(n,k) = A171966(n).
Sum_{k=1..n} T(n,k) = A108950(n).
Sum_{k=0..n} T(n,k) = A130780(n).
Sum_{k=-1..1} T(n,k) = A239835(n).
Sum_{k<>0} T(n,k) = A171967(n).
T(n,-1) + T(n,1) = A239833(n).
Sum_{k=-floor(n/2)+(n mod 2)..n} k * T(n,k) = A209423(n).
Sum_{k=-floor(n/2)+(n mod 2)..n} (-1)^k*T(n,k) = A081362(n) = (-1)^n*A000700(n).

Examples

			T(5,-1) = 1: [2,2,1].
T(5,0) = 2: [4,1], [3,2].
T(5,1) = 1: [5].
T(5,2) = 1: [2,1,1,1].
T(5,3) = 1: [3,1,1].
T(5,5) = 1: [1,1,1,1,1].
Triangle T(n,k) begins:
: n\k : -5 -4 -3 -2 -1  0  1  2  3  4  5  6  7  8  9 10 ...
+-----+----------------------------------------------------
:  0  :                 1;
:  1  :                    1;
:  2  :              1, 0, 0, 1;
:  3  :                 1, 1, 0, 1;
:  4  :           1, 1, 0, 1, 1, 0, 1;
:  5  :              1, 2, 1, 1, 1, 0, 1;
:  6  :        1, 1, 1, 1, 2, 2, 1, 1, 0, 1;
:  7  :           1, 2, 3, 2, 2, 2, 1, 1, 0, 1;
:  8  :     1, 1, 2, 2, 2, 4, 3, 2, 2, 1, 1, 0, 1;
:  9  :        1, 2, 4, 5, 3, 4, 4, 2, 2, 1, 1, 0, 1;
: 10  :  1, 1, 2, 3, 3, 5, 7, 5, 4, 4, 2, 2, 1, 1, 0, 1;
		

Crossrefs

Row sums give A000041.
T(2n,n) gives A002865.
T(4n,2n) gives A182746.
T(4n+2,2n+1) gives A182747.
Row lengths give A016777(floor(n/2)).
Cf. A240021 (the same for partitions into distinct parts), A242618 (the same for parts counted without multiplicity).

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
          expand(b(n, i-1)+`if`(i>n, 0, b(n-i, i)*x^(2*irem(i, 2)-1)))))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=ldegree(p)..degree(p)))(b(n$2)):
    seq(T(n), n=0..14);
  • Mathematica
    b[n_, i_] := b[n, i] = If[n == 0, 1, If[i<1, 0, b[n, i-1] + If[i>n, 0, b[n-i, i]*x^(2*Mod[i, 2]-1)]]]; T[n_] := (degree = Exponent[b[n, n], x]; ldegree = -Exponent[b[n, n] /. x -> 1/x, x]; Table[Coefficient[b[n, n], x, i], {i, ldegree, degree}]); Table[T[n], {n, 0, 14}] // Flatten (* Jean-François Alcover, Jan 06 2015, translated from Maple *)
  • PARI
    N=20; q='q+O('q^N);
    e(n) = if(n%2!=0, u, 1/u);
    gf = 1 / prod(n=1,N, 1 - e(n)*q^n );
    V = Vec( gf );
    { for (j=1, #V,  \\ print triangle, including leading zeros
        for (i=0, N-j, print1("   "));  \\ padding
        for (i=-j+1, j-1, print1(polcoeff(V[j], i, u),", "));
        print();
    ); }
    /* Joerg Arndt, Mar 31 2014 */

Formula

G.f.: 1 / prod(n>=1, 1 - e(n)*q^n ) = 1 + sum(n>=1, e(n)*q^n / prod(k=1..n, 1-e(k)*q^k) ) where e(n) = u if n odd, otherwise 1/u; see Pari program. [Joerg Arndt, Mar 31 2014]

A242626 Number T(n,k) of compositions 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, 2, 2, 2, 3, 1, 2, 11, 2, 3, 2, 2, 14, 8, 6, 6, 33, 14, 11, 5, 15, 43, 45, 20, 44, 82, 99, 25, 6, 14, 74, 141, 230, 41, 12, 202, 260, 451, 85, 26, 6, 22, 351, 514, 953, 148, 54, 24, 766, 1049, 1798, 355, 104, 18, 104, 1301, 2321, 3503, 751, 194
Offset: 0

Views

Author

Alois P. Heinz, May 19 2014

Keywords

Comments

T(n^2,n) = T(n^2+n,-n) = n! = A000142(n) for n>=0.

Examples

			T(8,-1) = 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].
Triangle T(n,k) begins:
: n\k : -3   -2    -1     0     1    2    3 ...
+-----+------------------------------------
:  0  :                   1;
:  1  :                         1;
:  2  :             1,    0,    1;
:  3  :                   2,    2;
:  4  :             2,    3,    1,   2;
:  5  :                  11,    2,   3;
:  6  :       2,    2,   14,    8,   6;
:  7  :             6,   33,   14,  11;
:  8  :       5,   15,   43,   45,  20;
:  9  :            44,   82,   99,  25,   6;
: 10  :      14,   74,  141,  230,  41,  12;
: 11  :           202,  260,  451,  85,  26;
: 12  :  6,  22,  351,  514,  953, 148,  54;
: 13  :      24,  766, 1049, 1798, 355, 104;
: 14  : 18, 104, 1301, 2321, 3503, 751, 194;
		

Crossrefs

Row sums give A011782.
Cf. A242498 (compositions with multiplicity), A242618 (partitions without multiplicity).

Programs

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

A241636 Number of partitions p of n such that (number of even numbers in p) < (number of odd numbers in p).

Original entry on oeis.org

0, 1, 1, 2, 2, 3, 5, 6, 10, 13, 21, 25, 40, 47, 69, 85, 118, 142, 192, 236, 310, 381, 485, 606, 761, 949, 1168, 1462, 1793, 2230, 2697, 3358, 4040, 4987, 5967, 7348, 8746, 10688, 12675, 15403, 18247, 22028, 25995, 31236, 36798, 43963, 51706, 61487, 72197
Offset: 0

Views

Author

Clark Kimberling, Apr 27 2014

Keywords

Comments

Each number in p is counted once, regardless of its multiplicity.

Examples

			a(6) counts these 5 partitions:  51, 33, 321, 3111, 111111.
		

Crossrefs

Programs

  • Mathematica
    z = 30; f[n_] := f[n] = IntegerPartitions[n]; s0[p_] := Count[Mod[DeleteDuplicates[p], 2],   0];
    s1[p_] := Count[Mod[DeleteDuplicates[p], 2], 1];
    Table[Count[f[n], p_ /; s0[p] < s1[p]], {n, 0, z}]  (* A241636 *)
    Table[Count[f[n], p_ /; s0[p] <= s1[p]], {n, 0, z}] (* A241637 *)
    Table[Count[f[n], p_ /; s0[p] == s1[p]], {n, 0, z}] (* A241638 *)
    Table[Count[f[n], p_ /; s0[p] >= s1[p]], {n, 0, z}] (* A241639 *)
    Table[Count[f[n], p_ /; s0[p] > s1[p]], {n, 0, z}]  (* A241640 *)

Formula

a(n) + A241638(n) = A241637(n) for n >= 0.
a(n) + A241638(n) + A241640(n) = A000041(n) for n >= 0.
a(n) = Sum_{k>0} A242618(n,k). - Alois P. Heinz, May 19 2014

A241637 Number of partitions p of n such that (number of even numbers in p) <= (number of odd numbers in p).

Original entry on oeis.org

1, 1, 1, 3, 3, 7, 8, 14, 16, 26, 32, 45, 57, 78, 103, 132, 174, 220, 295, 361, 477, 584, 766, 921, 1194, 1436, 1841, 2207, 2782, 3331, 4169, 4981, 6156, 7373, 9019, 10778, 13093, 15636, 18843, 22507, 26920, 32096, 38205, 45470, 53845, 63970, 75377, 89356
Offset: 0

Views

Author

Clark Kimberling, Apr 27 2014

Keywords

Comments

Each number in p is counted once, regardless of its multiplicity.

Examples

			a(6) counts these 8 partitions:  51, 411, 33, 321, 3111, 2211, 21111, 111111.
		

Crossrefs

Programs

  • Mathematica
    z = 30; f[n_] := f[n] = IntegerPartitions[n]; s0[p_] := Count[Mod[DeleteDuplicates[p], 2],   0];
    s1[p_] := Count[Mod[DeleteDuplicates[p], 2], 1];
    Table[Count[f[n], p_ /; s0[p] < s1[p]], {n, 0, z}]  (* A241636 *)
    Table[Count[f[n], p_ /; s0[p] <= s1[p]], {n, 0, z}] (* A241637 *)
    Table[Count[f[n], p_ /; s0[p] == s1[p]], {n, 0, z}] (* A241638 *)
    Table[Count[f[n], p_ /; s0[p] >= s1[p]], {n, 0, z}] (* A241639 *)
    Table[Count[f[n], p_ /; s0[p] > s1[p]], {n, 0, z}]  (* A241640 *)

Formula

a(n) = A241636(n) + A241638(n) for n >= 0.
a(n) + A241640(n) = A000041(n) for n >= 0.
a(n) = Sum_{k>=0} A242618(n,k). - Alois P. Heinz, May 19 2014

A241639 Number of partitions p of n such that (number of even numbers in p) >= (number of odd numbers in p).

Original entry on oeis.org

1, 0, 1, 1, 3, 4, 6, 9, 12, 17, 21, 31, 37, 54, 66, 91, 113, 155, 193, 254, 317, 411, 517, 649, 814, 1009, 1268, 1548, 1925, 2335, 2907, 3484, 4309, 5156, 6343, 7535, 9231, 10949, 13340, 15782, 19091, 22555, 27179, 32025, 38377, 45171, 53852, 63267, 75076
Offset: 0

Views

Author

Clark Kimberling, Apr 27 2014

Keywords

Comments

Each number in p is counted once, regardless of its multiplicity.

Examples

			a(6) counts these 6 partitions:  6, 42, 411, 222, 2211, 21111.
		

Crossrefs

Programs

  • Mathematica
    z = 30; f[n_] := f[n] = IntegerPartitions[n]; s0[p_] := Count[Mod[DeleteDuplicates[p], 2],   0];
    s1[p_] := Count[Mod[DeleteDuplicates[p], 2], 1];
    Table[Count[f[n], p_ /; s0[p] < s1[p]], {n, 0, z}]  (* A241636 *)
    Table[Count[f[n], p_ /; s0[p] <= s1[p]], {n, 0, z}] (* A241637 *)
    Table[Count[f[n], p_ /; s0[p] == s1[p]], {n, 0, z}] (* A241638 *)
    Table[Count[f[n], p_ /; s0[p] >= s1[p]], {n, 0, z}] (* A241639 *)
    Table[Count[f[n], p_ /; s0[p] > s1[p]], {n, 0, z}]  (* A241640 *)

Formula

a(n) = A241638(n) + A241640(n) for n >= 0.
a(n) + A241636(n) = A000041(n) for n >= 0.
a(n) = Sum_{k<=0} A242618(n,k). - Alois P. Heinz, May 19 2014

A241640 Number of partitions p of n such that (number of even numbers in p) > (number of odd numbers in p).

Original entry on oeis.org

0, 0, 1, 0, 2, 0, 3, 1, 6, 4, 10, 11, 20, 23, 32, 44, 57, 77, 90, 129, 150, 208, 236, 334, 381, 522, 595, 803, 936, 1234, 1435, 1861, 2193, 2770, 3291, 4105, 4884, 6001, 7172, 8678, 10418, 12487, 14969, 17791, 21330, 25164, 30181, 35398, 42337, 49463, 59057
Offset: 0

Views

Author

Clark Kimberling, Apr 27 2014

Keywords

Comments

Each number in p is counted once, regardless of its multiplicity.

Examples

			a(6) counts these 3 partitions:  6, 42, 222.
		

Crossrefs

Programs

  • Mathematica
    z = 30; f[n_] := f[n] = IntegerPartitions[n]; s0[p_] := Count[Mod[DeleteDuplicates[p], 2],   0];
    s1[p_] := Count[Mod[DeleteDuplicates[p], 2], 1];
    Table[Count[f[n], p_ /; s0[p] < s1[p]], {n, 0, z}]  (* A241636 *)
    Table[Count[f[n], p_ /; s0[p] <= s1[p]], {n, 0, z}] (* A241637 *)
    Table[Count[f[n], p_ /; s0[p] == s1[p]], {n, 0, z}] (* A241638 *)
    Table[Count[f[n], p_ /; s0[p] >= s1[p]], {n, 0, z}] (* A241639 *)
    Table[Count[f[n], p_ /; s0[p] > s1[p]], {n, 0, z}]  (* A241640 *)

Formula

a(n) = A241639(n) - A241638(n) for n >= 0.
a(n) + A241636(n) + A241638(n) = A000041(n) for n >= 0.
a(n) = Sum_{k<0} A242618(n,k). - Alois P. Heinz, May 19 2014

A242682 Number of partitions of n with difference -10 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, 5, 0, 10, 0, 20, 0, 36, 0, 65, 0, 110, 0, 185, 0, 300, 0, 481, 0, 740, 1, 1141, 4, 1710, 11, 2546, 26, 3718, 57, 5396, 114, 7703, 218, 10938, 400, 15323, 707, 21344, 1214, 29411, 2036, 40305, 3336, 54787, 5354, 74049, 8435, 99377, 13072, 132714
Offset: 110

Views

Author

Alois P. Heinz, May 20 2014

Keywords

Crossrefs

Column k=-10 of A242618.

A242683 Number of partitions of n with difference -9 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, 5, 0, 10, 0, 20, 0, 36, 0, 65, 0, 110, 0, 185, 0, 300, 0, 470, 1, 730, 4, 1110, 11, 1661, 26, 2447, 57, 3566, 114, 5120, 218, 7288, 400, 10248, 707, 14292, 1214, 19732, 2036, 27115, 3324, 36865, 5318, 49907, 8352, 67020, 12896, 89621, 19593, 119001
Offset: 90

Views

Author

Alois P. Heinz, May 20 2014

Keywords

Crossrefs

Column k=-9 of A242618.

A242684 Number of partitions of n with difference -8 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, 5, 0, 10, 0, 20, 0, 36, 0, 65, 0, 110, 0, 185, 0, 290, 1, 461, 4, 702, 11, 1066, 26, 1572, 57, 2311, 114, 3319, 218, 4750, 400, 6673, 707, 9332, 1214, 12916, 2025, 17750, 3291, 24164, 5242, 32743, 8191, 44027, 12565, 58913, 18992, 78374, 28291
Offset: 72

Views

Author

Alois P. Heinz, May 20 2014

Keywords

Crossrefs

Column k=-8 of A242618.
Showing 1-10 of 27 results. Next