OFFSET
1,2
COMMENTS
In general, a(n) = (2/m)*Sum_{r=1..m-1} sin(r*j*Pi/m)*sin(r*k*Pi/m)*(2*cos(r*Pi/m))^(2n+1) counts (s(0), s(1), ..., s(2n+1)) such that 0 < s(i) < m and |s(i) - s(i-1)| = 1 for i = 1,2,...,2n+1, s(0) = j, s(2n+1) = k.
This sequence is the odd bisection of A188048. - John Blythe Dobson, Jun 20 2015
LINKS
FORMULA
a(n) = (2/9)*Sum_{r=1..8} sin(r*Pi/3)*sin(2*r*Pi/3)*(2*cos(r*Pi/9))^(2n+1).
a(n) = 6*a(n-1) - 9*a(n-2) + a(n-3).
G.f.: x(-1+x)/(-1 + 6x - 9x^2 + x^3).
MATHEMATICA
CoefficientList[Series[(x - 1)/(- 1 + 6 x - 9 x^2 + x^3), {x, 0, 20}], x] (* Vincenzo Librandi, Jun 21 2015 *)
LinearRecurrence[{6, -9, 1}, {1, 5, 21}, 30] (* Harvey P. Dale, Dec 27 2019 *)
PROG
(Magma) I:=[1, 5, 21]; [n le 3 select I[n] else 6*Self(n-1)-9*Self(n-2)+Self(n-3): n in [1..30]]; // Vincenzo Librandi, Jun 21 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Herbert Kociemba, Jun 13 2004
STATUS
approved