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.
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..1825
László Németh and László Szalay, Sequences Involving Square Zig-Zag Shapes, J. Int. Seq., Vol. 24 (2021), Article 21.5.2.
Index entries for linear recurrences with constant coefficients, signature (7,-15,10,-1).
FORMULA
a(n) = (2/9)*Sum_{r=1..8} sin(r*Pi/9)*sin(4*r*Pi/9)*(2*cos(r*Pi/9))^(2*n+1).
a(n) = 7*a(n-1) - 15*a(n-2) + 10*a(n-3) - a(n-4).
G.f.: x*(1-3*x+x^2) / ( (x-1)*(x^3-9*x^2+6*x-1) ).
MATHEMATICA
LinearRecurrence[{7, -15, 10, -1}, {1, 4, 14, 48}, 30] (* Harvey P. Dale, Jul 09 2020 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Herbert Kociemba, Jun 13 2004
STATUS
approved