%I #70 Mar 17 2023 15:12:43
%S 1,3,21,183,1641,14763,132861,1195743,10761681,96855123,871696101,
%T 7845264903,70607384121,635466457083,5719198113741,51472783023663,
%U 463255047212961,4169295424916643,37523658824249781,337712929418248023,3039416364764232201,27354747282878089803,246192725545902808221
%N Closed walks of length 2n along the edges of a cube based at a vertex.
%C a(n) is the number of words of length 2n on alphabet {0,1,2} with an even number (possibly zero) of each letter. - _Geoffrey Critzer_, Dec 20 2012
%H Vincenzo Librandi, <a href="/A054879/b054879.txt">Table of n, a(n) for n = 0..1000</a>
%H G. Benkart and D. Moon, <a href="http://arxiv.org/abs/1409.8154">A Schur-Weyl Duality Approach to Walking on Cubes</a>, arXiv preprint arXiv:1409.8154 [math.RT], 2014 and <a href="http://dx.doi.org/10.1007/s00026-016-0311-3">Ann. Combin. 20 (3) (2016) 397-417</a>
%H R. B. Brent, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL18/Brent/brent5.html">Generalizing Tuenter's Binomial Sums</a>, J. Int. Seq. 18 (2015) # 15.3.2.
%H G. R. Franssens, <a href="http://www.cs.uwaterloo.ca/journals/JIS/VOL9/Franssens/franssens13.html">On a number pyramid related to the binomial, Deleham, Eulerian, MacMahon and Stirling number triangles</a>, Journal of Integer Sequences, Vol. 9 (2006), Article 06.4.1.
%H Katarzyna Grygiel, Pawel M. Idziak and Marek Zaionc, <a href="http://arxiv.org/abs/1112.0643">How big is BCI fragment of BCK logic</a>, arXiv preprint arXiv:1112.0643 [cs.LO], 2011. [From _N. J. A. Sloane_, Feb 21 2012]
%H Ji-Hwan Jung, <a href="https://arxiv.org/abs/2009.01677">Oriented Riordan graphs and their fractal property</a>, arXiv:2009.01677 [math.CO], 2020.
%H R. J. Mathar, <a href="/A102518/a102518.pdf">Counting Walks on Finite Graphs</a>, Nov 2020, Section 5.
%H L. Reyzin, <a href="https://mathoverflow.net/questions/71736/number-of-closed-walks-on-an-n-cube">Number of closed walks on an n-cube</a>, Mathoverflow.
%H <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (10,-9).
%F a(n) = (3^(2*n)+3)/4.
%F G.f.: 1/4*1/(1-9*x)+3/4*1/(1-x).
%F a(n) = Sum_{k=0..n} 3^k*4^(n-k)*A121314(n,k). - _Philippe Deléham_, Aug 26 2006
%F E.g.f.: cosh^3(x). O.g.f.: 1/(1-3*1*x/(1-2*2*x/(1-1*3*x))) (continued fraction). - _Peter Bala_, Nov 13 2006
%F (-1)^n*a(n) = Sum_{k=0..n} A086872(n,k)*(-4)^(n-k). - _Philippe Deléham_, Aug 17 2007
%F a(n) = (1/2^3)*Sum_{j = 0..3} binomial(3,j)*(3 - 2*j)^(2*n). See Reyzin link. - _Peter Bala_, Jun 03 2019
%F a(n) = 9*a(n-1) - 6. - _Klaus Purath_, Mar 13 2021
%t nn = 40; Select[Range[0, nn]! CoefficientList[Series[Cosh[x]^3, {x, 0, nn}], x], # > 0 &] (* _Geoffrey Critzer_, Dec 20 2012 *)
%t Table[(3^(2n)+3)/4,{n,0,30}] (* or *) LinearRecurrence[{10,-9},{1,3},30] (* _Harvey P. Dale_, Mar 17 2023 *)
%o (Magma) [(3^(2*n)+3)/4: n in [0..25]]; // _Vincenzo Librandi_, Jun 30 2011
%Y Cf. A081294, A092812, A121822, A122983.
%K nonn,easy,walk
%O 0,2
%A Paolo Dominici (pl.dm(AT)libero.it), May 23 2000