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

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

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 *)

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

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
Showing 1-5 of 5 results.