OFFSET
0,3
COMMENTS
See a May 06 2017 comment on A049310 where these problems are considered which originated in a conjecture by Michel Lagneau (see A008611) on Fibonacci polynomials.
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (1,0,0,1,-1).
FORMULA
a(n) = 2*b(n) if n is even, else a(n) = 1 + 2*b(n), with b(n) = floor(n/2) - floor((n + 1)/4) = A059169(n+1).
G.f. for {b(n)}: Sum_{n>=0} b(n)*x^n = x^2*(1 - x + x^2)/((1 - x)*(1 - x^4)) (see A059169).
From Colin Barker, May 18 2017: (Start)
G.f.: x*(1 + x - x^2 + x^3) / ((1 - x)^2*(1 + x)*(1 + x^2)).
a(n) = a(n-1) + a(n-4) - a(n-5) for n>4.
(End)
a(n) = A162330(n-1) for n >= 2. - Michel Marcus, Nov 01 2017
Sum_{n>=1} (-1)^(n+1)/a(n) = 2*log(2) (A016627). - Amiram Eldar, Sep 17 2023
MATHEMATICA
Table[2 (Floor[n/2] - Floor[(n + 1)/4]) + Boole[OddQ@ n], {n, 0, 52}] (* Michael De Vlieger, May 10 2017 *)
PROG
(PARI) concat(0, Vec(x*(1 + x - x^2 + x^3) / ((1 - x)^2*(1 + x)*(1 + x^2)) + O(x^100))) \\ Colin Barker, May 18 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Wolfdieter Lang, May 10 2017
STATUS
approved