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

A239871 Number of strict partitions of n having 1 more even part than odd, so that there is at least one ordering of the parts in which the even and odd parts alternate, and the first and last terms are even.

Original entry on oeis.org

0, 0, 1, 0, 1, 0, 1, 1, 1, 2, 1, 4, 1, 6, 1, 9, 2, 12, 3, 16, 6, 20, 10, 25, 17, 30, 26, 36, 40, 43, 57, 51, 81, 61, 110, 74, 148, 91, 193, 113, 250, 144, 316, 184, 397, 239, 491, 311, 603, 407, 732, 530, 885, 692, 1061, 895, 1268, 1155, 1508, 1478, 1790
Offset: 0

Views

Author

Clark Kimberling, Mar 29 2014

Keywords

Comments

Let c(n) be the number of strict partitions (that is, every part has multiplicity 1) of n having 1 more odd part than even, so that there is an ordering of parts for which the odd and even parts alternate and the first and last terms are odd. Then c(n) = a(n+1) for n >= 0.

Examples

			a(11) counts these 4 partitions:  812, 614, 632, 452.
		

Crossrefs

Column k=-1 of A240021.

Programs

  • Maple
    b:= proc(n, i, t) option remember; `if`(n>i*(i+1)/2 or
          abs(t)>n, 0, `if`(n=0, 1, b(n, i-1, t)+
          `if`(i>n, 0, b(n-i, i-1, t+(2*irem(i, 2)-1)))))
        end:
    a:= n-> b(n$2, 1):
    seq(a(n), n=0..80);  # Alois P. Heinz, Apr 02 2014
  • Mathematica
    d[n_] := Select[IntegerPartitions[n], Max[Length /@ Split@#] == 1 &];
    p[n_] := p[n] = Select[d[n], Count[#, ?OddQ] == -1 + Count[#, ?EvenQ] &]; t =  Table[p[n], {n, 0, 20}]
    TableForm[t] (* shows the partitions *)
    u = Table[Length[p[n]], {n, 0, 70}]  (* A239871 *)
    (* Peter J. C. Moses, Mar 10 2014 *)
    b[n_, i_, t_] := b[n, i, t] = If[n > i*(i + 1)/2 || Abs[t] > n, 0, If[n == 0, 1, b[n, i - 1, t] + If[i > n, 0, b[n - i, i - 1, t + (2*Mod[i, 2] - 1)]]]]; a[n_] := b[n, n, 1]; Table[a[n], {n, 0, 80}] (* Jean-François Alcover, Nov 16 2015, after Alois P. Heinz *)

Formula

a(n) = [x^n y^(-1)] Product_{i>=1} 1+x^i*y^(2*(i mod 2)-1). - Alois P. Heinz, Apr 03 2014

A239873 Number of strict partitions of 2n + 1 having 1 more even part than odd, so that there is at least one ordering of the parts in which the even and odd parts alternate, and the first and last terms are even.

Original entry on oeis.org

0, 0, 0, 1, 2, 4, 6, 9, 12, 16, 20, 25, 30, 36, 43, 51, 61, 74, 91, 113, 144, 184, 239, 311, 407, 530, 692, 895, 1155, 1478, 1882, 2375, 2983, 3715, 4602, 5660, 6925, 8418, 10187, 12257, 14686, 17514, 20809, 24624, 29049, 34154, 40051, 46842, 54668, 63667
Offset: 0

Views

Author

Clark Kimberling, Mar 29 2014

Keywords

Comments

Let c(n) be the number of strict partitions (that is, every part has multiplicity 1) of 2n having 1 more even part than odd, so that there is an ordering of parts for which the even and odd parts alternate and the first and last terms are even. This sequence is nondecreasing, unlike A239871, of which it is a bisection; the other bisection is A239872.

Examples

			a(7) counts these 9 partitions of 15:  [12,1,2], [10,1,4], [10,3,2], [4,9,2], [8,1,6], [8,5,2], [8,3,4], [6,7,2], [6,5,4].
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, t) option remember; `if`(n>i*(i+1)/2 or
          abs(t)>n, 0, `if`(n=0, 1, b(n, i-1, t)+
          `if`(i>n, 0, b(n-i, i-1, t+(2*irem(i, 2)-1)))))
        end:
    a:= n-> b(2*n+1$2, 1):
    seq(a(n), n=0..80);  # Alois P. Heinz, Apr 02 2014
  • Mathematica
    d[n_] := Select[IntegerPartitions[n], Max[Length /@ Split@#] == 1 &]; p[n_] := p[n] = Select[d[n], Count[#, ?OddQ] == -1 + Count[#, ?EvenQ] &]; t = Table[p[n], {n, 0, 20}]
    TableForm[t] (* shows the partitions *)
    u = Table[Length[p[2 n + 1]], {n, 0, 38}]  (* A239873 *)
    (* Peter J. C. Moses, Mar 10 2014 *)
    b[n_, i_, t_] := b[n, i, t] = If[n > i (i + 1)/2 || Abs[t] > n, 0, If[n == 0, 1, b[n, i-1, t] + If[i>n, 0, b[n-i, i-1, t + (2 Mod[i, 2] - 1)]]]]; a[n_] := b[2n+1, 2n+1, 1]; Table[a[n], {n, 0, 80}] (* Jean-François Alcover, Aug 29 2016, after Alois P. Heinz *)

A239882 Number of strict partitions of 2n having an ordering of the parts in which no two neighboring parts have the same parity.

Original entry on oeis.org

1, 1, 1, 2, 3, 6, 9, 15, 22, 33, 46, 65, 87, 117, 153, 199, 254, 324, 408, 512, 639, 795, 986, 1221, 1509, 1862, 2298, 2830, 3485, 4285, 5267, 6460, 7920, 9687, 11836, 14426, 17557, 21310, 25823, 31204, 37632, 45262, 54326, 65029, 77678, 92549, 110035, 130509
Offset: 0

Views

Author

Clark Kimberling, Mar 29 2014

Keywords

Comments

a(n) = number of strict partitions (that is, every part has multiplicity 1) of 2n having an ordering of the parts in which no two neighboring parts have the same parity. This sequence is nondecreasing, unlike A239881, of which it is a bisection; the other bisection is A239883.

Examples

			a(6) counts these 9 partitions of 12:  [12], [9,2,1], [3,8,1], [7,4,1], [7,2,3], [5,6,1], [6,3,2,1], [5,4,3], [5,4,1,2]
		

Crossrefs

Programs

  • Mathematica
    d[n_] := Select[IntegerPartitions[n], Max[Length /@ Split@#] == 1 &]; p[n_] := p[n] = Select[d[n], Abs[Count[#, ?OddQ] - Count[#, ?EvenQ]] <= 1 &]; t =  Table[p[n], {n, 0, 12}]
    TableForm[t] (* shows the partitions *)
    u = Table[Length[p[2 n]], {n, 0, 40}]  (* A239882 *)
    (* Peter J. C. Moses, Mar 10 2014 *)

Extensions

More terms from Alois P. Heinz, Mar 31 2014

A239883 Number of strict partitions of 2n + 1 having an ordering of the parts in which no two neighboring parts have the same parity.

Original entry on oeis.org

1, 2, 3, 5, 7, 10, 13, 18, 23, 31, 41, 55, 73, 99, 132, 177, 236, 313, 412, 540, 701, 904, 1159, 1473, 1861, 2336, 2915, 3615, 4463, 5478, 6698, 8152, 9887, 11944, 14391, 17280, 20703, 24739, 29506, 35115, 41730, 49501, 58650, 69389, 82009, 96807, 114175
Offset: 0

Views

Author

Clark Kimberling, Mar 29 2014

Keywords

Comments

a(n) = number of strict partitions (that is, every part has multiplicity 1) of 2n + 1 having an ordering of the parts in which no two neighboring parts have the same parity. This sequence is nondecreasing, unlike A239881, of which it is a bisection; the other bisection is A239882.

Examples

			a(5) counts these 10 partitions of 11:  [11], [10,1], [9,2], [8,3], [8,1,2], [7,4], [6,5], [6,1,4], [6,3,2], [4,5,2].
		

Crossrefs

Programs

  • Mathematica
    d[n_] := Select[IntegerPartitions[n], Max[Length /@ Split@#] == 1 &]; p[n_] := p[n] = Select[d[n], Abs[Count[#, ?OddQ] - Count[#, ?EvenQ]] <= 1 &]; t =  Table[p[n], {n, 0, 12}]
    TableForm[t] (* shows the partitions *)
    u = Table[Length[p[2 n + 1]], {n, 0, 20}]  (* A239883 *)
    (* Peter J. C. Moses, Mar 10 2014 *)

Extensions

More terms from Alois P. Heinz, Mar 31 2014
Showing 1-4 of 4 results.