login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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

%I #30 Jun 15 2023 07:44:50

%S 1,3,9,28,90,296,988,3328,11272,38304,130416,444544,1516320,5174144,

%T 17659840,60282880,205795456,702583296,2398676736,8189409280,

%U 27960021504,95460743168,325921881088,1112763940864,3799207806976,12971294957568,44286747439104,151204366286848

%N 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.

%C 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 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

%H Michael De Vlieger, <a href="/A094803/b094803.txt">Table of n, a(n) for n = 1..1876</a>

%H László Németh and László Szalay, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL24/Nemeth/nemeth8.html">Sequences Involving Square Zig-Zag Shapes</a>, J. Int. Seq., Vol. 24 (2021), Article 21.5.2.

%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (6,-10,4).

%F a(n) = (1/4)*Sum_{k=1..7} sin(Pi*k/8)*sin(3*Pi*k/8)*(2*cos(Pi*k/8))^(2n).

%F a(n) = 6*a(n-1) - 10*a(n-2) + 4*a(n-3).

%F G.f.: -x*(1 - 3*x + x^2)/((2*x - 1)*(2*x^2 - 4*x + 1)).

%F 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

%p 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

%t 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 *)

%t 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 *)

%Y Cf. A006012, A024175, A030436.

%K nonn,easy

%O 1,2

%A _Herbert Kociemba_, Jun 11 2004

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 08:33 EDT 2024. Contains 371905 sequences. (Running on oeis4.)