%I #19 Sep 02 2024 01:20:40
%S 1,0,6,12,54,216,1032,4896,24606,125040,651348,3432168,18331992,
%T 98814816,537343632,2942475552,16214888286,89835783264,500116783740,
%U 2795958732024,15690597591636,88354191756816,499060719941616,2826794871554112,16052536475622792
%N Number of walks of length n on hexagonal grid that start and end at the origin. Intermediate returns to the origin are not permitted.
%H Alois P. Heinz, <a href="/A094060/b094060.txt">Table of n, a(n) for n = 0..1291</a> (first 97 terms from Ludovic Schwob)
%F INVERTi transform of A002898. - _R. J. Mathar_, Sep 29 2020
%p b:= proc(n) option remember; `if`(n<3, [1,0,6][n+1], ((n-1)*
%p n*b(n-1) +24*(n-1)^2*b(n-2) +36*(n-1)*(n-2)*b(n-3))/n^2)
%p end:
%p a:= proc(n) option remember; `if`(n=0, 1,
%p b(n)-add(a(n-i)*b(i), i=1..n-1))
%p end:
%p seq(a(n), n=0..23); # _Alois P. Heinz_, Dec 07 2020
%t b[n_] := b[n] = If[n<3, {1, 0, 6}[[n+1]], ((n-1)n b[n-1] + 24(n-1)^2* b[n-2] + 36(n-1)(n-2) b[n-3])/n^2];
%t a[n_] := a[n] = If[n==0, 1, b[n] - Sum[a[n-i] b[i], {i, 1, n-1}]];
%t a /@ Range[0, 23] (* _Jean-François Alcover_, Jan 14 2021, after _Alois P. Heinz_ *)
%Y Cf. A002898, A054474.
%K nonn,walk
%O 0,3
%A _Gareth McCaughan_, Jun 10 2004