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

A024786 Number of 2's in all partitions of n.

Original entry on oeis.org

0, 1, 1, 3, 4, 8, 11, 19, 26, 41, 56, 83, 112, 160, 213, 295, 389, 526, 686, 911, 1176, 1538, 1968, 2540, 3223, 4115, 5181, 6551, 8191, 10269, 12756, 15873, 19598, 24222, 29741, 36532, 44624, 54509, 66261, 80524, 97446, 117862, 142029, 171036, 205290, 246211
Offset: 1

Views

Author

Keywords

Comments

Also number of partitions of n-1 with a distinguished part different from all the others. [Comment corrected by Emeric Deutsch, Aug 13 2008]
In general the number of times that j appears in the partitions of n equals Sum_{kA024787, ..., A024794, for j = 2,...,10; it generalizes the formula given for A000070 for j=1. - Jose Luis Arregui (arregui(AT)posta.unizar.es), Apr 05 2002
Equals row sums of triangle A173238. - Gary W. Adamson, Feb 13 2010
The sums of two successive terms give A000070. - Omar E. Pol, Jul 12 2012
a(n) is also the difference between the sum of second largest and the sum of third largest elements in all partitions of n. More generally, the number of occurrences of k in all partitions of n equals the difference between the sum of k-th largest and the sum of (k+1)st largest elements in all partitions of n. And more generally, the sum of the number of occurrences of k, k+1, k+2..k+m in all partitions of n equals the difference between the sum of k-th largest and the sum of (k+m+1)st largest elements in all partitions of n. - Omar E. Pol, Oct 25 2012
Number of singletons in all partitions of n-1. A singleton in a partition is a part that occurs exactly once. Example: a(5) = 4 because in the partitions of 4, namely [1,1,1,1], [1,1,2'], [2,2], [1',3'], [4'] we have 4 singletons (marked by '). - Emeric Deutsch, Sep 12 2016
a(n) is also the number of non-isomorphic vertex-transitive cover graphs of lattice quotients of essential lattice congruences of the weak order on the symmetric group S_{n-1}. See Table 1 in the Hoang/Mütze reference in the Links section. - Torsten Muetze, Nov 28 2019
Assuming a partition is in weakly decreasing order, a(n) is also the number of times -1 occurs in the differences of the partitions of n+1. - George Beck, Mar 28 2023

Examples

			From _Omar E. Pol_, Oct 25 2012: (Start)
For n = 7 we have:
--------------------------------------
.                             Number
Partitions of 7               of 2's
--------------------------------------
7 .............................. 0
4 + 3 .......................... 0
5 + 2 .......................... 1
3 + 2 + 2 ...................... 2
6 + 1 .......................... 0
3 + 3 + 1 ...................... 0
4 + 2 + 1 ...................... 1
2 + 2 + 2 + 1 .................. 3
5 + 1 + 1 ...................... 0
3 + 2 + 1 + 1 .................. 1
4 + 1 + 1 + 1 .................. 0
2 + 2 + 1 + 1 + 1 .............. 2
3 + 1 + 1 + 1 + 1 .............. 0
2 + 1 + 1 + 1 + 1 + 1 .......... 1
1 + 1 + 1 + 1 + 1 + 1 + 1 ...... 0
------------------------------------
.  24 - 13 =                    11
.
The difference between the sum of the second column and the sum of the third column of the set of partitions of 7 is 24 - 13 = 11 and equals the number of 2's in all partitions of 7, so a(7) = 11.
(End)
		

References

  • J. Riordan, Combinatorial Identities, Wiley, 1968, p. 184.

Crossrefs

Column 2 of A060244.
First differences of A000097.

Programs

  • Maple
    b:= proc(n, i) option remember; local f, g;
          if n=0 or i=1 then [1, 0]
        else f:= b(n, i-1); g:= `if`(i>n, [0$2], b(n-i, i));
             [f[1]+g[1], f[2]+g[2]+`if`(i=2, g[1], 0)]
          fi
        end:
    a:= n-> b(n, n)[2]:
    seq(a(n), n=1..50);  # Alois P. Heinz, May 18 2012
  • Mathematica
    Table[ Count[ Flatten[ IntegerPartitions[n]], 2], {n, 1, 50} ]
    (* Second program: *)
    b[n_, i_] := b[n, i] = Module[{f, g}, If[n==0 || i==1, {1, 0}, f = b[n, i - 1]; g = If[i>n, {0, 0}, b[n-i, i]]; {f[[1]] + g[[1]], f[[2]] + g[[2]] + If[i == 2, g[[1]], 0]}]]; a[n_] := b[n, n][[2]]; Table[a[n], {n, 1, 50}] (* Jean-François Alcover, Sep 22 2015, after Alois P. Heinz *)
    Join[{0}, (1/((1 - x^2) QPochhammer[x]) + O[x]^50)[[3]]] (* Vladimir Reshetnikov, Nov 22 2016 *)
    Table[Sum[(1 + (-1)^k)/2 * PartitionsP[n-k], {k, 2, n}], {n, 1, 50}] (* Vaclav Kotesovec, Aug 27 2017 *)
  • Python
    from sympy import npartitions
    def A024786(n): return sum(npartitions(n-(k<<1)) for k in range(1,(n>>1)+1)) # Chai Wah Wu, Oct 25 2023

Formula

a(n) = Sum_{k=1..floor(n/2)} A000041(n-2k). - Christian G. Bower, Jun 22 2000
a(n) = Sum_{kA000041, P(0) = 1. - Jose Luis Arregui (arregui(AT)posta.unizar.es), Apr 05 2002
G.f.: (x^2/((1-x)*(1-x^2)^2))*Product_{j>=3} 1/(1-x^j) from Riordan reference second term, last eq.
a(n) = A006128(n-1) - A194452(n-1). - Omar E. Pol, Nov 20 2011
a(n) = A181187(n,2) - A181187(n,3). - Omar E. Pol, Oct 25 2012
a(n) ~ exp(Pi*sqrt(2*n/3)) / (2^(5/2) * Pi * sqrt(n)) * (1 - 25*Pi/(24*sqrt(6*n)) + (25/48 + 433*Pi^2/6912)/n). - Vaclav Kotesovec, Mar 07 2016, extended Nov 05 2016
a(n) = Sum_{k} k * A116595(n-1,k). - Emeric Deutsch, Sep 12 2016
G.f.: x^2/((1 - x)*(1 - x^2)) * Sum_{n >= 0} x^(2*n)/( Product_{k = 1..n} 1 - x^k ); that is, convolution of A004526 (partitions into 2 parts, or, modulo offset differences, partitions into parts <= 2) and A002865 (partitions into parts >= 2). - Peter Bala, Jan 17 2021

A024788 Number of 4's in all partitions of n.

Original entry on oeis.org

0, 0, 0, 1, 1, 2, 3, 6, 8, 13, 18, 28, 38, 55, 74, 105, 139, 190, 250, 336, 436, 575, 740, 963, 1228, 1577, 1995, 2538, 3186, 4013, 5005, 6256, 7751, 9617, 11847, 14605, 17894, 21927, 26730, 32582, 39531, 47942, 57915, 69920, 84114, 101116, 121176, 145095, 173248
Offset: 1

Views

Author

Keywords

Comments

The sums of four successive terms give A000070. - Omar E. Pol, Jul 12 2012
a(n) is also the difference between the sum of 4th largest and the sum of 5th largest elements in all partitions of n. - Omar E. Pol, Oct 25 2012
a(n+4) is the number of n-vertex graphs that do not contain a triangle, P_4, or K_2,3 as induced subgraph. These are the K_2,3-free bipartite cographs. Bipartite cographs are graph that are disjoint unions of complete bipartite graphs [Babel et al. Corollary 2.2], and forbidding K_2,3 leaves one possible component for each size except size 4, where there are two. Thus, this number is A000041(n) + a(n) = a(n+4). - Falk Hüffner, Jan 11 2016
a(n) (n>=3) is the number of even singletons in all partitions of n-2 (by a singleton we mean a part that occurs exactly once). Example: a(7) = 3 because in the partitions [5], [4*,1], [3,2*], [3,1,1], [2,2,1], [2*,1,1,1], [1,1,1,1,1] we have 3 even singletons (marked by *). The statement of this comment can be obtained by setting k=2 in Theorem 2 of the Andrews et al. reference. - Emeric Deutsch, Sep 13 2016

Examples

			From _Omar E. Pol_, Oct 25 2012: (Start)
For n = 7 we have:
--------------------------------------
.                             Number
Partitions of 7               of 4's
--------------------------------------
7 .............................. 0
4 + 3 .......................... 1
5 + 2 .......................... 0
3 + 2 + 2 ...................... 0
6 + 1 .......................... 0
3 + 3 + 1 ...................... 0
4 + 2 + 1 ...................... 1
2 + 2 + 2 + 1 .................. 0
5 + 1 + 1 ...................... 0
3 + 2 + 1 + 1 .................. 0
4 + 1 + 1 + 1 .................. 1
2 + 2 + 1 + 1 + 1 .............. 0
3 + 1 + 1 + 1 + 1 .............. 0
2 + 1 + 1 + 1 + 1 + 1 .......... 0
1 + 1 + 1 + 1 + 1 + 1 + 1 ...... 0
------------------------------------
.           7 - 4 =              3
The difference between the sum of the fourth column and the sum of the fifth column of the set of partitions of 7 is 7 - 4 = 3 and equals the number of 4's in all partitions of 7, so a(7) = 3.
(End)
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; local f, g;
          if n=0 or i=1 then [1, 0]
        else f:= b(n, i-1); g:= `if`(i>n, [0$2], b(n-i, i));
             [f[1]+g[1], f[2]+g[2]+`if`(i=4, g[1], 0)]
          fi
        end:
    a:= n-> b(n, n)[2]:
    seq(a(n), n=1..100);  # Alois P. Heinz, Oct 27 2012
  • Mathematica
    Table[ Count[ Flatten[ IntegerPartitions[n]], 4], {n, 1, 50} ]
    (* second program: *)
    b[n_, i_] := b[n, i] = Module[{g}, If[n == 0 || i == 1, {1, 0}, g = If[i > n, {0, 0}, b[n - i, i]]; b[n, i - 1] + g + {0, If[i == 4, g[[1]], 0]}]]; a[n_] := b[n, n][[2]]; Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Oct 09 2015, after Alois P. Heinz *)

Formula

a(n) = A181187(n,4) - A181187(n,5). - Omar E. Pol, Oct 25 2012
From Peter Bala, Dec 26 2013: (Start)
a(n+4) - a(n) = A000041(n). a(n) + a(n+2) = A024786(n).
O.g.f.: x^4/(1 - x^4) * product {k >= 1} 1/(1 - x^k) = x^4 + x^5 + 2*x^6 + 3*x^7 + ....
Asymptotic result: log(a(n)) ~ 2*sqrt(Pi^2/6)*sqrt(n) as n -> inf. (End)
a(n) ~ exp(Pi*sqrt(2*n/3)) / (8*Pi*sqrt(2*n)) * (1 - 49*Pi/(24*sqrt(6*n)) + (49/48 + 1633*Pi^2/6912)/n). - Vaclav Kotesovec, Nov 05 2016
G.f.: x^4/((1 - x)*(1 - x^2)*(1 - x^3)*(1 - x^4)) * Sum_{n >= 0} x^(4*n)/( Product_{k = 1..n} 1 - x^k ); that is, convolution of A026810 (partitions into 4 parts, or, modulo offset differences, partitions into parts <= 4) and A008484 (partitions into parts >= 4). - Peter Bala, Jan 17 2021

A024789 Number of 5's in all partitions of n.

Original entry on oeis.org

0, 0, 0, 0, 1, 1, 2, 3, 5, 8, 12, 17, 25, 35, 50, 68, 94, 126, 170, 226, 299, 391, 511, 660, 853, 1091, 1393, 1766, 2235, 2811, 3527, 4403, 5484, 6800, 8415, 10369, 12752, 15627, 19110, 23298, 28346, 34389, 41642, 50295, 60636, 72929, 87563, 104903, 125470
Offset: 1

Views

Author

Keywords

Comments

The sums of five successive terms give A000070. - Omar E. Pol, Jul 12 2012
a(n) is also the difference between the sum of 5th largest and the sum of 6th largest elements in all partitions of n. - Omar E. Pol, Oct 25 2012

Examples

			From _Omar E. Pol_, Oct 25 2012: (Start)
For n = 8 we have:
--------------------------------------
.                             Number
Partitions of 8               of 5's
--------------------------------------
8 .............................. 0
4 + 4 .......................... 0
5 + 3 .......................... 1
6 + 2 .......................... 0
3 + 3 + 2 ...................... 0
4 + 2 + 2 ...................... 0
2 + 2 + 2 + 2 .................. 0
7 + 1 .......................... 0
4 + 3 + 1 ...................... 0
5 + 2 + 1 ...................... 1
3 + 2 + 2 + 1 .................. 0
6 + 1 + 1 ...................... 0
3 + 3 + 1 + 1 .................. 0
4 + 2 + 1 + 1 .................. 0
2 + 2 + 2 + 1 + 1 .............. 0
5 + 1 + 1 + 1 .................. 1
3 + 2 + 1 + 1 + 1 .............. 0
4 + 1 + 1 + 1 + 1 .............. 0
2 + 2 + 1 + 1 + 1 + 1 .......... 0
3 + 1 + 1 + 1 + 1 + 1 .......... 0
2 + 1 + 1 + 1 + 1 + 1 + 1 ...... 0
1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 .. 0
------------------------------------
.               7 - 4 =          3
The difference between the sum of the fifth column and the sum of the sixth column of the set of partitions of 8 is 7 - 4 = 3 and equals the number of 5's in all partitions of 8, so a(8) = 3.
(End)
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; local g;
          if n=0 or i=1 then [1, 0]
        else g:= `if`(i>n, [0$2], b(n-i, i));
             b(n, i-1) +g +[0, `if`(i=5, g[1], 0)]
          fi
        end:
    a:= n-> b(n, n)[2]:
    seq(a(n), n=1..100);  # Alois P. Heinz, Oct 27 2012
  • Mathematica
    Table[ Count[ Flatten[ IntegerPartitions[n]], 5], {n, 1, 50} ]
    (* second program: *)
    b[n_, i_] := b[n, i] = Module[{g}, If[n == 0 || i == 1, {1, 0}, g = If[i > n, {0, 0}, b[n - i, i]]; b[n, i - 1] + g + {0, If[i == 5, g[[1]], 0]}]]; a[n_] := b[n, n][[2]]; Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Oct 09 2015, after Alois P. Heinz *)
  • PARI
    x='x+O('x^50); concat([0, 0, 0, 0], Vec(x^5/(1 - x^5) * prod(k=1, 50, 1/(1 - x^k)))) \\ Indranil Ghosh, Apr 06 2017

Formula

a(n) = A181187(n,5) - A181187(n,6). - Omar E. Pol, Oct 25 2012
a(n) ~ exp(Pi*sqrt(2*n/3)) / (10*Pi*sqrt(2*n)) * (1 - 61*Pi/(24*sqrt(6*n)) + (61/48 + 2521*Pi^2/6912)/n). - Vaclav Kotesovec, Nov 05 2016
G.f.: x^5/(1 - x^5) * Product_{k>=1} 1/(1 - x^k). - Ilya Gutkovskiy, Apr 06 2017

A024790 Number of 6's in all partitions of n.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 1, 2, 3, 5, 7, 12, 16, 24, 33, 47, 63, 89, 117, 159, 209, 278, 360, 474, 607, 786, 1001, 1280, 1615, 2049, 2565, 3222, 4011, 4998, 6180, 7653, 9407, 11571, 14154, 17308, 21063, 25630, 31044, 37586, 45339, 54646, 65646, 78804, 94305, 112761, 134473
Offset: 1

Views

Author

Keywords

Comments

The sums of six successive terms give A000070. - Omar E. Pol, Jul 12 2012
a(n) is also the difference between the sum of 6th largest and the sum of 7th largest elements in all partitions of n. - Omar E. Pol, Oct 25 2012

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; local g;
          if n=0 or i=1 then [1, 0]
        else g:= `if`(i>n, [0$2], b(n-i, i));
             b(n, i-1) +g +[0, `if`(i=6, g[1], 0)]
          fi
        end:
    a:= n-> b(n, n)[2]:
    seq(a(n), n=1..100);  # Alois P. Heinz, Oct 27 2012
  • Mathematica
    Table[ Count[ Flatten[ IntegerPartitions[n]], 6], {n, 1, 52} ]
    b[n_, i_] := b[n, i] = Module[{g}, If [n == 0 || i == 1, {1, 0}, g = If[i > n, {0, 0}, b[n - i, i]]; b[n, i - 1] + g + {0, If[i == 6, g[[1]], 0]}]]; a[n_] := b[n, n][[2]]; Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Oct 09 2015, after Alois P. Heinz *)

Formula

a(n) = A181187(n,6) - A181187(n,7). - Omar E. Pol, Oct 25 2012
From Peter Bala, Dec 26 2013: (Start)
a(n+6) - a(n) = A000041(n). a(n) + a(n+3) = A024787(n).
a(n) + a(n+2) + a(n+4) = A024786(n).
O.g.f.: x^6/(1 - x^6) * product {k >= 1} 1/(1 - x^k) = x^6 + x^7 + 2*x^8 + 3*x^9 + ....
Asymptotic result: log(a(n)) ~ 2*sqrt(Pi^2/6)*sqrt(n) as n -> inf. (End)
a(n) ~ exp(Pi*sqrt(2*n/3)) / (12*Pi*sqrt(2*n)) * (1 - 73*Pi/(24*sqrt(6*n)) + (73/48 + 3601*Pi^2/6912)/n). - Vaclav Kotesovec, Nov 05 2016

A024794 Number of 10's in all partitions of n.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 3, 5, 7, 11, 15, 22, 30, 43, 57, 79, 104, 140, 183, 242, 312, 407, 520, 670, 849, 1081, 1359, 1715, 2141, 2678, 3322, 4125, 5085, 6274, 7691, 9430, 11502, 14025, 17024, 20655, 24959, 30140, 36270, 43612, 52274, 62604, 74763
Offset: 1

Views

Author

Keywords

Comments

The sums of ten successive terms give A000070. - Omar E. Pol, Jul 12 2012
a(n) is also the difference between the sum of 10th largest and the sum of 11th largest elements in all partitions of n. - Omar E. Pol, Oct 25 2012
In general, if m>0 and a(n+m)-a(n) = A000041(n), then a(n) ~ exp(sqrt(2*n/3)*Pi) / (2*Pi*m*sqrt(2*n)) * (1 - Pi*(1/24 + m/2)/sqrt(6*n) + (1/48 + Pi^2/6912 + m/4 + m*Pi^2/288 + m^2*Pi^2/72)/n). - Vaclav Kotesovec, Nov 05 2016

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; local g;
          if n=0 or i=1 then [1, 0]
        else g:= `if`(i>n, [0$2], b(n-i, i));
             b(n, i-1) +g +[0, `if`(i=10, g[1], 0)]
          fi
        end:
    a:= n-> b(n, n)[2]:
    seq(a(n), n=1..100);  # Alois P. Heinz, Oct 27 2012
  • Mathematica
    Table[ Count[ Flatten[ IntegerPartitions[n]], 10], {n, 1, 55} ]
    b[n_, i_] := b[n, i] = Module[{g}, If[n == 0 || i == 1, {1, 0}, g = If[i > n, {0, 0}, b[n - i, i]]; b[n, i - 1] + g + {0, If[i == 10, g[[1]], 0]}]]; a[n_] := b[n, n][[2]]; Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Oct 09 2015, after Alois P. Heinz *)

Formula

a(n) = A181187(n,10) - A181187(n,11). - Omar E. Pol, Oct 25 2012
From Peter Bala, Dec 26 2013: (Start)
a(n+10) - a(n) = A000041(n). a(n) + a(n+5) = A024789(n).
a(n) + a(n+2) + a(n+4) + a(n+6) + a(n+8) = A024786(n).
O.g.f.: x^10/(1 - x^10) * product {k >= 1} 1/(1 - x^k) = x^10 + x^11 + 2*x^12 + 3*x^13 + ....
Asymptotic result: log(a(n)) ~ 2*sqrt(Pi^2/6)*sqrt(n) as n -> inf. (End)
a(n) ~ exp(Pi*sqrt(2*n/3)) / (20*Pi*sqrt(2*n)) * (1 - 121*Pi/(24*sqrt(6*n)) + (121/48 + 9841*Pi^2/6912)/n). - Vaclav Kotesovec, Nov 05 2016

A024791 Number of 7's in all partitions of n.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 1, 1, 2, 3, 5, 7, 11, 16, 23, 32, 45, 61, 84, 112, 151, 199, 263, 342, 446, 574, 739, 943, 1201, 1518, 1917, 2404, 3010, 3749, 4661, 5766, 7122, 8759, 10753, 13153, 16059, 19544, 23743, 28759, 34774, 41938, 50491, 60642, 72718, 87004, 103934, 123908
Offset: 1

Views

Author

Keywords

Comments

The sums of seven successive terms give A000070. - Omar E. Pol, Jul 12 2012
a(n) is also the difference between the sum of 7th largest and the sum of 8th largest elements in all partitions of n. - Omar E. Pol, Oct 25 2012

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; local g;
          if n=0 or i=1 then [1, 0]
        else g:= `if`(i>n, [0$2], b(n-i, i));
             b(n, i-1) +g +[0, `if`(i=7, g[1], 0)]
          fi
        end:
    a:= n-> b(n, n)[2]:
    seq(a(n), n=1..100);  # Alois P. Heinz, Oct 27 2012
  • Mathematica
    << DiscreteMath`Combinatorica`; Table[ Count[ Flatten[ Partitions[n]], 7], {n, 1, 52} ]
    Table[Count[Flatten[IntegerPartitions[n]],7],{n,55}] (* Harvey P. Dale, Feb 26 2015 *)
    b[n_, i_] := b[n, i] = Module[{g}, If[n == 0 || i == 1, {1, 0}, g = If[i > n, {0, 0}, b[n - i, i]]; b[n, i - 1] + g + {0, If[i == 7, g[[1]], 0]}]]; a[n_] := b[n, n][[2]]; Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Oct 09 2015, after Alois P. Heinz *)
  • PARI
    x='x+O('x^50); concat([0, 0, 0, 0, 0, 0], Vec(x^7/(1 - x^7) * prod(k=1, 50, 1/(1 - x^k)))) \\ Indranil Ghosh, Apr 06 2017

Formula

a(n) = A181187(n,7) - A181187(n,8). - Omar E. Pol, Oct 25 2012
a(n) ~ exp(Pi*sqrt(2*n/3)) / (14*Pi*sqrt(2*n)) * (1 - 85*Pi/(24*sqrt(6*n)) + (85/48 + 4873*Pi^2/6912)/n). - Vaclav Kotesovec, Nov 05 2016
G.f.: x^7/(1 - x^7) * Product_{k>=1} 1/(1 - x^k). - Ilya Gutkovskiy, Apr 06 2017

A024792 Number of 8's in all partitions of n.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 3, 5, 7, 11, 15, 23, 31, 44, 59, 82, 108, 146, 191, 254, 328, 429, 549, 709, 900, 1148, 1446, 1829, 2286, 2865, 3559, 4427, 5465, 6752, 8288, 10178, 12429, 15175, 18442, 22404, 27102, 32767, 39473, 47516, 57012, 68349, 81703, 97579, 116236
Offset: 1

Views

Author

Keywords

Comments

The sums of eight successive terms give A000070. - Omar E. Pol, Jul 12 2012
a(n) is also the difference between the sum of 8th largest and the sum of 9th largest elements in all partitions of n. - Omar E. Pol, Oct 25 2012

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; local g;
          if n=0 or i=1 then [1, 0]
        else g:= `if`(i>n, [0$2], b(n-i, i));
             b(n, i-1) +g +[0, `if`(i=8, g[1], 0)]
          fi
        end:
    a:= n-> b(n, n)[2]:
    seq(a(n), n=1..100);  # Alois P. Heinz, Oct 27 2012
  • Mathematica
    Table[ Count[ Flatten[ IntegerPartitions[n]], 8], {n, 1, 53} ]
    (* second program: *)
    b[n_, i_] := b[n, i] = Module[{g}, If[n == 0 || i == 1, {1, 0}, g = If[i > n, {0, 0}, b[n - i, i]]; b[n, i - 1] + g + {0, If[i == 8, g[[1]], 0]}]]; a[n_] := b[n, n][[2]]; Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Oct 09 2015, after Alois P. Heinz *)

Formula

a(n) = A181187(n,8) - A181187(n,9). - Omar E. Pol, Oct 25 2012
From Peter Bala, Dec 26 2013: (Start)
a(n+8) - a(n) = A000041(n). a(n) + a(n+4) = A024788(n).
a(n) + a(n+2) + a(n+4) + a(n+6) = A024786(n).
O.g.f.: x^8/(1 - x^8) * product {k >= 1} 1/(1 - x^k) = x^8 + x^9 + 2*x^10 + 3*x^11 + ....
Asymptotic result: log(a(n)) ~ 2*sqrt(Pi^2/6)*sqrt(n) as n -> inf. (End)
a(n) ~ exp(Pi*sqrt(2*n/3)) / (16*Pi*sqrt(2*n)) * (1 - 97*Pi/(24*sqrt(6*n)) + (97/48 + 6337*Pi^2/6912)/n). - Vaclav Kotesovec, Nov 05 2016

A024793 Number of 9's in all partitions of n.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 3, 5, 7, 11, 15, 22, 31, 43, 58, 80, 106, 142, 187, 246, 319, 416, 533, 685, 872, 1108, 1397, 1762, 2204, 2755, 3426, 4251, 5250, 6476, 7950, 9746, 11905, 14514, 17638, 21403, 25888, 31265, 37661, 45288, 54329, 65079, 77775
Offset: 1

Views

Author

Keywords

Comments

The sums of nine successive terms give A000070. - Omar E. Pol, Jul 12 2012
a(n) is also the difference between the sum of 9th largest and the sum of 10th largest elements in all partitions of n. - Omar E. Pol, Oct 25 2012

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; local g;
          if n=0 or i=1 then [1, 0]
        else g:= `if`(i>n, [0$2], b(n-i, i));
             b(n, i-1) +g +[0, `if`(i=9, g[1], 0)]
          fi
        end:
    a:= n-> b(n, n)[2]:
    seq(a(n), n=1..100);  # Alois P. Heinz, Oct 27 2012
  • Mathematica
    Table[ Count[ Flatten[ IntegerPartitions[n]], 9], {n, 1, 55} ]
    (* second program: *)
    b[n_, i_] := b[n, i] = Module[{g}, If[n == 0 || i == 1, {1, 0}, g = If[i > n, {0, 0}, b[n - i, i]]; b[n, i - 1] + g + {0, If[i == 9, g[[1]], 0]}]]; a[n_] := b[n, n][[2]]; Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Oct 09 2015, after Alois P. Heinz *)

Formula

a(n) = A181187(n,9) - A181187(n,10). - Omar E. Pol, Oct 25 2012
From Peter Bala, Dec 26 2013: (Start)
a(n+9) - a(n) = A000041(n).
a(n) + a(n+3) + a(n+6) = A024787(n).
O.g.f.: x^9/(1 - x^9) * product {k >= 1} 1/(1 - x^k) = x^9 + x^10 + 2*x^11 + 3*x^12 + ....
Asymptotic result: log(a(n)) ~ 2*sqrt(Pi^2/6)*sqrt(n) as n -> inf. (End)
a(n) ~ exp(Pi*sqrt(2*n/3)) / (18*Pi*sqrt(2*n)) * (1 - 109*Pi/(24*sqrt(6*n)) + (109/48 + 7993*Pi^2/6912)/n). - Vaclav Kotesovec, Nov 05 2016

A182713 Number of 3's in the last section of the set of partitions of n.

Original entry on oeis.org

0, 0, 1, 0, 1, 2, 2, 3, 6, 6, 10, 14, 18, 24, 35, 42, 58, 76, 97, 124, 164, 202, 261, 329, 412, 514, 649, 795, 992, 1223, 1503, 1839, 2262, 2741, 3346, 4056, 4908, 5919, 7150, 8568, 10297, 12320, 14721, 17542, 20911, 24808, 29456, 34870, 41232, 48652, 57389
Offset: 1

Views

Author

Omar E. Pol, Nov 28 2010

Keywords

Comments

Also number of 3's in all partitions of n that do not contain 1 as a part.
Also 0 together with the first differences of A024787. - Omar E. Pol, Nov 13 2011
a(n) is the number of partitions of n having fewer 1s than 2s; e.g., a(7) counts these 3 partitions: [5, 2], [3, 2, 2], [2, 2, 2, 1]. - Clark Kimberling, Mar 31 2014
The last section of the set of partitions of n is also the n-th section of the set of partitions of any integer >= n. - Omar E. Pol, Apr 07 2014

Examples

			a(7) = 2 counts the 3's in 7 = 4+3 = 3+2+2. The 3's in 7 = 3+3+1 = 3+2+1+1 = 3+1+1+1+1 do not count.
From _Omar E. Pol_, Oct 27 2012: (Start)
--------------------------------------
Last section                   Number
of the set of                    of
partitions of 7                 3's
--------------------------------------
7 .............................. 0
4 + 3 .......................... 1
5 + 2 .......................... 0
3 + 2 + 2 ...................... 1
.   1 .......................... 0
.       1 ...................... 0
.       1 ...................... 0
.           1 .................. 0
.       1 ...................... 0
.           1 .................. 0
.           1 .................. 0
.               1 .............. 0
.               1 .............. 0
.                   1 .......... 0
.                       1 ...... 0
------------------------------------
.       5 - 3 =                  2
.
In the last section of the set of partitions of 7 the difference between the sum of the third column and the sum of the fourth column is 5 - 3 = 2 equaling the number of 3's, so a(7) = 2 (see also A024787).
(End)
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; local g, h;
          if n=0 then [1, 0]
        elif i<2 then [0, 0]
        else g:= b(n, i-1); h:= `if`(i>n, [0, 0], b(n-i, i));
             [g[1]+h[1], g[2]+h[2]+`if`(i=3, h[1], 0)]
          fi
        end:
    a:= n-> b(n, n)[2]:
    seq(a(n), n=1..70);  # Alois P. Heinz, Mar 18 2012
  • Mathematica
    z = 60; f[n_] := f[n] = IntegerPartitions[n]; t1 = Table[Count[f[n], p_ /; Count[p, 1] < Count[p, 2]], {n, 0, z}] (* Clark Kimberling, Mar 31 2014 *)
    b[n_, i_] := b[n, i] = Module[{g, h}, If[n == 0, {1, 0}, If[i<2, {0, 0}, g = b[n, i-1]; h = If[i>n, {0, 0}, b[n-i, i]]; Join[g[[1]] + h[[1]], g[[2]] + h[[2]] + If[i == 3, h[[1]], 0]]]]]; a[n_] := b[n, n][[2]]; Table[a[n], {n, 1, 70}] (* Jean-François Alcover, Nov 30 2015, after Alois P. Heinz *)
    Table[Count[Flatten@Cases[IntegerPartitions[n], x_ /; Last[x] != 1], 3], {n, 51}] (* Robert Price, May 15 2020 *)
  • Sage
    A182713 = lambda n: sum(list(p).count(3) for p in Partitions(n) if 1 not in p) # D. S. McNeil, Nov 29 2010

Formula

It appears that A000041(n) = a(n+1) + a(n+2) + a(n+3), n >= 0. - Omar E. Pol, Feb 04 2012
a(n) ~ A000041(n)/3 ~ exp(Pi*sqrt(2*n/3)) / (12*sqrt(3)*n). - Vaclav Kotesovec, Jan 03 2019

A173239 Triangle by columns, A000041 shifted down thrice, k>=0.

Original entry on oeis.org

1, 1, 2, 3, 1, 5, 1, 7, 2, 11, 3, 1, 15, 5, 1, 22, 7, 2, 30, 11, 3, 1, 42, 15, 5, 1, 56, 22, 7, 2, 77, 30, 11, 3, 1, 101, 42, 15, 5, 1, 135, 56, 22, 7, 2, 176, 77, 30, 11, 3, 1, 231, 101, 42, 15, 5, 1, 297, 135, 56, 22, 7, 2, 385, 176, 77, 30, 11, 3, 1
Offset: 0

Views

Author

Gary W. Adamson, Feb 13 2010

Keywords

Comments

Row sums = A024787, the numbers of 3's in all partitions of n, where A024787 starts with offset 1: (0, 0, 1, 1, 2, 4, 6, 9, 15,...). Triangle A173239 row sums start with the first "1" of A024787.
Let the triangle = M as an infinite lower triangular matrix. Then Lim_{n->inf} = A173241, the Euler transform of A051064 (the ruler function for 3).
Let P(x) = polcoeff A000041 = (1 + x + 2x^2 + 3x^3 + 5x^4 + 7x^5 + ...), then P(x) = A(x) / A(x^3), where A(x) = polcoeff A173241: (1 + x + 2x^2 + 4x^3 + 6x^4 + ...)
Refer to A173238 comments for three conjectures relating A000041 to the infinite set of generalized ruler function sequences.

Examples

			First few rows of the triangle =
1;
1;
2;
3, 1;
5, 1;
7, 2;
11, 3, 1;
15, 5, 1;
22, 7, 2;
30, 11, 3, 1;
42, 15, 5, 1;
56, 22, 7, 2;
77, 30, 11, 3, 1;
101, 42, 15, 5, 1;
135, 56, 22, 7, 2;
176, 77, 30, 11, 3, 1;
231, 101, 42, 15, 5, 1;
297, 135, 56, 22, 7, 2;
385, 176, 77, 30, 11, 3, 1;
490, 231, 101, 42, 15, 5, 1;
627, 297, 135, 56, 22, 7, 2;
792, 385, 176, 77, 30, 11, 3, 1;
1002,490, 231, 101, 42, 15, 5, 1;
1255, 627, 297, 135, 56, 22, 7, 2;
1575, 792, 385, 176, 77, 30, 11, 3, 1;
...
		

Crossrefs

Formula

T(n,k) = A000041(n-3*k) for k=0..floor(n/3).
Showing 1-10 of 13 results. Next