%I #26 Feb 06 2022 13:13:46
%S 1,4,15,57,220,859,3381,13380,53143,211585,843756,3368259,13455325,
%T 53774932,214978335,859595529,3437550076,13748021995,54986385093,
%U 219930610020,879683351911,3518631073489,14074256379660,56296324109907,225183460127725,900729032983924
%N Number of walks of length 2n between two nodes at distance 2 in the cycle graph C_10.
%C In general (2^n/m)*Sum_{r=0..m-1} cos(2*Pi*k*r/m)*cos(2*Pi*r/m)^n is the number of walks of length n between two nodes at distance k in the cycle graph C_m. Here we have m=10 and k=2.
%C Equals INVERT transform of A014138: (1, 3, 8, 22, 64, 196, ...). - _Gary W. Adamson_, May 15 2009
%H Colin Barker, <a href="/A095930/b095930.txt">Table of n, a(n) for n = 1..1000</a>
%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (7,-13,4)
%F a(n) = (4^n/10)*Sum_{r=0..9} cos(2*Pi*r/5)*cos(Pi*r/5)^(2*n).
%F a(n) = 7*a(n-1) - 13*a(n-2) + 4*a(n-3).
%F G.f.: (-x+3*x^2)/((-1+4*x)*(1-3*x+x^2)).
%F a(n) = (4^n + Lucas(2*n-1))/5. With a(0) = 0, binomial transform of A098703. - _Ross La Haye_, May 31 2006
%F a(n) = (2^(-1-n)*(2^(1+3*n) - (3-sqrt(5))^n*(1+sqrt(5)) + (-1+sqrt(5))*(3+sqrt(5))^n))/5. - _Colin Barker_, Apr 27 2016
%F E.g.f.: (2*exp(4*x) + (-1 - sqrt(5))*exp(((3 - sqrt(5))*x)/2) + (-1 + sqrt(5))*exp(((3 + sqrt(5))*x)/2))/10. - _Ilya Gutkovskiy_, Apr 27 2016
%t f[n_]:=FullSimplify[TrigToExp[(4^n/10)Sum[Cos[2Pi*k/5]Cos[Pi*k/5]^(2n), {k, 0, 9}]]];Table[f[n], {n, 1, 35}]
%o (PARI) Vec((-x+3*x^2)/((-1+4*x)*(1-3*x+x^2)) + O(x^50)) \\ _Colin Barker_, Apr 27 2016
%Y Cf. A014138.
%K nonn,easy
%O 1,2
%A _Herbert Kociemba_, Jul 12 2004