login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A024789 Number of 5's in all partitions of n. 13
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 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,7

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

LINKS

Alois P. Heinz, Table of n, a(n) for n = 1..1000

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

EXAMPLE

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)

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 *)

PROG

(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

CROSSREFS

Cf. A066633, A024786, A024787, A024788, A024790, A024791, A024792, A024793, A024794.

Sequence in context: A241553 A241549 A266773 * A318028 A200661 A175539

Adjacent sequences:  A024786 A024787 A024788 * A024790 A024791 A024792

KEYWORD

nonn

AUTHOR

Clark Kimberling

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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 20 03:36 EDT 2019. Contains 322294 sequences. (Running on oeis4.)