%I #69 Feb 07 2023 17:53:16
%S 1,0,4,8,48,160,704,2688,11008,43520,175104,698368,2797568,11182080,
%T 44744704,178946048,715849728,2863267840,11453333504,45812809728,
%U 183252287488,733007052800,2932032405504,11728121233408
%N Number of walks of length n along the edges of an octahedron starting and ending at a vertex and also ( with a(0)=0 ) between two opposite vertices.
%H Vincenzo Librandi, <a href="/A054881/b054881.txt">Table of n, a(n) for n = 0..1000</a>
%H R. J. Mathar, <a href="/A102518/a102518.pdf">Counting Walks on Finite Graphs</a>, Nov 2020, Section 7.
%H <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (2,8).
%F a(n) = 4*A003683(n-1) + 0^n/2, n >= 0.
%F a(n) = (4^n + (-1)^n*2^(n+1) + 3*0^n)/6.
%F G.f.: (1/6)*(3 + 2/(1+2*x) + 1/(1-4*x)).
%F From _L. Edson Jeffery_, Apr 22 2015: (Start)
%F G.f.: (1-2*x-4*x^2)/((1+2*x)*(1-4*x)).
%F a(n) = 8*A246036(n-3) + 0^n/2, n >= 0. (End)
%F a(n) = 2^n*A001045(n-1) + (1/2)*[n=0] = 2^n*(2^(n-1) + (-1)^n)/3 + (1/2)*[n=0], n >= 0. - _Ralf Steiner_, Aug 27 2020, edited by _M. F. Hasler_, Sep 11 2020
%F E.g.f.: (1/6)*(exp(4*x) + 2*exp(-2*x) + 3). - _G. C. Greubel_, Feb 06 2023
%t CoefficientList[Series[(1-2*x-4*x^2)/((1+2x)*(1-4x)), {x,0,40}], x] (* _L. Edson Jeffery_, Apr 22 2015 *)
%t LinearRecurrence[{2,8}, {1,0,4}, 41] (* _G. C. Greubel_, Feb 06 2023 *)
%o (Magma) [(4^n+(-1)^n*2^(n+1)+3*0^n)/6: n in [0..30]]; // _Vincenzo Librandi_, Apr 23 2015
%o (SageMath) [(4^n + (-1)^n*2^(n+1) + 3*0^n)/6 for n in range(31)] # _G. C. Greubel_, Feb 06 2023
%Y Cf. A001045, A003683, A054882, A054883, A054884, A054885, A246036.
%K nonn,walk,easy
%O 0,3
%A Paolo Dominici (pl.dm(AT)libero.it), May 23 2000