OFFSET
0,2
COMMENTS
Row sums of number triangle A107065.
Same as A018922 plus first 3 additional terms. - Vladimir Joseph Stephan Orlovsky, Jul 08 2011
a(n) is the number of binary words of length n containing no subword 01011. - Alois P. Heinz, Mar 14 2012
2*a(n) is the number of direct lineal ancestors possessed by an individual n+1 generations in the past, if all mating pairs in the individual's pedigree are fourth-cousin pairs. - Noah A Rosenberg, Jun 09 2026
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Otto Dunkel, Solutions of a probability difference equation, Amer. Math. Monthly, 32 (1925), 354-370; see p. 356.
Jia Huang, A coin flip game and generalizations of Fibonacci numbers, arXiv:2501.07463 [math.CO], 2025. See p. 7.
Jia Huang, Moments for generalizations of a coin flip game, arXiv:2605.19904 [math.CO], 2026. See p. 7.
Joseph Lachance, Inbreeding, pedigree size, and the most recent common ancestor of humanity. J. Theor. Biol. 261 (2009), 238-247. See Table 1.
Thomas Langley, Jeffrey Liese, and Jeffrey Remmel, Generating Functions for Wilf Equivalence Under Generalized Factor Order, J. Int. Seq. 14 (2011), Article #11.4.2.
Elisa Heinrich Mora and Noah A. Rosenberg, An nth-cousin mating model and the n-anacci numbers. Fibonacci Quart. 64 (2026), 270-280. See Table 1.
Index entries for linear recurrences with constant coefficients, signature (2,0,0,0,-1).
FORMULA
a(n) = 2*a(n-1) - a(n-5).
a(n) = Sum_{k=0..floor(n/5)} C(n-4*k, k) * 2^(n-2*k) *(-1)^k.
a(n) = A018922(n-3) for n >= 3. - R. J. Mathar, Mar 09 2007
First difference of A119407. - Michael Somos, Dec 28 2012
From Petros Hadjicostas, Jun 12 2019: (Start)
G.f.: 1/((1 - x)*(1 - x - x^2 - x^3 - x^4)).
Setting k = 1 in the double recurrence for array A140996, we get that a(n+5) = 1 + a(n+1) + a(n+2) + a(n+3) + a(n+4) for n >= 0, which of course we can prove using other methods as well. See also Dunkel (1925).
(End)
a(n) = Sum_{k=0..n+3} A000078(k). - Greg Dresden, Jan 01 2021
EXAMPLE
G.f. = 1 + 2*x + 4*x^2 + 8*x^3 + 16*x^4 + 31*x^5 + 60*x^6 + 116*x^7 + 224*x^8 + ...
MAPLE
gfun[seriestolist](series(1/(1-2*x+x^5), x, 35))[]; # Alois P. Heinz, May 26 2026
MATHEMATICA
CoefficientList[Series[1/(1 - 2*z + z^5), {z, 0, 40}], z] (* Vladimir Joseph Stephan Orlovsky, Jul 08 2011 *)
(* Alternative: *)
LinearRecurrence[{2, 0, 0, 0, -1}, {1, 2, 4, 8, 16}, 40] (* G. C. Greubel, Jun 12 2019 *)
PROG
(PARI) {a(n) = if( n<0, n = -n; polcoeff( -x^5 / (1 - 2*x^4 + x^5) + x * O(x^n), n), polcoeff( 1 / (1 - 2*x + x^5) + x * O(x^n), n))} /* Michael Somos, Dec 28 2012 */
(Magma) I:=[1, 2, 4, 8, 16]; [n le 5 select I[n] else 2*Self(n-1) - Self(n-5): n in [1..40]]; // G. C. Greubel, Jun 12 2019
(SageMath) (1/(1-2*x+x^5)).series(x, 40).coefficients(x, sparse=False) # G. C. Greubel, Jun 12 2019
(GAP) a:=[1, 2, 4, 8, 16];; for n in [6..40] do a[n]:=2*a[n-1]-a[n-5]; od; a; # G. C. Greubel, Jun 12 2019
KEYWORD
nonn,easy
AUTHOR
Paul Barry, May 10 2005
STATUS
approved
