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

A182703 Triangle read by rows: T(n,k) = number of occurrences of k in the last section of the set of partitions of n.

Original entry on oeis.org

1, 1, 1, 2, 0, 1, 3, 2, 0, 1, 5, 1, 1, 0, 1, 7, 4, 2, 1, 0, 1, 11, 3, 2, 1, 1, 0, 1, 15, 8, 3, 3, 1, 1, 0, 1, 22, 7, 6, 2, 2, 1, 1, 0, 1, 30, 15, 6, 5, 3, 2, 1, 1, 0, 1, 42, 15, 10, 5, 4, 2, 2, 1, 1, 0, 1, 56, 27, 14, 10, 5, 5, 2, 2, 1, 1, 0, 1
Offset: 1

Views

Author

Omar E. Pol, Nov 28 2010

Keywords

Comments

For the definition of "section" of the set of partitions of n see A135010.
Also, column 1 gives the number of partitions of n-1. For k >= 2, row n lists the number of k's in all partitions of n that do not contain 1 as a part.
From Omar E. Pol, Feb 12 2012: (Start)
It appears that reversed rows converge to A002865.
It appears that row n is also the base of an isosceles triangle in which the column sums give the partition numbers A000041 in descending order starting with p(n-1) = A000041(n-1). Example for n = 7:
.
. 1,
. 1, 0, 1,
. 4, 2, 1, 0, 1,
11, 3, 2, 1, 1, 0, 1,
---------------------
11, 7, 5, 3, 2, 1, 1,
.
It appears that in row n starts an infinite trapezoid in which column sums always give the number of partitions of n-1. Example for n = 7:
.
11, 3, 2, 1, 1, 0, 1,
. 8, 3, 3, 1, 1, 0, 1,
. 6, 2, 2, 1, 1, 0, 1,
. 5, 3, 2, 1, 1, 0, 1,
. 4, 2, 2, 1, 1, 0, 1,
. 5, 2, 2, 1, 1, 0,...
. 4, 2, 2, 1, 1,...
. 4, 2, 2, 1,...
. 4, 2, 2,...
. 4, 2,...
. 4,...
.
The sum of any column is always p(7-1) = p(6) = A000041(6) = 11.
It appears that the first term of row n is one of the vertices of an infinite isosceles triangle in which column sums give the partition numbers A000041 in ascending order starting with p(n-1) = A000041(n-1). Example for n = 7:
11,
. 8,
. 7, 6,
. 6, 5,
. 10, 5, ...
. 10, ...
. 10, ...
-------------------
11, 15, 22, 30, ...
(End)
It appears that row n lists the first differences of the row n of triangle A207031 together with 1 (as the final term of row n). - Omar E. Pol, Feb 26 2012
More generally T(n,k) is the number of occurrences of k in the n-th section of the set of partitions of any integer >= n. - Omar E. Pol, Oct 21 2013

Examples

			Illustration of three arrangements of the last section of the set of partitions of 7, or more generally the 7th section of the set of partitions of any integer >= 7:
.                                        _ _ _ _ _ _ _
.     (7)                    (7)        |_ _ _ _      |
.     (4+3)                (4+3)        |_ _ _ _|_    |
.     (5+2)                (5+2)        |_ _ _    |   |
.     (3+2+2)            (3+2+2)        |_ _ _|_ _|_  |
.       (1)                  (1)                    | |
.         (1)                (1)                    | |
.         (1)                (1)                    | |
.           (1)              (1)                    | |
.         (1)                (1)                    | |
.           (1)              (1)                    | |
.           (1)              (1)                    | |
.             (1)            (1)                    | |
.             (1)            (1)                    | |
.               (1)          (1)                    | |
.                 (1)        (1)                    |_|
.    ----------------
.     19,8,5,3,2,1,1 --> Row 7 of triangle A207031.
.      |/|/|/|/|/|/|
.     11,3,2,1,1,0,1 --> Row 7 of this triangle.
.
Note that the "head" of the last section is formed by the partitions of 7 that do not contain 1 as a part. The "tail" is formed by A000041(7-1) parts of size 1. The number of rows (or zones) is A000041(7) = 15. The last section of the set of partitions of 7 contains eleven 1's, three 2's, two 3's, one 4, one 5, there are no 6's and it contains one 7. So, for k = 1..7, row 7 gives: 11, 3, 2, 1, 1, 0, 1.
Triangle begins:
   1;
   1,  1;
   2,  0,  1;
   3,  2,  0,  1;
   5,  1,  1,  0, 1;
   7,  4,  2,  1, 0, 1;
  11,  3,  2,  1, 1, 0, 1;
  15,  8,  3,  3, 1, 1, 0, 1;
  22,  7,  6,  2, 2, 1, 1, 0, 1;
  30, 15,  6,  5, 3, 2, 1, 1, 0, 1;
  42, 15, 10,  5, 4, 2, 2, 1, 1, 0, 1;
  56, 27, 14, 10, 5, 5, 2, 2, 1, 1, 0, 1;
  ...
		

Crossrefs

Row sums give A138137. Where records occur is A134869.
Sub-triangles (1-11): A023531, A129186, A194702-A194710

Programs

  • Maple
    p:= (f, g)-> zip((x, y)-> x+y, f, g, 0):
    b:= proc(n,i) option remember; local g;
          if n=0        then [1]
        elif n<2 or i<2 then [0]
        else g:=   `if`(i>n, [0],  b(n-i, i));
             p(p([0$j=2..i, g[1]], b(n, i-1)), g)
          fi
        end:
    h:= proc(n) option remember;
          `if`(n=0, 1, b(n, n)[1]+h(n-1))
        end:
    T:= proc(n) h(n-1), b(n, n)[2..n][] end:
    seq(T(n), n=1..20);  # Alois P. Heinz, Feb 19 2012
  • Mathematica
    p[f_, g_] := Plus @@ PadRight[{f, g}]; b[n_, i_] := b[n, i] = Module[{g}, Which[n == 0, {1}, n<2 || i<2, {0}, True, g = If [i>n, {0}, b[n-i, i]]; p[p[Append[Array[0&, i-1], g[[1]]], b[n, i-1]], g]]]; h[n_] := h[n] = If[n == 0, 1, b[n, n][[1]] + h[n-1]]; t[n_] := {h[n-1], Sequence @@ b[n, n][[2 ;; n]]}; Table[t[n], {n, 1, 20}] // Flatten (* Jean-François Alcover, Jan 16 2014, after Alois P. Heinz's Maple code *)
    Table[{PartitionsP[n-1]}~Join~Table[Count[Flatten@Cases[IntegerPartitions[n], x_ /; Last[x] != 1], k], {k,2,n}], {n,1,12}]  // Flatten (* Robert Price, May 15 2020 *)

Formula

It appears that T(n,k) = A207032(n,k) - A207032(n,k+2). - Omar E. Pol, Feb 26 2012

A066633 Triangle T(n,k), n >= 1, 1 <= k <= n, giving number of k's in all partitions of n.

Original entry on oeis.org

1, 2, 1, 4, 1, 1, 7, 3, 1, 1, 12, 4, 2, 1, 1, 19, 8, 4, 2, 1, 1, 30, 11, 6, 3, 2, 1, 1, 45, 19, 9, 6, 3, 2, 1, 1, 67, 26, 15, 8, 5, 3, 2, 1, 1, 97, 41, 21, 13, 8, 5, 3, 2, 1, 1, 139, 56, 31, 18, 12, 7, 5, 3, 2, 1, 1, 195, 83, 45, 28, 17, 12, 7, 5, 3, 2, 1, 1, 272, 112, 63, 38, 25, 16, 11, 7, 5, 3, 2, 1, 1
Offset: 1

Views

Author

Naohiro Nomoto, Jan 09 2002

Keywords

Comments

It appears that row n lists the first differences of the row n of triangle A181187 together with 1 (as the final term of the row n). - Omar E. Pol, Feb 26 2012
It appears that reversed rows converge to A000041. - Omar E. Pol, Mar 11 2012
Proof: For a partition of n with k>floor(n/2+1), k can only occur as the largest part; the other parts sum to n-k, so that T(n,n-k)=A000041(k). - George Beck, Jun 30 2019
T(n,k) is also the total number k's that are divisors of all positive integers in a sequence with n blocks where the m-th block consists of A000041(n-m) copies of m, with 1 <= m <= n. - Omar E. Pol, Feb 05 2021

Examples

			For n = 3, k = 1; 3 = 2+1 = 1+1+1. T(3,1) = (zero 1's) + (one 1's) + (three 1's), so T(3,1) = 4.
Triangle begins:
    1;
    2,   1;
    4,   1,  1;
    7,   3,  1,  1;
   12,   4,  2,  1,  1;
   19,   8,  4,  2,  1,  1;
   30,  11,  6,  3,  2,  1,  1;
   45,  19,  9,  6,  3,  2,  1, 1;
   67,  26, 15,  8,  5,  3,  2, 1, 1;
   97,  41, 21, 13,  8,  5,  3, 2, 1, 1;
  139,  56, 31, 18, 12,  7,  5, 3, 2, 1, 1;
  195,  83, 45, 28, 17, 12,  7, 5, 3, 2, 1, 1;
  272, 112, 63, 38, 25, 16, 11, 7, 5, 3, 2, 1, 1;
  ...
		

References

  • D. E. Knuth, The Art of Computer Programming, Vol. 4A, Section 7.2.1.5, Problem 73(b), pp. 415, 761. - N. J. A. Sloane, Dec 30 2018

Crossrefs

Row sums give positive terms of A006128.
Columns (1-10): A000070, A024786-A024794.

Programs

  • Maple
    b:= proc(n, i) option remember;
          `if`(n=0 or i=1, 1+n*x, b(n, i-1)+
          `if`(i>n, 0, (g->g+coeff(g, x, 0)*x^i)(b(n-i, i))))
        end:
    T:= n-> (p->seq(coeff(p, x, i), i=1..n))(b(n, n)):
    seq(T(n), n=1..14);  # Alois P. Heinz, Mar 21 2012
  • Mathematica
    Table[Count[Flatten[IntegerPartitions[n]],k],
    {n,1,20},{k,1,n}]
    TableForm[% ] (* as a triangle *)
    Flatten[%%]   (* as a sequence *)
    (* Clark Kimberling, Mar 03 2010 *)
    T[n_, n_] = 1; T[n_, k_] /; k, ] = 0; Table[T[n, k], {n, 1, 14}, {k, 1, n}] // Flatten (* Jean-François Alcover, Sep 21 2015, after Omar E. Pol *)
  • Python
    from math import isqrt, comb
    from sympy import partition
    def A066633(n):
        a = (m:=isqrt(k:=n<<1))+(k>m*(m+1))
        b = n-comb(a,2)
        return sum(partition(j) for j in range(a%b,a,b)) # Chai Wah Wu, Nov 13 2024

Formula

G.f. for the number of k's in all partitions of n is x^k/(1-x^k)* Product_{m>=1} 1/(1-x^m). - Vladeta Jovovic, Jan 15 2002
T(n, k) = Sum_{j
Equals triangle A027293 * A051731 as infinite lower triangular matrices. - Gary W. Adamson Mar 21 2011
It appears that T(n+k,k) = T(n,k) + A000041(n). - Omar E. Pol, Feb 04 2012. This was proved in the Dastidar-Gupta paper in Lemma 1. - George Beck, Jun 26 2019
It appears that T(n,k) = A206563(n,k) - A206563(n,k+2). - Omar E. Pol, Feb 26 2012
T(n,k) = Sum_{j=1..n} A182703(j,k). - Omar E. Pol, May 02 2012

Extensions

More terms from Vladeta Jovovic, Jan 11 2002

A138137 First differences of A006128.

Original entry on oeis.org

1, 2, 3, 6, 8, 15, 19, 32, 42, 64, 83, 124, 157, 224, 288, 395, 502, 679, 854, 1132, 1422, 1847, 2307, 2968, 3677, 4671, 5772, 7251, 8908, 11110, 13572, 16792, 20439, 25096, 30414, 37138, 44798, 54389, 65386, 78959, 94558, 113687, 135646, 162375, 193133
Offset: 1

Author

Omar E. Pol, Mar 18 2008

Keywords

Comments

Number of parts in the last section of the set of partitions of n (see A135010, A138121).
Sum of largest parts in all partitions in the head of the last section of the set of partitions of n. - Omar E. Pol, Nov 07 2011
From Omar E. Pol, Feb 16 2021: (Start)
Convolution of A341062 and A000041.
Convolution of A000005 and A002865.
a(n) is also the total number of parts in the n-th section of the set of partitions of any positive integer >= n.
a(n) is also the total number of divisors of all terms in the n-th row of triangle A336811. These divisors are also all parts in the last section of the set of partitions of n. (End)

Examples

			From _Omar E. Pol_, Feb 19 2012: (Start)
Illustration of initial terms (n = 1..6) as sums of the first columns from the last sections of the first six natural numbers (or from the first six sections of 6):
.                                           6
.                                           3+3
.                                           4+2
.                                           2+2+2
.                              5              1
.                              3+2              1
.                    4           1              1
.                    2+2           1              1
.            3         1           1              1
.      2       1         1           1              1
.  1     1       1         1           1              1
. --- ----- ------- --------- ----------- --------------
.  1,  2,    3,      6,        8,          15,
...
Also, we can see that the sequence gives the number of parts in each section. For the number of odd/even parts (and more) see A207031, A207032 and also A206563. (End)
From _Omar E. Pol_, Aug 16 2013: (Start)
The geometric model looks like this:
.                                           _ _ _ _ _ _
.                                          |_ _ _ _ _ _|
.                                          |_ _ _|_ _ _|
.                                          |_ _ _ _|_ _|
.                               _ _ _ _ _  |_ _|_ _|_ _|
.                              |_ _ _ _ _|           |_|
.                     _ _ _ _  |_ _ _|_ _|           |_|
.                    |_ _ _ _|         |_|           |_|
.             _ _ _  |_ _|_ _|         |_|           |_|
.       _ _  |_ _ _|       |_|         |_|           |_|
.   _  |_ _|     |_|       |_|         |_|           |_|
.  |_|   |_|     |_|       |_|         |_|           |_|
.
.   1    2      3        6          8           15
.
(End)
On the other hand for n = 6 the 6th row of triangle A336811 is [6, 4, 3, 2, 2, 1, 1] and the divisors of these terms are [1, 2, 3, 6], [1, 2, 4], [1, 3], [1, 2], [1, 2], [1], [1]. There are 15 divisors so a(6) = 15. - _Omar E. Pol_, Jul 27 2021
		

Programs

  • Maple
    b:= proc(n, i) option remember; local f, g;
          if n=0 then [1, 0]
        elif i<1 then [0, 0]
        elif i>n then b(n, i-1)
        else f:= b(n, i-1); g:= b(n-i, i);
             [f[1]+g[1], f[2]+g[2] +g[1]]
          fi
        end:
    a:= n-> b(n, n)[2] -b(n-1, n-1)[2]:
    seq(a(n), n=1..50);  # Alois P. Heinz, Feb 19 2012
  • Mathematica
    b[n_, i_] := b[n, i] = Module[{f, g}, Which[n == 0, {1, 0}, i<1, {0, 0}, i>n, b[n, i-1], True, f = b[n, i-1]; g = b[n-i, i]; {f[[1]]+g[[1]], f[[2]]+g[[2]]+g[[1]]}]]; a[n_] := b[n, n][[2]]-b[n-1, n-1][[2]]; Table[a[n], {n, 1, 50}] (* Jean-François Alcover, Mar 03 2014, after Alois P. Heinz *)
    Table[PartitionsP[n - 1] + Length@Flatten@Select[IntegerPartitions[n], FreeQ[#, 1] &], {n, 1, 45}] (* Robert Price, May 01 2020 *)

Formula

a(n) = A006128(n) - A006128(n-1).
a(n) = A000041(n-1) + A138135(n). - Omar E. Pol, Nov 07 2011
a(n) ~ exp(Pi*sqrt(2*n/3)) * (2*gamma + log(6*n/Pi^2)) / (8*sqrt(3)*n), where gamma is the Euler-Mascheroni constant A001620. - Vaclav Kotesovec, Oct 21 2016
G.f.: Sum_{i>=1} i*x^i * Product_{j=2..i} 1/(1 - x^j). - Ilya Gutkovskiy, Apr 04 2017

A181187 Triangle read by rows: T(n,k) = sum of k-th largest elements in all partitions of n.

Original entry on oeis.org

1, 3, 1, 6, 2, 1, 12, 5, 2, 1, 20, 8, 4, 2, 1, 35, 16, 8, 4, 2, 1, 54, 24, 13, 7, 4, 2, 1, 86, 41, 22, 13, 7, 4, 2, 1, 128, 61, 35, 20, 12, 7, 4, 2, 1, 192, 95, 54, 33, 20, 12, 7, 4, 2, 1, 275, 136, 80, 49, 31, 19, 12, 7, 4, 2, 1, 399, 204, 121, 76, 48, 31, 19, 12, 7, 4, 2, 1, 556, 284
Offset: 1

Author

Wouter Meeussen, Oct 09 2010

Keywords

Comments

For the connection with A066897 and A066898 see A206563. - Omar E. Pol, Feb 13 2012
T(n,k) is also the total number of parts >= k in all partitions of n. - Omar E. Pol, Feb 14 2012
The first differences of row n together with 1 give the row n of triangle A066633. - Omar E. Pol, Feb 26 2012
We define the k-th rank of a partition as the k-th part minus the number of parts >= k. Since the first part of a partition is also the largest part of the same partition so the Dyson's rank of a partition is the case for k = 1. It appears that the sum of the k-th ranks of all partitions of n is equal to zero. - Omar E. Pol, Mar 04 2012
T(n,k) is also the total number of divisors >= k of all positive integers in a sequence with n blocks where the m-th block consists of A000041(n-m) copies of m, with 1 <= m <= n. - Omar E. Pol, Feb 05 2021

Examples

			From _Omar E. Pol_, Feb 13 2012: (Start)
Illustration of initial terms. First five rows of triangle as sums of columns from the partitions of the first five positive integers:
.
.                            5
.                            3+2
.                  4         4+1
.                  2+2       2+2+1
.          3       3+1       3+1+1
.     2    2+1     2+1+1     2+1+1+1
.  1  1+1  1+1+1   1+1+1+1   1+1+1+1+1
. -------------------------------------
.  1, 3,1, 6,2,1, 12,5,2,1, 20,8,4,2,1 --> This triangle
.  |  |/|  |/|/|   |/|/|/|   |/|/|/|/|
.  1, 2,1, 4,1,1,  7,3,1,1, 12,4,2,1,1 --> A066633
.
For more information see A207031 and A206563.
...
Triangle begins:
    1;
    3,   1;
    6,   2,   1;
   12,   5,   2,  1;
   20,   8,   4,  2,  1;
   35,  16,   8,  4,  2,  1;
   54,  24,  13,  7,  4,  2,  1;
   86,  41,  22, 13,  7,  4,  2,  1;
  128,  61,  35, 20, 12,  7,  4,  2, 1;
  192,  95,  54, 33, 20, 12,  7,  4, 2, 1;
  275, 136,  80, 49, 31, 19, 12,  7, 4, 2, 1;
  399, 204, 121, 76, 48, 31, 19, 12, 7, 4, 2, 1;
(End)
		

Crossrefs

Row sums are A066186. First column is A006128. Reverse of each row converges to A000070.
Columns 2-3: A096541, A207033. - Omar E. Pol, Feb 18 2012
T(2n,n) gives A216053(n+1).
Cf. A206283.

Programs

  • Maple
    p:= (f, g)-> zip((x, y)-> x+y, f, g, 0):
    b:= proc(n, i) option remember; local f, g;
          if n=0 or i=1 then [1, n]
        else f:= b(n, i-1); g:= `if`(i>n, [0], b(n-i, i));
             p(p(f, g), [0$i, g[1]])
          fi
        end:
    T:= proc(n) local j, l, r, t;
          l, r, t:= b(n, n), 1, 1;
          for j from n to 2 by -1 do t:= t+l[j]; r:=r, t od;
          seq([r][1+n-j], j=1..n)
        end:
    seq(T(n), n=1..14); # Alois P. Heinz, Apr 05 2012
  • Mathematica
    Table[Plus @@ (PadRight[ #,n]& /@ IntegerPartitions[n]),{n,16}]
    (* Second program: *)
    T[n_, n_] = 1; T[n_, k_] /; k, ] = 0; Table[Table[T[n, k], {k, n, 1, -1}] // Accumulate // Reverse, {n, 1, 16}] // Flatten (* Jean-François Alcover, Oct 10 2015, after Omar E. Pol *)

Formula

T(n,k) = Sum_{j=1..n} A207031(j,k). - Omar E. Pol, May 02 2012

Extensions

Better definition from Omar E. Pol, Feb 13 2012

A207031 Triangle read by rows: T(n,k) = sum of all parts of the k-th column of the last section of the set of partitions of n.

Original entry on oeis.org

1, 2, 1, 3, 1, 1, 6, 3, 1, 1, 8, 3, 2, 1, 1, 15, 8, 4, 2, 1, 1, 19, 8, 5, 3, 2, 1, 1, 32, 17, 9, 6, 3, 2, 1, 1, 42, 20, 13, 7, 5, 3, 2, 1, 1, 64, 34, 19, 13, 8, 5, 3, 2, 1, 1, 83, 41, 26, 16, 11, 7, 5, 3, 2, 1, 1, 124, 68, 41, 27, 17, 12, 7, 5, 3, 2, 1, 1
Offset: 1

Author

Omar E. Pol, Feb 14 2012

Keywords

Comments

Also T(n,k) is the number of parts >= k in the last section of the set of partitions of n. Therefore T(n,1) = A138137(n), the total number of parts in the last section of the set of partitions of n. For calculation of the number of odd/even parts, etc, follow the same rules from A206563.
More generally, let m and n be two positive integers such that m <= n. It appears that any set formed by m connected sections, or m disconnected sections, or a mixture of both, has the same properties described in the entry A206563.
It appears that reversed rows converge to A000041.
It appears that the first differences of row n together with 1 give the row n of triangle A182703 (see example). - Omar E. Pol, Feb 26 2012

Examples

			Illustration of initial terms. First six rows of triangle as sums of columns from the last sections of the first six natural numbers (or as sums of columns from the six sections of 6):
.                                         6
.                                         3 3
.                                         4 2
.                                         2 2 2
.                            5              1
.                            3 2              1
.                  4           1              1
.                  2 2           1              1
.          3         1           1              1
.     2      1         1           1              1
.  1    1      1         1           1              1
. --- --- ------- --------- ----------- --------------
A: 1, 2,1, 3,1,1,  6,3,1,1,  8,3,2,1,1,  15,8,4,2,1,1
.  |  |/|  |/|/|   |/|/|/|   |/|/|/|/|    |/|/|/|/|/|
B: 1, 1,1, 2,0,1,  3,2,0,1,  5,1,1,0,1,   7,4,2,1,0,1
.
A := initial terms of this triangle.
B := initial terms of triangle A182703.
.
Triangle begins:
1;
2,    1;
3,    1,  1;
6,    3,  1,  1;
8,    3,  2,  1,  1;
15,   8,  4,  2,  1,  1;
19,   8,  5,  3,  2,  1,  1;
32,  17,  9,  6,  3,  2,  1,  1;
42,  20, 13,  7,  5,  3,  2,  1,  1;
64,  34, 19, 13,  8,  5,  3,  2,  1,  1;
83,  41, 26, 16, 11,  7,  5,  3,  2,  1,  1;
124, 68, 41, 27, 17, 12,  7,  5,  3,  2,  1,  1;
		

Formula

From Omar E. Pol, Dec 07 2019: (Start)
From the formula in A138135 (year 2008) we have that:
A000041(n-1) = A138137(n) - A138135(n) = T(n,1) - T(n,2);
Hence A000041(n) = T(n+1,1) - T(n+1,2), n >= 0;
Also A000041(n) = A002865(n) + T(n,1) - T(n,2). (End)

Extensions

More terms from Alois P. Heinz, Feb 17 2012

A066897 Total number of odd parts in all partitions of n.

Original entry on oeis.org

1, 2, 5, 8, 15, 24, 39, 58, 90, 130, 190, 268, 379, 522, 722, 974, 1317, 1754, 2330, 3058, 4010, 5200, 6731, 8642, 11068, 14076, 17864, 22528, 28347, 35490, 44320, 55100, 68355, 84450, 104111, 127898, 156779, 191574, 233625, 284070, 344745, 417292, 504151
Offset: 1

Author

Naohiro Nomoto, Jan 24 2002

Keywords

Comments

Also sum of all odd-indexed parts minus the sum of all even-indexed parts of all partitions of n (Cf. A206563). - Omar E. Pol, Feb 12 2012
Column 1 of A206563. - Omar E. Pol, Feb 15 2012
Suppose that p=[p(1),p(2),p(3),...] is a partition of n with parts in nonincreasing order. Let f(p) = p(1) - p(2) + p(3) - ... be the alternating sum of parts of p and let F(n) = sum of alternating sums of all partitions of n. Conjecture: F(n) = A066897(n) for n >= 1. - Clark Kimberling, May 17 2019
From Omar E. Pol, Apr 02 2023: (Start)
Convolution of A000041 and A001227.
Convolution of A002865 and A060831.
a(n) is also the total number of odd divisors of all positive integers in a sequence with n blocks where the m-th block consists of A000041(n-m) copies of m, with 1 <= m <= n. The mentioned odd divisors are also all odd parts of all partitions of n. (End)
a(n) is odd iff n is a term of A067567 (proof: n*p(n) = the sum of the parts in all the partitions of n == the number of odd parts in all partitions of n (mod 2). Hence the number of odd parts in all partitions of n is odd iff n*p(n) is odd, equivalently, iff both n and p(n) are odd). - Peter Bala, Jan 11 2025

Examples

			a(4) = 8 because in the partitions of 4, namely [4],[3,1],[2,2],[2,1,1],[1,1,1,1], we have a total of 0+2+0+2+4=8 odd parts.
		

Programs

  • Haskell
    a066897 = p 0 1 where
       p o _             0 = o
       p o k m | m < k     = 0
               | otherwise = p (o + mod k 2) k (m - k) + p o (k + 1) m
    -- Reinhard Zumkeller, Mar 09 2012
    
  • Haskell
    a066897 = length . filter odd . concat . ps 1 where
       ps _ 0 = [[]]
       ps i j = [t:ts | t <- [i..j], ts <- ps t (j - t)]
    -- Reinhard Zumkeller, Jul 13 2013
  • Maple
    g:=sum(x^(2*j-1)/(1-x^(2*j-1)),j=1..70)/product(1-x^j,j=1..70): gser:=series(g,x=0,45): seq(coeff(gser,x^n),n=1..44);
    # Emeric Deutsch, Mar 13 2006
    b:= proc(n, i) option remember; local f, g;
          if n=0 or i=1 then [1, n]
        else f:= b(n, i-1); g:= `if`(i>n, [0, 0], b(n-i, i));
             [f[1]+g[1], f[2]+g[2]+ (i mod 2)*g[1]]
          fi
        end:
    a:= n-> b(n, n)[2]:
    seq(a(n), n=1..50);
    # Alois P. Heinz, Mar 22 2012
  • Mathematica
    f[n_, i_] := Count[Flatten[IntegerPartitions[n]], i]
    o[n_] := Sum[f[n, i], {i, 1, n, 2}]
    e[n_] := Sum[f[n, i], {i, 2, n, 2}]
    Table[o[n], {n, 1, 45}]  (* A066897 *)
    Table[e[n], {n, 1, 45}]  (* A066898 *)
    %% - %                   (* A209423 *)
    (* Clark Kimberling, Mar 08 2012 *)
    b[n_, i_] := b[n, i] = Module[{f, g}, If[n==0 || i==1, {1, n}, f = b[n, i-1]; g = If[i>n, {0, 0}, b[n-i, i]]; {f[[1]] + g[[1]], f[[2]] + g[[2]] + Mod[i, 2]*g[[1]]}] ]; a[n_] := b[n, n][[2]]; Table[a[n], {n, 1, 50}] (* Jean-François Alcover, Sep 26 2015, after Alois P. Heinz *)

Formula

a(n) = Sum_{k=1..n} b(k)*numbpart(n-k), where b(k)=A001227(k)=number of odd divisors of k and numbpart() is A000041. - Vladeta Jovovic, Jan 26 2002
a(n) = Sum_{k=0..n} k*A103919(n,k). - Emeric Deutsch, Mar 13 2006
G.f.: Sum_{j>=1}(x^(2j-1)/(1-x^(2j-1)))/Product_{j>=1}(1-x^j). - Emeric Deutsch, Mar 13 2006
a(n) = A066898(n) + A209423(n) = A006128(n) - A066898(n). [Reinhard Zumkeller, Mar 09 2012]
a(n) = A207381(n) - A207382(n). - Omar E. Pol, Mar 11 2012
a(n) = (A006128(n) + A209423(n))/2. - Vaclav Kotesovec, May 25 2018
a(n) ~ exp(Pi*sqrt(2*n/3)) * (2*gamma + log(24*n/Pi^2)) / (8*Pi*sqrt(2*n)), where gamma is the Euler-Mascheroni constant A001620. - Vaclav Kotesovec, May 25 2018

Extensions

More terms from Vladeta Jovovic, Jan 26 2002

A066898 Total number of even parts in all partitions of n.

Original entry on oeis.org

0, 1, 1, 4, 5, 11, 15, 28, 38, 62, 85, 131, 177, 258, 346, 489, 648, 890, 1168, 1572, 2042, 2699, 3475, 4532, 5783, 7446, 9430, 12017, 15106, 19073, 23815, 29827, 37011, 46012, 56765, 70116, 86033, 105627, 128962, 157476, 191359, 232499, 281286, 340180, 409871
Offset: 1

Author

Naohiro Nomoto, Jan 24 2002

Keywords

Comments

Also sum of all even-indexed parts minus the sum of all odd-indexed parts, except the largest parts, of all partitions of n (cf. A206563). - Omar E. Pol, Feb 14 2012
From Omar E. Pol, Apr 06 2023: (Start)
Convolution of A000041 and A183063.
Convolution of A002865 and A362059.
a(n) is also the total number of even divisors of all positive integers in a sequence with n blocks where the m-th block consists of A000041(n-m) copies of m, with 1 <= m <= n. The mentioned even divisors are also all even parts of all partitions of n. (End)

Examples

			a(5) = 5 because in all the partitions of 5, namely [5], [4,1], [3,2], [3,1,1], [2,2,1], [2,1,1,1], [1,1,1,1,1], we have a total of 0+1+1+0+2+1+0=5 even parts.
		

Programs

  • Haskell
    a066898 = p 0 1 where
       p e _             0 = e
       p e k m | m < k     = 0
               | otherwise = p (e + 1 - mod k 2) k (m - k) + p e (k + 1) m
    -- Reinhard Zumkeller, Mar 09 2012
    
  • Haskell
    a066898 = length . filter even . concat . ps 1 where
       ps _ 0 = [[]]
       ps i j = [t:ts | t <- [i..j], ts <- ps t (j - t)]
    -- Reinhard Zumkeller, Jul 13 2013
  • Maple
    g:=sum(x^(2*j)/(1-x^(2*j)),j=1..60)/product((1-x^j),j=1..60): gser:=series(g,x=0,55): seq(coeff(gser,x,n),n=1..50); # Emeric Deutsch, Feb 17 2006
    A066898 := proc(n)
        add(numtheory[tau](k)*combinat[numbpart](n-2*k),k=1..n/2) ;
    end proc: # R. J. Mathar, Jun 18 2016
  • Mathematica
    f[n_, i_] := Count[Flatten[IntegerPartitions[n]], i]
    o[n_] := Sum[f[n, i], {i, 1, n, 2}]
    e[n_] := Sum[f[n, i], {i, 2, n, 2}]
    Table[o[n], {n, 1, 45}]  (* A066897 *)
    Table[e[n], {n, 1, 45}]  (* A066898 *)
    %% - %                   (* A209423 *)
    (* Clark Kimberling, Mar 08 2012 *)
    a[n_] := Sum[DivisorSigma[0, k] PartitionsP[n - 2k], {k, 1, n/2}]; Table[a[n], {n, 1, 50}] (* Jean-François Alcover, Aug 31 2016, after Vladeta Jovovic *)

Formula

a(n) = Sum_{k=1..floor(n/2)} tau(k)*numbpart(n-2*k). - Vladeta Jovovic, Jan 26 2002
a(n) = Sum_{k=0..floor(n/2)} k*A116482(n,k). - Emeric Deutsch, Feb 17 2006
G.f.: (Sum_{j>=1} x^(2*j)/(1-x^(2*j)))/(Product_{j>=1} (1-x^j)). - Emeric Deutsch, Feb 17 2006
a(n) = A066897(n) - A209423(n) = A006128(n) - A066897(n). - Reinhard Zumkeller, Mar 09 2012
a(n) = (A006128(n) - A209423(n))/2. - Vaclav Kotesovec, May 25 2018
a(n) ~ exp(Pi*sqrt(2*n/3)) * (2*gamma + log(3*n/(2*Pi^2))) / (8*Pi*sqrt(2*n)), where gamma is the Euler-Mascheroni constant A001620. - Vaclav Kotesovec, May 25 2018

Extensions

More terms from Vladeta Jovovic, Jan 26 2002

A207032 Triangle read by rows: T(n,k) = number of odd/even parts >= k in the last section of the set of partitions of n, if k is odd/even.

Original entry on oeis.org

1, 1, 1, 3, 0, 1, 3, 3, 0, 1, 7, 1, 2, 0, 1, 9, 6, 2, 2, 0, 1, 15, 4, 4, 1, 2, 0, 1, 19, 13, 4, 5, 1, 2, 0, 1, 32, 10, 10, 3, 4, 1, 2, 0, 1, 40, 24, 10, 9, 4, 4, 1, 2, 0, 1, 60, 23, 18, 8, 8, 3, 4, 1, 2, 0, 1, 78, 46, 22, 19, 8, 9, 3, 4, 1, 2, 0, 1
Offset: 1

Author

Omar E. Pol, Feb 17 2012

Keywords

Comments

For the calculation of row n, the number of odd/even parts, etc, take the row n from the triangle A207031 and then follow the same rules of A206563.

Examples

			Triangle begins:
  1;
  1,   1;
  3,   0,  1;
  3,   3,  0,  1;
  7,   1,  2,  0, 1;
  9,   6,  2,  2, 0, 1;
  15,  4,  4,  1, 2, 0, 1;
  19, 13,  4,  5, 1, 2, 0, 1;
  32, 10, 10,  3, 4, 1, 2, 0, 1;
  40, 24, 10,  9, 4, 4, 1, 2, 0, 1;
  60, 23, 18,  8, 8, 3, 4, 1, 2, 0, 1;
  78, 46, 22, 19, 8, 9, 3, 4, 1, 2, 0, 1;
		

Formula

It appears that T(n,k) = abs(Sum_{j=k..n} (-1)^j*A207031(n,j)).
It appears that A182703(n,k) = T(n,k) - T(n,k+2). - Omar E. Pol, Feb 26 2012

A209423 Difference between the number of odd parts and the number of even parts in all the partitions of n.

Original entry on oeis.org

1, 1, 4, 4, 10, 13, 24, 30, 52, 68, 105, 137, 202, 264, 376, 485, 669, 864, 1162, 1486, 1968, 2501, 3256, 4110, 5285, 6630, 8434, 10511, 13241, 16417, 20505, 25273, 31344, 38438, 47346, 57782, 70746, 85947, 104663, 126594, 153386, 184793, 222865, 267452
Offset: 1

Author

Clark Kimberling, Mar 08 2012

Keywords

Comments

a(n) = number of parts of odd multiplicity (each counted only once) in all partitions of n. Example: a(5) = 10 because we have [5'],[4',1'],[3',2'], [3',1,1],[2,2,1'],[2',1',1,1], and [1',1,1,1,1] (the 10 counted parts are marked). - Emeric Deutsch, Feb 08 2016

Examples

			The partitions of 5 are [5], [4,1], [3,2], [3,1,1], [2,2,1], [2,1,1,1], and [1,1,1,1,1], a total of 15 odd parts and 5 even parts, so that a(5)=10.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; local m, f, g;
          m:= irem(i, 2);
          if n=0 then [1, 0, 0]
        elif i<1 then [0, 0, 0]
        else f:= b(n, i-1); g:= `if`(i>n, [0$3], b(n-i, i));
             [f[1]+g[1], f[2]+g[2]+m*g[1], f[3]+g[3]+(1-m)*g[1]]
          fi
        end:
    a:= n-> b(n, n)[2] -b(n, n)[3]:
    seq(a(n), n=1..50);  # Alois P. Heinz, Jul 09 2012
    g := add(x^j/(1+x^j), j = 1 .. 80)/mul(1-x^j, j = 1 .. 80): gser := series(g, x = 0, 50): seq(coeff(gser, x, n), n = 0 .. 45); # Emeric Deutsch, Feb 08 2016
  • Mathematica
    f[n_, i_] := Count[Flatten[IntegerPartitions[n]], i]
    o[n_] := Sum[f[n, i], {i, 1, n, 2}]
    e[n_] := Sum[f[n, i], {i, 2, n, 2}]
    Table[o[n], {n, 1, 45}]  (* A066897 *)
    Table[e[n], {n, 1, 45}]  (* A066898 *)
    %% - %                   (* A209423 *)
    b[n_, i_] := b[n, i] = Module[{m, f, g}, m = Mod[i, 2]; If[n==0, {1, 0, 0}, If[i<1, {0, 0, 0}, f = b[n, i-1]; g = If[i>n, {0, 0, 0}, b[n-i, i]]; {f[[1]] + g[[1]], f[[2]] + g[[2]] + m*g[[1]], f[[3]] + g[[3]] + (1-m)* g[[1]]}]]]; a[n_] := b[n, n][[2]] - b[n, n][[3]]; Table[a[n], {n, 1, 50}] (* Jean-François Alcover, Nov 16 2015, after Alois P. Heinz *)

Formula

a(n) = A066897(n) - A066898(n) = A206563(n,1) - A206563(n,2). - Omar E. Pol, Mar 08 2012
G.f.: Sum_{j>0} x^j/(1+x^j)/Product_{k>0}(1 - x^k). - Emeric Deutsch, Feb 08 2016
a(n) = Sum_{i=1..n} (-1)^(i + 1)*A181187(n, i). - John M. Campbell, Mar 18 2018
a(n) ~ log(2) * exp(Pi*sqrt(2*n/3)) / (2^(3/2) * Pi * sqrt(n)). - Vaclav Kotesovec, May 25 2018
For n > 0, a(n) = A305121(n) + A305123(n). - Vaclav Kotesovec, May 26 2018
a(n) = Sum_{k=-floor(n/2)+(n mod 2)..n} k * A240009(n,k). - Alois P. Heinz, Oct 23 2018
a(n) = Sum_{k>0} k * A264398(n,k). - Alois P. Heinz, Aug 05 2020

A210947 Triangle read by rows: T(n,k) = total number of parts <= k of all partitions of n.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 10, 11, 12, 12, 16, 18, 19, 20, 19, 27, 31, 33, 34, 35, 30, 41, 47, 50, 52, 53, 54, 45, 64, 73, 79, 82, 84, 85, 86, 67, 93, 108, 116, 121, 124, 126, 127, 128, 97, 138, 159, 172, 180, 185, 188, 190, 191, 192
Offset: 1

Author

Omar E. Pol, May 01 2012

Keywords

Comments

Row n lists the partial sums of row n of triangle A066633.

Examples

			Triangle begins:
1;
2,   3;
4,   5,  6;
7,  10,  11,  12;
12, 16,  18,  19,  20;
19, 27,  31,  33,  34,  35;
30, 41,  47,  50,  52,  53,  54;
45, 64,  73,  79,  82,  84,  85,  86;
67, 93, 108, 116, 121, 124, 126, 127, 128;
		

Crossrefs

Column 1 is A000070(n-1). Right border gives A006128.

Programs

  • Maple
    p:= (f, g)-> zip((x, y)-> x+y, f, g, 0):
    b:= proc(n, i) option remember; local f, g;
          if n=0 then [1]
        elif i=1 then [1, n]
        else f:= b(n, i-1); g:= `if`(i>n, [0], b(n-i, i));
             p (p (f, g), [0$i, g[1]])
          fi
        end:
    T:= proc(n, k) option remember;
           b(n, n)[k+1] +`if`(k<2, 0, T(n, k-1))
        end:
    seq (seq (T(n,k), k=1..n), n=1..11); # Alois P. Heinz, May 02 2012
  • Mathematica
    p[f_, g_] := With[{m = Max[Length[f], Length[g]]}, PadRight[f, m, 0] + PadRight[g, m, 0]]; b[n_, i_] := b[n, i] = Module[{f, g}, If[n == 0, {1}, If[i == 1, {1, n}, f = b[n, i-1]; g = If[i>n, {0}, b[n-i, i]]; p[p[f, g], Append[Array[0&, i], g[[1]] ]]]]]; T[n_, k_] := T[n, k] = b[n, n][[k+1]] + If[k<2, 0, T[n, k-1]]; Table [Table [T[n, k], {k, 1, n}], {n, 1, 11}] // Flatten (* Jean-François Alcover, Mar 11 2015, after Alois P. Heinz *)

Formula

T(n,k) = Sum_{j=1..k} A066633(n,j).
Showing 1-10 of 18 results. Next