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.
%I A094854 #24 Feb 13 2022 06:30:24 %S A094854 1,2,6,20,69,241,846,2977,10490,36994,130532,460737,1626629,5743674, %T A094854 20283121,71632290,252989326,893528468,3155899165,11146628105, %U A094854 39370204614,139057473905,491159630010,1734810719530,6127485120996 %N A094854 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) = 4, s(2n) = 4. %C A094854 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. %C A094854 Counts all paths of length (2*n), n >= 0, starting at the initial node on the path graph P_8, see the Maple program. - _Johannes W. Meijer_, May 29 2010 %H A094854 Michael De Vlieger, <a href="/A094854/b094854.txt">Table of n, a(n) for n = 0..1825</a> %H A094854 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (7,-15,10,-1). %F A094854 a(n) = (2/9)*Sum_{r=1..8} sin(4*r*Pi/9)^2*(2*cos(r*Pi/9))^(2n). %F A094854 a(n) = 7*a(n-1) - 15*a(n-2) + 10*a(n-3) - a(n-4). %F A094854 G.f.: -(2*x-1)*(x^2-3*x+1) / ( (x-1)*(x^3-9*x^2+6*x-1) ). %F A094854 a(n) = A061551(2*n). - _Johannes W. Meijer_, May 29 2010 %p A094854 with(GraphTheory): G:=PathGraph(8): A:= AdjacencyMatrix(G): nmax:=24; for n from 0 to 2*nmax+2 do B(n):=A^n; a(n):=add(B(n)[1,k],k=1..8); od: seq(a(2*n),n=0..nmax); # _Johannes W. Meijer_, May 29 2010 %t A094854 CoefficientList[Series[-(2 x - 1) (x^2 - 3 x + 1)/((x - 1) (x^3 - 9 x^2 + 6 x - 1)), {x, 0, 24}], x] (* _Michael De Vlieger_, Feb 12 2022 *) %Y A094854 Even bisection of A061551. %Y A094854 Cf. A094855. %K A094854 nonn,easy %O A094854 0,2 %A A094854 _Herbert Kociemba_, Jun 13 2004