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.

A094826 Number of (s(0), s(1), ..., s(2n)) such that 0 < s(i) < 9 and |s(i) - s(i-1)| = 1 for i = 1,2,...,2n, s(0) = 1, s(2n) = 3.

Original entry on oeis.org

1, 3, 9, 28, 90, 297, 1000, 3417, 11799, 41041, 143472, 503262, 1769365, 6230304, 21960801, 77461435, 273351705, 964918116, 3406804786, 12029917377, 42483179304, 150036624217, 529901048943, 1871559855009, 6610286313784
Offset: 1

Views

Author

Herbert Kociemba, Jun 13 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
    Rest@ CoefficientList[Series[x (-1 + 3 x)/(-1 + 6 x - 9 x^2 + x^3), {x, 0, 25}], x] (* Michael De Vlieger, Aug 05 2021 *)
    LinearRecurrence[{6,-9,1},{1,3,9},30] (* Harvey P. Dale, Dec 29 2021 *)

Formula

a(n) = (2/9)*Sum_{r=1..8} sin(r*Pi/9)*sin(3*r*Pi/9)*(2*cos(r*Pi/9))^(2n).
a(n) = 6*a(n-1) - 9*a(n-2) + a(n-3) = 7*a(n-1) - 15*a(n-2) + 10*a(n-3) - a(n-4).
G.f.: x(-1+3x)/(-1+6x-9x^2+x^3).
a(n) = A094829(n+1) - 3*A094829(n). - R. J. Mathar, Nov 14 2019