login
A002664
a(n) = 2^n - C(n,0) - ... - C(n,4).
(Formerly M4395 N1851)
19
0, 0, 0, 0, 0, 1, 7, 29, 93, 256, 638, 1486, 3302, 7099, 14913, 30827, 63019, 127858, 258096, 519252, 1042380, 2089605, 4185195, 8377705, 16764265, 33539156, 67090962, 134196874, 268411298, 536843071, 1073709893, 2147447191, 4294925847, 8589887654, 17179816228
OFFSET
0,7
COMMENTS
From Gary W. Adamson, Jul 24 2010: (Start)
Starting with "1" = eigensequence of a triangle with binomial C(n,5):
(1, 6, 21, 56, ...) as the left border and the rest 1's. (End)
The Kn26 sums, see A180662, of triangle A065941 equal the terms (doubled) of this sequence minus the five leading zeros. - Johannes W. Meijer, Aug 15 2011
Starting (0, 0, 0, 0, 1, 7, 29, ...), this is the binomial transform of (0, 0, 0, 0, 1, 2, 2, 2, ...). Starting (1, 7, 29, ...), this is the binomial transform of (1, 6, 16, 26, 31, 32, 32, 32, ...). - Gary W. Adamson, Jul 28 2015
a(n) is the number of binary strings of length n that contain at least three runs of ones. - Félix Balado, Sep 16 2025
Number of binary strings of length n with at least five 0's. Equivalently, number of subsets of an n-element set with at least 5 elements. - Enrique Navarrete, Nov 15 2025
REFERENCES
J. H. Conway and R. K. Guy, The Book of Numbers, New York: Springer-Verlag, 1995, Chapter 3, pp. 76-79.
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).
LINKS
Félix Balado and Guénolé C. M. Silvestre, Systematic Enumeration of Fundamental Quantities Involving Runs in Binary Strings, arXiv:2602.10005 [math.CO], 2026. See p. 27.
Jürgen Eckhoff, Der Satz von Radon in konvexen Productstrukturen II, Monat. f. Math., 73 (1969), 7-30.
Ângela Mestre and José Agapito, Square Matrices Generated by Sequences of Riordan Arrays, J. Int. Seq., Vol. 22 (2019), Article 19.8.4.
Simon Plouffe, Approximations de séries génératrices et quelques conjectures, Dissertation, Université du Québec à Montréal, 1992; arXiv:0911.4975 [math.NT], 2009.
Simon Plouffe, 1031 Generating Functions, Appendix to Thesis, Montreal, 1992.
FORMULA
G.f.: x^5/((1-2*x)*(1-x)^5).
a(n) = Sum_{k=0..n} C(n, k+5) = Sum_{k=5..n} C(n, k); a(n) = 2a(n-1) + C(n-1, 4). - Paul Barry, Aug 23 2004
a(n) = 2^n - n^4/24 + n^3/12 - 11*n^2/24 - 7*n/12 - 1. - Bruno Berselli, May 19 2011 [Robinson (1985) gives an alternative version of this formula, for a different offset. - N. J. A. Sloane, Oct 20 2015]
E.g.f.: exp(x)*(24*(exp(x) - 1) - 24*x - 12*x^2 - 4*x^3 - x^4)/24. - Stefano Spezia, Mar 09 2025
MAPLE
a:= n-> 2^n-add(binomial(n, j), j=0..4): seq(a(n), n=0..34); # Zerinvary Lajos, May 12 2007
# Alternative:
A002664:=1/(2*z-1)/(z-1)**5; # conjectured by Simon Plouffe in his 1992 dissertation
MATHEMATICA
a=1; lst={}; s1=s2=s3=s4=s5=0; Do[s1+=a; s2+=s1; s3+=s2; s4+=s3; s5+=s4; AppendTo[lst, s5]; a=a*2, {n, 5!}]; lst (* Vladimir Joseph Stephan Orlovsky, Jan 10 2009 *)
Table[Sum[ Binomial[n, k + 5], {k, 0, n}], {n, 0, 30}] (* Zerinvary Lajos, Jul 08 2009 *)
Table[2^n-Total[Binomial[n, Range[0, 4]]], {n, 0, 30}] (* or *) LinearRecurrence[ {7, -20, 30, -25, 11, -2}, {0, 0, 0, 0, 0, 1}, 40] (* Harvey P. Dale, Sep 03 2016 *)
PROG
(Magma) [2^n-n^4/24+n^3/12-11*n^2/24-7*n/12-1: n in [0..35]]; // Vincenzo Librandi, May 20 2011
(Haskell)
a002664 n = a002664_list !! n
a002664_list = map (sum . drop 5) a007318_tabl
-- Reinhard Zumkeller, Jun 20 2015
CROSSREFS
Column m=5 of A055248.
Partial sums of A002663.
Cf. A007318.
Sequence in context: A053295 A266939 A055798 * A290901 A294843 A042609
KEYWORD
nonn,easy
STATUS
approved