A094829 Number of (s(0), s(1), ..., s(2n+1)) such that 0 < s(i) < 9 and |s(i) - s(i-1)| = 1 for i = 1,2,...,2n+1, s(0) = 1, s(2n+1) = 6.
1, 6, 27, 109, 417, 1548, 5644, 20349, 72846, 259579, 922209, 3269889, 11579032, 40967400, 144863001, 512050438, 1809503019, 6393427173, 22587086305, 79791176292, 281856708180, 995606748757, 3516721295214
Offset: 2
Links
- Michael De Vlieger, Table of n, a(n) for n = 2..1825
- László Németh and László Szalay, Sequences Involving Square Zig-Zag Shapes, J. Int. Seq., Vol. 24 (2021), Article 21.5.2.
- Index entries for linear recurrences with constant coefficients, signature (6,-9,1).
Programs
-
Mathematica
Drop[CoefficientList[Series[x^2/(1 - 6 x + 9 x^2 - x^3), {x, 0, 24}], x], 2] (* Michael De Vlieger, Aug 05 2021 *)
Formula
a(n) = (2/9)*Sum_{r=1..8} sin(r*Pi/9)*sin(2*r*Pi/3)*(2*cos(r*Pi/9))^(2*n+1), for n >= 2.
a(n) = 6*a(n-1) - 9*a(n-2) + a(n-3).
G.f.: x^2/(1 - 6x + 9x^2 - x^3).
For the explicit form of a(n+2), for n >= 0, see a comment above. - Wolfdieter Lang, Mar 26 2020
Comments