OFFSET
0,2
COMMENTS
For n > 1, this sequence gives the number of binary strings of length n that do not contain 0000, 0101, 1010, or 1111 as contiguous substrings (see A230127). - Nathaniel Johnston, Oct 11 2013
REFERENCES
A. T. Benjamin and J. J. Quinn, Proofs that really count: the art of combinatorial proof, M.A.A. 2003, id. 18.
Ralph P. Grimaldi, Fibonacci and Catalan Numbers: An Introduction, (2012). See Property 4.3 at p. 9 and Exercise 5 at p. 11.
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Tanya Khovanova, Recursive Sequences
Index entries for linear recurrences with constant coefficients, signature (1,1).
FORMULA
a(n) = 4*F(n) = F(n-2) + F(n) + F(n+2), where F = A000045.
a(n) = round( phi^n*(8*phi-4)/5 ) for n>2. - Thomas Baruchel, Sep 08 2004
a(n) = A119457(n+2,n-1) for n>1. - Reinhard Zumkeller, May 20 2006
G.f.: 4*x/(1-x-x^2). - Philippe Deléham, Nov 19 2008
a(n) = F(n+9) - 17*F(n+3), where F=A000045. - Manuel Valdivia, Dec 15 2009
G.f.: Q(0) -1, where Q(k) = 1 + x^2 + (4*k+5)*x - x*(4*k+1 + x)/Q(k+1); (continued fraction). - Sergei N. Gladkovskii, Oct 07 2013
a(n) = Fibonacci(n+3) - Fibonacci(n-3), where Fibonacci(-3..-1) = 2,-1,1. - Bruno Berselli, May 22 2015
From Stefano Spezia, Nov 09 2025: (Start)
E.g.f.: 8*exp(x/2)*sinh(sqrt(5)*x/2)/sqrt(5).
a(n) = Sum_{r=0..5} A000045(n+r-4). (End)
MAPLE
a:= n-> (Matrix([[4, 0]]). Matrix([[1, 1], [1, 0]])^n)[1, 2]: seq(a(n), n=0..40); # Alois P. Heinz, Aug 17 2008
MATHEMATICA
4*Fibonacci[Range[0, 50]] (* Vladimir Joseph Stephan Orlovsky, Jul 22 2008 *)
Table[4 Fibonacci(n), {n, 0, 40}] (* Bruno Berselli, May 22 2015 *)
LinearRecurrence[{1, 1}, {0, 4}, 40] (* Harvey P. Dale, Jul 31 2025 *)
PROG
(PARI) a(n)=4*fibonacci(n) \\ Charles R Greathouse IV, Jun 05 2011
(Magma) [4*Fibonacci(n): n in [0..40]]; // Vincenzo Librandi, Oct 12 2013
(SageMath)
def A022087(n): return 4*fibonacci(n)
print([A022087(n) for n in range(41)]) # G. C. Greubel, Apr 12 2025
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved
