OFFSET
0,2
COMMENTS
a(n) is the number of compositions of n when there are 6 types of ones. - Milan Janjic, Aug 13 2010
Number of words of length n over {0,1,...,7} in which binary subwords appear in the form 10...0. - Milan Janjic, Jan 25 2017
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
D. W. Boyd, Linear recurrence relations for some generalized Pisot sequences, Advances in Number Theory ( Kingston ON, 1991) 333-340, Oxford Sci. Publ., Oxford Univ. Press, New York, 1993.
Index entries for linear recurrences with constant coefficients, signature (7,-5).
FORMULA
a(n) = (a(1)+1)*a(n-1) - (a(1)-1)*a(n-2) = 7*a(n-1) - 5*a(n-2).
G.f.: -(x-1) / (5*x^2-7*x+1). - Colin Barker, Feb 14 2013
a(n) = (2^(-1-n)*((7-sqrt(29))^n*(-5+sqrt(29)) + (5+sqrt(29))*(7+sqrt(29))^n)) / sqrt(29). - Colin Barker, Jan 20 2017
MATHEMATICA
Table[Simplify[(2^(-1 - n) ((7 - #)^n (-5 + #) + (5 + #) (7 + #)^n))/#] &@ Sqrt@ 29, {n, 0, 22}] (* or *)
CoefficientList[Series[-(x - 1)/(5 x^2 - 7 x + 1), {x, 0, 22}], x] (* Michael De Vlieger, Jan 28 2017 *)
LinearRecurrence[{7, -5}, {1, 6}, 30] (* Harvey P. Dale, May 01 2022 *)
PROG
(PARI) S(a0, a1, maxn) = a=vector(maxn); a[1]=a0; a[2]=a1; for(n=3, maxn, a[n]=a[n-1]^2\a[n-2]+1); a
S(1, 6, 40) \\ Colin Barker, Feb 16 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved