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.

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

This page as a plain text file.
%I A024789 #41 Apr 27 2022 17:23:46
%S A024789 0,0,0,0,1,1,2,3,5,8,12,17,25,35,50,68,94,126,170,226,299,391,511,660,
%T A024789 853,1091,1393,1766,2235,2811,3527,4403,5484,6800,8415,10369,12752,
%U A024789 15627,19110,23298,28346,34389,41642,50295,60636,72929,87563,104903,125470
%N A024789 Number of 5's in all partitions of n.
%C A024789 The sums of five successive terms give A000070. - _Omar E. Pol_, Jul 12 2012
%C A024789 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
%H A024789 Alois P. Heinz, <a href="/A024789/b024789.txt">Table of n, a(n) for n = 1..1000</a>
%H A024789 David Benson, Radha Kessar, and Markus Linckelmann, <a href="https://arxiv.org/abs/2204.09970">Hochschild cohomology of symmetric groups in low degrees</a>, arXiv:2204.09970 [math.GR], 2022.
%F A024789 a(n) = A181187(n,5) - A181187(n,6). - _Omar E. Pol_, Oct 25 2012
%F A024789 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
%F A024789 G.f.: x^5/(1 - x^5) * Product_{k>=1} 1/(1 - x^k). - _Ilya Gutkovskiy_, Apr 06 2017
%e A024789 From _Omar E. Pol_, Oct 25 2012: (Start)
%e A024789 For n = 8 we have:
%e A024789 --------------------------------------
%e A024789 .                             Number
%e A024789 Partitions of 8               of 5's
%e A024789 --------------------------------------
%e A024789 8 .............................. 0
%e A024789 4 + 4 .......................... 0
%e A024789 5 + 3 .......................... 1
%e A024789 6 + 2 .......................... 0
%e A024789 3 + 3 + 2 ...................... 0
%e A024789 4 + 2 + 2 ...................... 0
%e A024789 2 + 2 + 2 + 2 .................. 0
%e A024789 7 + 1 .......................... 0
%e A024789 4 + 3 + 1 ...................... 0
%e A024789 5 + 2 + 1 ...................... 1
%e A024789 3 + 2 + 2 + 1 .................. 0
%e A024789 6 + 1 + 1 ...................... 0
%e A024789 3 + 3 + 1 + 1 .................. 0
%e A024789 4 + 2 + 1 + 1 .................. 0
%e A024789 2 + 2 + 2 + 1 + 1 .............. 0
%e A024789 5 + 1 + 1 + 1 .................. 1
%e A024789 3 + 2 + 1 + 1 + 1 .............. 0
%e A024789 4 + 1 + 1 + 1 + 1 .............. 0
%e A024789 2 + 2 + 1 + 1 + 1 + 1 .......... 0
%e A024789 3 + 1 + 1 + 1 + 1 + 1 .......... 0
%e A024789 2 + 1 + 1 + 1 + 1 + 1 + 1 ...... 0
%e A024789 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 .. 0
%e A024789 ------------------------------------
%e A024789 .               7 - 4 =          3
%e A024789 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.
%e A024789 (End)
%p A024789 b:= proc(n, i) option remember; local g;
%p A024789       if n=0 or i=1 then [1, 0]
%p A024789     else g:= `if`(i>n, [0$2], b(n-i, i));
%p A024789          b(n, i-1) +g +[0, `if`(i=5, g[1], 0)]
%p A024789       fi
%p A024789     end:
%p A024789 a:= n-> b(n, n)[2]:
%p A024789 seq(a(n), n=1..100);  # _Alois P. Heinz_, Oct 27 2012
%t A024789 Table[ Count[ Flatten[ IntegerPartitions[n]], 5], {n, 1, 50} ]
%t A024789 (* second program: *)
%t A024789 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_ *)
%o A024789 (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
%Y A024789 Cf. A066633, A024786, A024787, A024788, A024790, A024791, A024792, A024793, A024794.
%K A024789 nonn
%O A024789 1,7
%A A024789 _Clark Kimberling_