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.

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