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.

A000478 Number of ways of placing n labeled balls into 3 indistinguishable boxes with at least 2 balls in each box.

Original entry on oeis.org

15, 105, 490, 1918, 6825, 22935, 74316, 235092, 731731, 2252341, 6879678, 20900922, 63259533, 190957923, 575363776, 1731333808, 5205011031, 15638101281, 46962537810, 140988276150, 423174543025, 1269959836015, 3810785476980, 11434235478348, 34306598748315, 102927849307725
Offset: 6

Views

Author

Keywords

Comments

Associated Stirling numbers.
From Enrique Navarrete, May 24 2025: (Start)
6*a(n) is the number of ternary words of length n that contain at least two of each of the symbols of the alphabet. For example, 6*a(6) counts the 90 permutations of 001122.
2*a(n+1) is the number of ternary strings of length n that contain at least one 0 and at least two 1's and at least two 2's. For example, for n = 6, 2*a(7) counts the 90 permutations of 001122, the 60 permutations of 011122, and the 60 permutations of 011222. (End)

Examples

			a(6) = 6!/(2!*2!*2!*3!) = 15.
		

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 222.
  • F. N. David and D. E. Barton, Combinatorial Chance. Hafner, NY, 1962, p. 296.
  • J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 76.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A000247 (2 boxes), A058844 (4 boxes).

Programs

  • Mathematica
    Table[(1+n+n^2)/2-(1/2+n/4)*2^n+3^n/6,{n,6,30}] (* or *) LinearRecurrence[ {10,-40,82,-91,52,-12},{15,105,490,1918,6825,22935},25] (* Harvey P. Dale, Jul 17 2011 *)
    offset = 6; terms = 26; egf = (Exp[x]-1-x)^3/3!; Drop[CoefficientList[egf + O[x]^(terms+offset), x]*Range[0, terms+offset-1]!, offset] (* Jean-François Alcover, May 07 2017 *)
  • PARI
    Vec(x^6*(12*x^3-40*x^2+45*x-15)/((1-x)^3*(1-2*x)^2*(3*x-1))+O(x^66)) /* Joerg Arndt, Apr 10 2013 */
    
  • Python
    # based on Vladimir Kruchinin's formula
    def A000478():
        a = 15; n = 7; z = 4; s = 15;
        while True:
            yield a
            z = 2*z; s += n*(z-2) + 3; a = 3*a + s; n += 1
    a = A000478(); print([next(a) for  in range(6, 32)]) # _Peter Luschny, Oct 04 2018

Formula

E.g.f.: ((exp(x) - 1 - x)^3)/3!.
G.f.: x^6*(12*x^3 - 40*x^2 + 45*x - 15)/((1 - x)^3*(1 - 2*x)^2*(3*x - 1)). - Simon Plouffe in his 1992 dissertation
a(n) = (1+n+n^2)/2 - (1/2 + n/4)*2^n + 3^n/6. - Michael Steyer (m.steyer(AT)osram.de), Jan 09 2005
a(n) = 10*a(n-1) - 40*a(n-2) + 82*a(n-3) - 91*a(n-4) + 52*a(n-5) - 12*a(n-6), n > 11. - Harvey P. Dale based on Michael Steyer's formula, Jul 17 2011
a(n) = 3*a(n-1) + (2^(n-3)-n+1)*(n-1), a(n)=0, n < 6. - Vladimir Kruchinin, Oct 04 2018

Extensions

Additional comments from Michael Steyer, Dec 02 2000
More terms from James Sellers, Dec 06 2000
More terms from Joerg Arndt, Apr 10 2013