login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A094803
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) = 3.
6
1, 3, 9, 28, 90, 296, 988, 3328, 11272, 38304, 130416, 444544, 1516320, 5174144, 17659840, 60282880, 205795456, 702583296, 2398676736, 8189409280, 27960021504, 95460743168, 325921881088, 1112763940864, 3799207806976, 12971294957568, 44286747439104, 151204366286848
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)) 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.
Counts all paths of length (2*n+1), n >= 0, starting and ending at the initial node and ending at the nodes 1, 2, 3, 4 and 5 on the path graph P_7, see the Maple program. - Johannes W. Meijer, May 29 2010
LINKS
László Németh and László Szalay, Sequences Involving Square Zig-Zag Shapes, J. Int. Seq., Vol. 24 (2021), Article 21.5.2.
FORMULA
a(n) = (1/4)*Sum_{k=1..7} sin(Pi*k/8)*sin(3*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*(1 - 3*x + x^2)/((2*x - 1)*(2*x^2 - 4*x + 1)).
E.g.f.: (2*sinh(x)^2 + sinh(2*x) + sqrt(2)*exp(2*x)*sinh(sqrt(2)*x))/4. - Stefano Spezia, Jun 14 2023
MAPLE
with(GraphTheory): G:=PathGraph(7): A:= AdjacencyMatrix(G): nmax:=25; n2:=2*nmax: for n from 0 to n2 do B(n):=A^n; a(n):=add(B(n)[1, k], k=1..5); od: seq(a(2*n+1), n=0..nmax-1); # Johannes W. Meijer, May 29 2010
MATHEMATICA
f[n_] := FullSimplify[ TrigToExp[(1/4)Sum[ Sin[Pi*k/8]Sin[3Pi*k/8](2Cos[Pi*k/8])^(2n), {k, 1, 7}]]]; Table[ f[n], {n, 25}] (* Robert G. Wilson v, Jun 18 2004 *)
Rest@ CoefficientList[Series[-x (1 - 3 x + x^2)/((2 x - 1)*(2 x^2 - 4 x + 1)), {x, 0, 25}], x] (* Michael De Vlieger, Aug 04 2021 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Herbert Kociemba, Jun 11 2004
STATUS
approved