login
Number of (s(0), s(1), ..., s(2n+1)) such that 0 < s(i) < 10 and |s(i) - s(i-1)| = 1 for i = 1,2,...,2n+1, s(0) = 1, s(2n+1) = 6.
4

%I #18 Feb 12 2022 17:58:36

%S 1,6,27,110,428,1624,6069,22458,82555,302082,1101816,4009616,14567657,

%T 52865230,191684283,694609494,2515972324,9110338728,32981059485,

%U 119377761602,432046756571,1563510554986,5657752486512,20472344560800

%N Number of (s(0), s(1), ..., s(2n+1)) such that 0 < s(i) < 10 and |s(i) - s(i-1)| = 1 for i = 1,2,...,2n+1, s(0) = 1, s(2n+1) = 6.

%C Diagonal of the square array A217593. - _Philippe Deléham_, Mar 28 2013

%H Michael De Vlieger, <a href="/A094788/b094788.txt">Table of n, a(n) for n = 2..1791</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_04">Index entries for linear recurrences with constant coefficients</a>, signature (8,-21,20,-5).

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

%F a(n) = 8*a(n-1) - 21*a(n-2) + 20*a(n-3) - 5*a(n-4).

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

%F a(n+2) = A217593(n,n+5). - _Philippe Deléham_, Mar 28 2013

%F 2*a(n) = A030191(n-1) - A001906(n). - _R. J. Mathar_, Nov 15 2019

%t Drop[CoefficientList[Series[-x^2*(-1 + 2 x)/((x^2 - 3 x + 1) (5 x^2 - 5 x + 1)), {x, 0, 25}], x], 2] (* _Michael De Vlieger_, Aug 04 2021 *)

%t LinearRecurrence[{8,-21,20,-5},{1,6,27,110},30] (* _Harvey P. Dale_, Aug 31 2021 *)

%o (PARI) Vec(x^2*(1-2*x)/(1-8*x+21*x^2-20*x^3+5*x^4)+O(x^66)) /* _Joerg Arndt_, Mar 29 2013 */

%K nonn,easy

%O 2,2

%A _Herbert Kociemba_, Jun 15 2004