cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A094806 Number of (s(0), s(1), ..., s(2n)) such that 0 < s(i) < 8 and |s(i) - s(i-1)| = 1 for i = 1,2,...,2n, s(0) = 1, s(2n) = 5.

Original entry on oeis.org

1, 5, 20, 74, 264, 924, 3200, 11016, 37792, 129392, 442496, 1512224, 5165952, 17643456, 60250112, 205729920, 702452224, 2398414592, 8188884992, 27958972928, 95458646016, 325917686784, 1112755552256, 3799191029760, 12971261403136, 44286680330240
Offset: 2

Views

Author

Herbert Kociemba, Jun 11 2004

Keywords

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.

Programs

  • 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 *)

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