This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A024788 Number of 4's in all partitions of n. 15
 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 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,6 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 LINKS Alois P. Heinz, Table of n, a(n) for n = 1..1000 G. E. Andrews and E. Deutsch, A note on a method of Erdos and the Stanley-Elder theorems, Integers, 16 (2016), A24. L. Babel, A. Brandstädt, and V. B. Le, Recognizing the P4-structure of bipartite graphs, Discrete Appl. Math. 93 (1999), 157-168. 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 EXAMPLE 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) 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 *) CROSSREFS Cf. A000041, A066633, A024786, A024787, A024789, A024790, A024791, A024792, A024793, A024794. Sequence in context: A266771 A295342 A226635 * A285472 A318027 A004101 Adjacent sequences:  A024785 A024786 A024787 * A024789 A024790 A024791 KEYWORD nonn,easy AUTHOR STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified October 21 16:04 EDT 2019. Contains 328301 sequences. (Running on oeis4.)