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!)
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. 4

%I #14 Feb 12 2022 17:51:02

%S 1,3,9,28,90,297,1000,3417,11799,41041,143472,503262,1769365,6230304,

%T 21960801,77461435,273351705,964918116,3406804786,12029917377,

%U 42483179304,150036624217,529901048943,1871559855009,6610286313784

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

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

%H Michael De Vlieger, <a href="/A094826/b094826.txt">Table of n, a(n) for n = 1..1826</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,-9,1).

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

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

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

%F a(n) = A094829(n+1) - 3*A094829(n). - _R. J. Mathar_, Nov 14 2019

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

%t LinearRecurrence[{6,-9,1},{1,3,9},30] (* _Harvey P. Dale_, Dec 29 2021 *)

%K nonn,easy

%O 1,2

%A _Herbert Kociemba_, Jun 13 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 19 19:02 EDT 2024. Contains 371798 sequences. (Running on oeis4.)