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

A239241 Number of partitions of n into distinct parts for which (number of odd parts) = (number of even parts).

Original entry on oeis.org

1, 0, 0, 1, 0, 2, 0, 3, 0, 4, 1, 5, 2, 6, 5, 7, 8, 8, 14, 9, 20, 11, 30, 13, 40, 17, 55, 23, 70, 32, 91, 45, 112, 65, 140, 91, 169, 128, 206, 177, 245, 241, 295, 323, 350, 429, 419, 559, 499, 722, 600, 921, 721, 1162, 874, 1452, 1062, 1800, 1299, 2210
Offset: 0

Views

Author

Clark Kimberling, Mar 13 2014

Keywords

Comments

a(n) = A240021(n,0). - Alois P. Heinz, Apr 02 2014

Examples

			a(9) = 4 counts these partitions:  81, 72, 63, 54.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, t) option remember; `if`(n>i*(i+1)/2, 0,
         `if`(n=0, `if`(t=0, 1, 0 ), b(n, i-1, t)+`if`(i>n, 0,
          b(n-i, i-1, t+`if`(irem(i, 2)=1, 1, -1)))))
        end:
    a:= n-> b(n$2, 0):
    seq(a(n), n=0..60);  # Alois P. Heinz, Mar 15 2014
  • Mathematica
    z = 55; p[n_] := p[n] = IntegerPartitions[n]; d[u_] := d[u] = DeleteDuplicates[u]; g[u_] := g[u] = Length[u];
    Table[g[Select[Select[p[n], d[#] == # &], Count[#, ?OddQ] < Count[#, ?EvenQ] &]], {n, 0, z}] (* A239239 *)
    Table[g[Select[Select[p[n], d[#] == # &], Count[#, ?OddQ] <= Count[#, ?EvenQ] &]], {n, 0, z}] (* A239240 *)
    Table[g[Select[Select[p[n], d[#] == # &], Count[#, ?OddQ] == Count[#, ?EvenQ] &]], {n, 0, z}] (* A239241 *)
    Table[g[Select[Select[p[n], d[#] == # &], Count[#, ?OddQ] > Count[#, ?EvenQ] &]], {n, 0, z}] (* A239242 *)
    Table[g[Select[Select[p[n], d[#] == # &], Count[#, ?OddQ] >= Count[#, ?EvenQ] &]], {n, 0, z}] (* A239243 *)
    (* Peter J. C. Moses, Mar 10 2014 *)
    b[n_, i_, t_] := b[n, i, t] = If[n > i*(i+1)/2, 0, If[n==0, If[t==0, 1, 0], b[n, i-1, t] + If[i>n, 0, b[n-i, i-1, t + If[Mod[i, 2]==1, 1, -1]]]]]; a[n_] := b[n, n, 0]; Table[a[n], {n, 0, 60}] (* Jean-François Alcover, Dec 27 2015, after Alois P. Heinz *)

Formula

a(n) + A239239(n) + A239242(n) = A000009(n) for n >=1.
a(n) = [x^n y^0] Product_{i>=1} 1+x^i*y^(2*(i mod 2)-1). - Alois P. Heinz, Apr 03 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 *)

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]

A242498 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; 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, 2, 1, 0, 1, 1, 1, 0, 3, 2, 0, 1, 3, 4, 1, 4, 3, 0, 1, 1, 2, 1, 6, 9, 3, 5, 4, 0, 1, 4, 9, 6, 11, 16, 6, 6, 5, 0, 1, 1, 3, 3, 11, 24, 18, 19, 25, 10, 7, 6, 0, 1, 5, 16, 18, 28, 51, 40, 31, 36, 15, 8, 7, 0, 1, 1, 4, 6, 19, 51, 60, 65, 95, 75, 48, 49, 21, 9, 8, 0, 1
Offset: 0

Views

Author

Alois P. Heinz, May 16 2014

Keywords

Comments

T(n,k) = T(n+k,-k).

Examples

			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  :                    2,  1,  0,  1;
:  4  :            1,  1,  0,  3,  2,  0,  1;
:  5  :                3,  4,  1,  4,  3,  0,  1;
:  6  :        1,  2,  1,  6,  9,  3,  5,  4,  0,  1;
:  7  :            4,  9,  6, 11, 16,  6,  6,  5,  0, 1;
:  8  :     1, 3,  3, 11, 24, 18, 19, 25, 10,  7,  6, 0, 1;
:  9  :        5, 16, 18, 28, 51, 40, 31, 36, 15,  8, 7, 0, 1;
: 10  :  1, 4, 6, 19, 51, 60, 65, 95, 75, 48, 49, 21, 9, 8, 0, 1;
		

Crossrefs

Row sums give A011782.
Diagonals include: A000012, A000004, A001477, A000217, A000290, A180415.
Row lengths give A016777(floor(n/2)).

Programs

  • Maple
    b:= proc(n, i, p) option remember; `if`(n=0, p!, `if`(i<1, 0, expand(
          add(x^(j*(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[x^(j*(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, Feb 11 2015, after Alois P. Heinz *)

A239240 Number of partitions of n into distinct parts for which (number of odd parts) <= (number of even parts).

Original entry on oeis.org

1, 0, 1, 1, 1, 2, 2, 4, 2, 6, 4, 9, 6, 13, 10, 18, 15, 24, 24, 32, 35, 43, 51, 56, 72, 74, 100, 97, 136, 128, 183, 168, 241, 222, 315, 290, 408, 381, 522, 497, 664, 647, 839, 837, 1054, 1081, 1317, 1384, 1641, 1767, 2035, 2242, 2519, 2831, 3108, 3555, 3828
Offset: 0

Views

Author

Clark Kimberling, Mar 13 2014

Keywords

Comments

a(n) = Sum_{k<=0} A240021(n,k). - Alois P. Heinz, Apr 02 2014

Examples

			a(7) = 4 counts these partitions:  61, 52, 43, 421.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, t) option remember; `if`(n>i*(i+1)/2, 0,
         `if`(n=0, `if`(t<=0, 1, 0 ), b(n, i-1, t)+`if`(i>n, 0,
          b(n-i, i-1, t+`if`(irem(i, 2)=1, 1, -1)))))
        end:
    a:= n-> b(n$2, 0):
    seq(a(n), n=0..60);  # Alois P. Heinz, Mar 15 2014
  • Mathematica
    z = 55; p[n_] := p[n] = IntegerPartitions[n]; d[u_] := d[u] = DeleteDuplicates[u]; g[u_] := g[u] = Length[u];
    Table[g[Select[Select[p[n], d[#] == # &], Count[#, ?OddQ] < Count[#, ?EvenQ] &]], {n, 0, z}] (* A239239 *)
    Table[g[Select[Select[p[n], d[#] == # &], Count[#, ?OddQ] <= Count[#, ?EvenQ] &]], {n, 0, z}] (* A239240 *)
    Table[g[Select[Select[p[n], d[#] == # &], Count[#, ?OddQ] == Count[#, ?EvenQ] &]], {n, 0, z}] (* A239241 *)
    Table[g[Select[Select[p[n], d[#] == # &], Count[#, ?OddQ] > Count[#, ?EvenQ] &]], {n, 0, z}] (* A239242 *)
    Table[g[Select[Select[p[n], d[#] == # &], Count[#, ?OddQ] >= Count[#, ?EvenQ] &]], {n, 0, z}] (* A239243 *)
    (* Peter J. C. Moses, Mar 10 2014 *)
    b[n_, i_, t_] := b[n, i, t] = If[n>i*(i+1)/2, 0, If[n==0, If[t <= 0, 1, 0], b[n, i-1, t] + If[i>n, 0, b[n-i, i-1, t+If[Mod[i, 2]==1, 1, -1]]]]]; a[n_] := b[n, n, 0]; Table[a[n], {n, 0, 60}] (* Jean-François Alcover, Aug 30 2016, after Alois P. Heinz *)

Formula

a(n) + A239242(n) = A000009(n) for n >=1.

A239243 Number of partitions of n into distinct parts for which (number of odd parts) >= (number of even parts).

Original entry on oeis.org

1, 1, 0, 2, 1, 3, 2, 4, 4, 6, 7, 8, 11, 11, 17, 16, 25, 22, 36, 31, 49, 44, 68, 61, 90, 85, 120, 118, 156, 160, 204, 217, 261, 291, 337, 386, 429, 507, 548, 662, 694, 854, 882, 1096, 1112, 1396, 1406, 1765, 1768, 2219, 2223, 2776, 2784, 3451, 3484, 4275
Offset: 0

Views

Author

Clark Kimberling, Mar 13 2014

Keywords

Comments

a(n) = Sum_{k>=0} A240021(n,k). - Alois P. Heinz, Apr 02 2014

Examples

			a(8) = 4 counts these partitions:  71, 53, 521, 431.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, t) option remember; `if`(n>i*(i+1)/2, 0,
         `if`(n=0, `if`(t>=0, 1, 0 ), b(n, i-1, t)+`if`(i>n, 0,
          b(n-i, i-1, t+`if`(irem(i, 2)=1, 1, -1)))))
        end:
    a:= n-> b(n$2, 0):
    seq(a(n), n=0..60);  # Alois P. Heinz, Mar 15 2014
  • Mathematica
    z = 55; p[n_] := p[n] = IntegerPartitions[n]; d[u_] := d[u] = DeleteDuplicates[u]; g[u_] := g[u] = Length[u];
    Table[g[Select[Select[p[n], d[#] == # &], Count[#, ?OddQ] < Count[#, ?EvenQ] &]], {n, 0, z}] (* A239239 *)
    Table[g[Select[Select[p[n], d[#] == # &], Count[#, ?OddQ] <= Count[#, ?EvenQ] &]], {n, 0, z}] (* A239240 *)
    Table[g[Select[Select[p[n], d[#] == # &], Count[#, ?OddQ] == Count[#, ?EvenQ] &]], {n, 0, z}] (* A239241 *)
    Table[g[Select[Select[p[n], d[#] == # &], Count[#, ?OddQ] > Count[#, ?EvenQ] &]], {n, 0, z}] (* A239242 *)
    Table[g[Select[Select[p[n], d[#] == # &], Count[#, ?OddQ] >= Count[#, ?EvenQ] &]], {n, 0, z}] (* A239243 *)
    (* Peter J. C. Moses, Mar 10 2014 *)
    b[n_, i_, t_] := b[n, i, t] = If[n>i*(i+1)/2, 0, If[n==0, If[t>=0, 1, 0], b[n, i-1, t]+If[i>n, 0, b[n-i, i-1, t+If[Mod[i, 2]==1, 1, -1]]]]]; a[n_] := b[n, n, 0]; Table[a[n], {n, 0, 60}] (* Jean-François Alcover, Aug 30 2016, after Alois P. Heinz *)

Formula

a(n) + A239239(n) = A000009(n) for n >=1.

A239242 Number of partitions of n into distinct parts for which (number of odd parts) > (number of even parts).

Original entry on oeis.org

0, 1, 0, 1, 1, 1, 2, 1, 4, 2, 6, 3, 9, 5, 12, 9, 17, 14, 22, 22, 29, 33, 38, 48, 50, 68, 65, 95, 86, 128, 113, 172, 149, 226, 197, 295, 260, 379, 342, 485, 449, 613, 587, 773, 762, 967, 987, 1206, 1269, 1497, 1623, 1855, 2063, 2289, 2610, 2823, 3280, 3471
Offset: 0

Views

Author

Clark Kimberling, Mar 13 2014

Keywords

Comments

a(n) = Sum_{k>=1} A240021(n,k). - Alois P. Heinz, Apr 02 2014

Examples

			a(8) = 4 counts these partitions:  71, 53, 521, 431.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, t) option remember; `if`(n>i*(i+1)/2, 0,
         `if`(n=0, `if`(t>0, 1, 0 ), b(n, i-1, t)+`if`(i>n, 0,
          b(n-i, i-1, t+`if`(irem(i, 2)=1, 1, -1)))))
        end:
    a:= n-> b(n$2, 0):
    seq(a(n), n=0..60);  # Alois P. Heinz, Mar 15 2014
  • Mathematica
    z = 55; p[n_] := p[n] = IntegerPartitions[n]; d[u_] := d[u] = DeleteDuplicates[u]; g[u_] := g[u] = Length[u];
    Table[g[Select[Select[p[n], d[#] == # &], Count[#, ?OddQ] < Count[#, ?EvenQ] &]], {n, 0, z}] (* A239239 *)
    Table[g[Select[Select[p[n], d[#] == # &], Count[#, ?OddQ] <= Count[#, ?EvenQ] &]], {n, 0, z}] (* A239240 *)
    Table[g[Select[Select[p[n], d[#] == # &], Count[#, ?OddQ] == Count[#, ?EvenQ] &]], {n, 0, z}] (* A239241 *)
    Table[g[Select[Select[p[n], d[#] == # &], Count[#, ?OddQ] > Count[#, ?EvenQ] &]], {n, 0, z}] (* A239242 *)
    Table[g[Select[Select[p[n], d[#] == # &], Count[#, ?OddQ] >= Count[#, ?EvenQ] &]], {n, 0, z}] (* A239243 *)
    (* Peter J. C. Moses, Mar 10 2014 *)
    b[n_, i_, t_] := b[n, i, t] = If[n>i*(i+1)/2, 0, If[n==0, If[t>0, 1, 0], b[n, i-1, t]+If[i>n, 0, b[n-i, i-1, t+If[Mod[i, 2]==1, 1, -1]]]]]; a[n_] := b[n, n, 0]; Table[a[n], {n, 0, 60}] (* Jean-François Alcover, Aug 30 2016, after Alois P. Heinz *)

Formula

a(n) + A239240(n) = A000009(n) for n >=1.

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

A239239 Number of strict partitions of n having fewer odd parts than even.

Original entry on oeis.org

0, 0, 1, 0, 1, 0, 2, 1, 2, 2, 3, 4, 4, 7, 5, 11, 7, 16, 10, 23, 15, 32, 21, 43, 32, 57, 45, 74, 66, 96, 92, 123, 129, 157, 175, 199, 239, 253, 316, 320, 419, 406, 544, 514, 704, 652, 898, 825, 1142, 1045, 1435, 1321, 1798, 1669, 2234, 2103, 2766, 2646, 3404
Offset: 0

Views

Author

Clark Kimberling, Mar 13 2014

Keywords

Comments

a(n) = Sum_{k<=-1} A240021(n,k). - Alois P. Heinz, Apr 02 2014

Examples

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

Crossrefs

Programs

  • Maple
    b:= proc(n, i, t) option remember; `if`(n>i*(i+1)/2, 0,
         `if`(n=0, `if`(t<0, 1, 0 ), b(n, i-1, t)+`if`(i>n, 0,
          b(n-i, i-1, t+`if`(irem(i, 2)=1, 1, -1)))))
        end:
    a:= n-> b(n$2, 0):
    seq(a(n), n=0..60);  # Alois P. Heinz, Mar 15 2014
  • Mathematica
    z = 55; p[n_] := p[n] = IntegerPartitions[n]; d[u_] := d[u] = DeleteDuplicates[u]; g[u_] := g[u] = Length[u];
    Table[g[Select[Select[p[n], d[#] == # &], Count[#, ?OddQ] < Count[#, ?EvenQ] &]], {n, 0, z}] (* A239239 *)
    Table[g[Select[Select[p[n], d[#] == # &], Count[#, ?OddQ] <= Count[#, ?EvenQ] &]], {n, 0, z}] (* A239240 *)
    Table[g[Select[Select[p[n], d[#] == # &], Count[#, ?OddQ] == Count[#, ?EvenQ] &]], {n, 0, z}] (* A239241 *)
    Table[g[Select[Select[p[n], d[#] == # &], Count[#, ?OddQ] > Count[#, ?EvenQ] &]], {n, 0, z}] (* A239242 *)
    Table[g[Select[Select[p[n], d[#] == # &], Count[#, ?OddQ] >= Count[#, ?EvenQ] &]], {n, 0, z}] (* A239243 *)
    (* Peter J. C. Moses, Mar 10 2014 *)
    b[n_, i_, t_] := b[n, i, t] = If[n>i*(i+1)/2, 0, If[n == 0, If[t<0, 1, 0], b[n, i-1, t] + If[i>n, 0, b[n-i, i-1, t+If[Mod[i, 2] == 1, 1, -1]]]]]; a[n_] := b[n, n, 0]; Table[a[n], {n, 0, 60}] (* Jean-François Alcover, Aug 29 2016, after Alois P. Heinz *)

Formula

a(n) + A239243(n) = A000009(n) for n >=1.

A239881 Number of strict partitions of n having an ordering in which no parts of equal parity are juxtaposed.

Original entry on oeis.org

1, 1, 1, 2, 1, 3, 2, 5, 3, 7, 6, 10, 9, 13, 15, 18, 22, 23, 33, 31, 46, 41, 65, 55, 87, 73, 117, 99, 153, 132, 199, 177, 254, 236, 324, 313, 408, 412, 512, 540, 639, 701, 795, 904, 986, 1159, 1221, 1473, 1509, 1861, 1862, 2336, 2298, 2915, 2830, 3615, 3485
Offset: 0

Views

Author

Clark Kimberling, Mar 29 2014

Keywords

Comments

A strict partition is one in which every part has multiplicity 1.
a(n) = Sum_{k=-1..1} A240021(n,k). - Alois P. Heinz, Apr 02 2014

Examples

			a(12) counts these 9 partitions:  [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[n]], {n, 0, 60}]  (* A239880 *)
    (* Peter J. C. Moses, Mar 10 2014 *)
Showing 1-10 of 20 results. Next