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

A245840 Triangle T read by rows: T(n,k) = Total number of odd parts in all partitions of n with exactly k parts, 1 <= k <= n.

Original entry on oeis.org

1, 0, 2, 1, 1, 3, 0, 2, 2, 4, 1, 2, 4, 3, 5, 0, 4, 4, 6, 4, 6, 1, 3, 8, 7, 8, 5, 7, 0, 4, 8, 12, 10, 10, 6, 8, 1, 4, 13, 14, 17, 13, 12, 7, 9, 0, 6, 12, 22, 20, 22, 16, 14, 8, 10, 1, 5, 18, 25, 32, 27, 27, 19, 16, 9, 11
Offset: 1

Views

Author

L. Edson Jeffery, Aug 03 2014

Keywords

Examples

			Triangle begins
1
0  2
1  1   3
0  2   2   4
1  2   4   3   5
0  4   4   6   4   6
1  3   8   7   8   5   7
0  4   8  12  10  10   6   8
1  4  13  14  17  13  12   7   9
0  6  12  22  20  22  16  14   8 10
1  5  18  25  32  27  27  19  16  9  11
		

Crossrefs

Cf. A066897 (row sums), A245841 (partial sums of row entries).

Programs

  • Maple
    b:= proc(n, i, k) option remember; `if`(n=0, [`if`(k=0, 1, 0), 0],
          `if`(i<1 or k=0, [0$2], ((f, g)-> f+g+[0, `if`(irem(i, 2)=1,
           g[1], 0)])(b(n, i-1, k), `if`(i>n, [0$2], b(n-i, i, k-1)))))
        end:
    T:= (n, k)-> b(n$2, k)[2]:
    seq(seq(T(n, k), k=1..n), n=1..14);  # Alois P. Heinz, Aug 04 2014
  • Mathematica
    Grid[Table[Sum[Count[Flatten[IntegerPartitions[n, {k}]], i], {i, 1, n, 2}], {n, 1, 11}, {k, 1, n}]]
    b[n_, i_, k_] := b[n, i, k] = If[n==0, {If[k==0, 1, 0], 0}, If[i<1 || k==0, {0, 0}, Function[{f, g}, f+g+{0, If[Mod[i, 2]==1, g[[1]], 0]}][b[n, i-1, k], If[i>n, {0, 0}, b[n-i, i, k-1]]]]]; T[n_, k_] := b[n, n, k][[2]]; Table[Table[T[n, k], {k, 1, n}], {n, 1, 14}] // Flatten (* Jean-François Alcover, Nov 17 2015, after Alois P. Heinz *)

Formula

T(n,k) + A245842(n,k) = A172467(n,k).

A245842 Triangle T read by rows: T(n,k) = Total number of even parts in all partitions of n with exactly k parts, 1 <= k <= n.

Original entry on oeis.org

0, 1, 0, 0, 1, 0, 1, 2, 1, 0, 0, 2, 2, 1, 0, 1, 2, 5, 2, 1, 0, 0, 3, 4, 5, 2, 1, 0, 1, 4, 7, 8, 5, 2, 1, 0, 0, 4, 8, 10, 8, 5, 2, 1, 0, 1, 4, 12, 14, 15, 8, 5, 2, 1, 0, 0, 5, 12, 19, 18, 15, 8, 5, 2, 1, 0, 1, 6, 18, 24, 27, 24, 15, 8, 5, 2, 1, 0
Offset: 1

Views

Author

L. Edson Jeffery, Aug 03 2014

Keywords

Comments

Column sequences appear to converge to A066897.

Examples

			Triangle begins
0
1  0
0  1   0
1  2   1   0
0  2   2   1   0
1  2   5   2   1   0
0  3   4   5   2   1  0
1  4   7   8   5   2  1  0
0  4   8  10   8   5  2  1  0
1  4  12  14  15   8  5  2  1  0
0  5  12  19  18  15  8  5  2  1  0
		

Crossrefs

Cf. A245843 (partial sums of row entries).
Cf. A066898 (row sums), A172467.

Programs

  • Maple
    b:= proc(n, i, k) option remember; `if`(n=0, [`if`(k=0, 1, 0), 0],
          `if`(i<1 or k=0, [0$2], ((f, g)-> f+g+[0, `if`(irem(i, 2)=0,
           g[1], 0)])(b(n, i-1, k), `if`(i>n, [0$2], b(n-i, i, k-1)))))
        end:
    T:= (n, k)-> b(n$2, k)[2]:
    seq(seq(T(n, k), k=1..n), n=1..14);  # Alois P. Heinz, Aug 04 2014
  • Mathematica
    Grid[Table[Sum[Count[Flatten[IntegerPartitions[n, {k}]], i], {i, 2, n, 2}], {n, 11}, {k, n}]]
    (* second program: *)
    b[n_, i_, k_] := b[n, i, k] = If[n == 0, {If[k == 0, 1, 0], 0}, If[i < 1 || k == 0, {0, 0}, Function[{f, g}, f + g + {0, If[Mod[i, 2] == 0, g[[1]], 0]}][b[n, i-1, k], If[i > n, {0, 0}, b[n-i, i, k-1]]]]];
    T[n_, k_] := b[n, n, k][[2]];
    Table[Table[T[n, k], {k, 1, n}], {n, 1, 14}] // Flatten (* Jean-François Alcover, May 21 2016, after Alois P. Heinz *)

Formula

T(n,k) + A245840(n,k) = A172467(n,k).

A245843 Triangle T read by rows: T(n,k) = Total number of even parts in all partitions of n with at most k parts, 1 <= k <= n.

Original entry on oeis.org

0, 1, 1, 0, 1, 1, 1, 3, 4, 4, 0, 2, 4, 5, 5, 1, 3, 8, 10, 11, 11, 0, 3, 7, 12, 14, 15, 15, 1, 5, 12, 20, 25, 27, 28, 28, 0, 4, 12, 22, 30, 35, 37, 38, 38, 1, 5, 17, 31, 46, 54, 59, 61, 62, 62, 0, 5, 17, 36, 54, 69, 77, 82, 84, 85, 85
Offset: 1

Views

Author

L. Edson Jeffery, Aug 03 2014

Keywords

Examples

			Triangle begins:
0
1  1
0  1   1
1  3   4   4
0  2   4   5   5
1  3   8  10  11  11
0  3   7  12  14  15  15
1  5  12  20  25  27  28  28
0  4  12  22  30  35  37  38  38
1  5  17  31  46  54  59  61  62  62
0  5  17  36  54  69  77  82  84  85  85
		

Crossrefs

Partial sums of row entries of A245842.
Cf. A066898 (outer diagonal).

Programs

  • Maple
    b:= proc(n, i, k) option remember; `if`(n=0, [`if`(k=0, 1, 0), 0],
          `if`(i<1 or k=0, [0$2], ((f, g)-> f+g+[0, `if`(irem(i, 2)=0,
           g[1], 0)])(b(n, i-1, k), `if`(i>n, [0$2], b(n-i, i, k-1)))))
        end:
    T:= proc(n, k) T(n, k):= b(n$2, k)[2]+`if`(k=1, 0, T(n, k-1)) end:
    seq(seq(T(n, k), k=1..n), n=1..14);  # Alois P. Heinz, Aug 04 2014
  • Mathematica
    Grid[Table[Sum[Sum[Count[Flatten[IntegerPartitions[n, {j}]], i], {i, 2, n, 2}], {j, k}], {n, 11}, {k, n}]]
    (* second program: *)
    b[n_, i_, k_] := b[n, i, k] = If[n == 0, {If[k == 0, 1, 0], 0}, If[i < 1 || k == 0, {0, 0}, Function[{f, g}, f + g + {0, If[Mod[i, 2] == 0, g[[1]], 0 ]}][b[n, i-1, k], If[i > n, {0, 0}, b[n-i, i, k-1]]]]];
    T[n_, k_] := b[n, n, k][[2]] + If[k == 1, 0, T[n, k-1]];
    Table[Table[T[n, k], {k, 1, n}], {n, 1, 14}] // Flatten (* Jean-François Alcover, May 21 2016, after Alois P. Heinz *)
Showing 1-3 of 3 results.