OFFSET
0,2
COMMENTS
a(n)/4^n tends to zero as n increases.
LINKS
Vaclav Kotesovec, Table of n, a(n) for n = 0..1000
FORMULA
a(2n) = 4*a(2n-1) - A054474(n); a(2n+1) = 4*a(2n).
G.f.: agm(1, (1+4*x)/(1-4*x)), where agm(x,y) = agm((x+y)/2,sqrt(x*y)) is the arithmetic-geometric mean. - Paul D. Hanna, Oct 03 2014
a(n) ~ Pi * 4^n / log(n) * (1 - (gamma + 3*log(2)) / log(n) + (gamma^2 + 6*gamma*log(2) + 9*log(2)^2 - Pi^2/6) / log(n)^2), where gamma is the Euler-Mascheroni constant A001620. - Vaclav Kotesovec, Sep 29 2019
EXAMPLE
a(2)=12 since there are 16 2-step walks but 4 of them involve a return to the origin at some stage; similarly a(3)=48 since there are 64 3-step walks but 16 of them involve a return to the origin at some stage.
MATHEMATICA
CoefficientList[ Pi/(2 (1 - 4 x) EllipticK[16 x^2]) + O[x]^25, x] (* Jean-François Alcover, Jun 02 2019 *)
PROG
(PARI) my(x='x+O('x^33)); Vec( agm(1, (1+4*x)/(1-4*x)) ) \\ Joerg Arndt, May 17 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Henry Bottomley, Aug 28 2001
EXTENSIONS
a(23) corrected by Jean-François Alcover, Jun 02 2019
STATUS
approved