OFFSET
0,5
REFERENCES
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
Andrew Howroyd, Table of n, a(n) for n = 0..1000
Richard Austin and Richard K. Guy, Binary sequences without isolated ones, Fib. Quart., 16 (1978), 84-86.
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. 24.
Russ Chamberlain, Sam Ginsburg and Chi Zhang, Generating Functions and Wilf-equivalence on Theta_k-embeddings, University of Wisconsin, April 2012.
Richard K. Guy, Anyone for Twopins?, in D. A. Klarner, editor, The Mathematical Gardner. Prindle, Weber and Schmidt, Boston, 1981, pp. 2-15. [Annotated scanned copy, with permission]
V. C. Harris and Carolyn C. Styles, A generalization of Fibonacci numbers, Fib. Quart. 2 (1964) 277-289, sequence u(n,3,2).
Milan Janjic, Binomial Coefficients and Enumeration of Restricted Words, Journal of Integer Sequences, 2016, Vol 19, #16.7.3.
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
INRIA Algorithms Project, Encyclopedia of Combinatorial Structures 425
Index entries for linear recurrences with constant coefficients, signature (2,-1,0,0,1).
FORMULA
G.f.: (1-x+x^4)/(1-2*x+x^2-x^5). - Simon Plouffe in his 1992 dissertation.
a(n-1) = Sum_{k=0..floor(n/5)} binomial(n-3*k, 2*k). - Paul Barry, Sep 16 2004
EXAMPLE
a(6)=7 because 7 binary words of length 6 in which the ones occur only in blocks of length at least 4: 000000, 001111, 011110, 011111, 111100, 111110, 111111. - Jinyuan Wang, Jan 20 2025
MATHEMATICA
LinearRecurrence[{2, -1, 0, 0, 1}, {1, 1, 1, 1, 2}, 50] (* Harvey P. Dale, Mar 14 2018 *)
PROG
(PARI) a(n) = sum(k=0, (n+1)\5, binomial(n+1-3*k, 2*k)) \\ Andrew Howroyd, Sep 19 2025
(Python)
from sympy import Matrix
def A005253(n):
A = Matrix([[2, -1, 0, 0, 1], [1, 0, 0, 0, 0], [0, 1, 0, 0, 0], [0, 0, 1, 0, 0], [0, 0, 0, 1, 0]])
return (A**(n-4)*Matrix([2, 1, 1, 1, 1]))[0] # Chai Wah Wu, Jun 11 2026
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
More terms from Harvey P. Dale, Mar 14 2018
Name clarified by Jinyuan Wang, Jan 20 2025
STATUS
approved
