OFFSET
2,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) counts (s(0), s(1), ..., s(2n)) such that 0 < s(i) < m and |s(i) - s(i-1)| = 1 for i = 1,2,...,2n, s(0) = j, s(2n) = k.
LINKS
Harvey P. Dale, Table of n, a(n) for n = 2..1000
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 (6,-10,4).
FORMULA
a(n) = (1/4)*Sum_{k=1..7} sin(Pi*k/8)*sin(5*Pi*k/8)*(2*cos(Pi*k/8))^(2n).
a(n) = 6*a(n-1) - 10*a(n-2) + 4*a(n-3).
G.f.: x^2*(x-1) / ( (2*x-1)*(2*x^2-4*x+1) ).
a(n) = (-2^n+(-(2-sqrt(2))^n+(2+sqrt(2))^n)/sqrt(2))/4. - Colin Barker, Apr 27 2016
4*a(n) = 2*A007070(n-1) - 2^n.- R. J. Mathar, Nov 14 2019
MATHEMATICA
f[n_] := FullSimplify[ TrigToExp[(1/4)Sum[ Sin[Pi*k/8]Sin[5Pi*k/8](2Cos[Pi*k/8])^(2n), {k, 1, 7}]]]; Table[ f[n], {n, 2, 25}] (* Robert G. Wilson v, Jun 18 2004 *)
LinearRecurrence[{6, -10, 4}, {1, 5, 20}, 30] (* Harvey P. Dale, Mar 04 2015 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Herbert Kociemba, Jun 11 2004
STATUS
approved
