OFFSET
1,3
COMMENTS
a(n+2) is the number of binary words of length n in which every run of zeros has length congruent to 1 modulo 3. - Ira M. Gessel, Jan 22 2025
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
G. McConnell, Some non-standard ways to generate SIC-POVMs in dimensions 2 and 3, arXiiv preprint arXiv:1402.7330, 2014, p. 4.
Index entries for linear recurrences with constant coefficients, signature (1,1,1,-1).
FORMULA
From Vincenzo Librandi Apr 09 2014: (Start)
G.f.: x*(1-x^3)/(x^4-x^3-x^2-x+1).
a(n) = a(n-1) + a(n-2) + a(n-3) - a(n-4) for n>4.
a(n) = a(n-1) + 2*a(n-3) + A116732(n-5) for n>4. (End)
MATHEMATICA
LinearRecurrence[{1, 1, 1, -1}, {1, 1, 2, 3}, 40] (* or *) CoefficientList[Series[(1 - x^3)/(x^4 - x^3 - x^2 - x + 1), {x, 0, 100}], x] (* Vincenzo Librandi, Apr 09 2014 *)
PROG
(Magma) I:=[1, 1, 2, 3]; [n le 4 select I[n] else Self(n-1)+Self(n-2)+Self(n-3)-Self(n-4): n in [1..50]];
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Apr 09 2014
STATUS
approved