OFFSET
0,2
COMMENTS
These are the number of smooth cyclic words of length n over the alphabet {1,2,3}. See theorem 3.3 in Knopfmacher and others. - Peter Luschny, Aug 13 2012
This is the main entry for 234 similar sequences. Cf. the link to the OEIS Wiki for a list, the programs and a derivation of the linear recurrences. - Georg Fischer, Apr 09 2021
LINKS
R. H. Hardin, Table of n, a(n) for n = 0..210 [uploaded by Georg Fischer, Apr 05 2021]
Arnold Knopfmacher, Toufik Mansour, Augustine Munagi, and Helmut Prodinger, Smooth words and Chebyshev polynomials, arXiv:0809.0551v1 [math.CO], 2008.
Stephan Mertens, Domination Polynomials of the Grid, the Cylinder, the Torus, and the King Graph, arXiv:2408.08053 [math.CO], 2024. See p. 5.
Index entries for linear recurrences with constant coefficients, signature (3,-1,-1).
FORMULA
[Empirical] a(base,n) = a(base-1,n) + A002426(n+1) for base = 1..floor(n/2)+1.
a(n) = T(n,3) for n > 0, where T(n,k) = Sum_{j=1..k} (1 + 2*cos(j*Pi/(k + 1)))^n. - Peter Luschny, Aug 13 2012
From Colin Barker, Nov 26 2012: (Start)
a(n) = 1 + (1 - sqrt(2))^n + (1 + sqrt(2))^n for n > 0.
a(n) = 3*a(n-1) - a(n-2) - a(n-3) for n > 3.
G.f.: -(2*x^3 + x^2 - 1)/((x - 1)*(x^2 + 2*x - 1)). (End)
a(n) = A002203(n)+1, n>0. - R. J. Mathar, May 09 2023
MAPLE
T := (n, k) -> `if`(n=0, 1, add((1 + 2*cos(j*Pi/(k + 1)))^n, j=1..k)):
a := n -> simplify(T(n, 3)): seq(a(n), n=0..28); # Peter Luschny, Mar 28 2021
PROG
(S/R) stvar $[N]:(0..M-1) init $[]:=0 asgn $[]->{*} kill +[i in 0..N-1](($[i]`-$[(i+1)mod N]`>1)+($[(i+1)mod N]`-$[i]`>1))
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
R. H. Hardin, Dec 28 2006
STATUS
approved