Saturday, 29 September 2012

co.combinatorics - Asymptotics of a Bernoulli-number-like function

[Revised and expanded to give the answer for all k>1 and incorporate
further terms of an asymptotic expansion as nrightarrowinfty]



Fix k>1, and write a1=f(1,k)=1 and
an=f(n,k)=frac11qnsumn1r=1nchooser(1/k)nr(1/q)rarphantomfor(n>1),


where q:=k/(k1), so (1/k)+(1/q)=1. Set
ainfty:=frac1klogq.

For example, if k=2 then ainfty=1/log4=0.72134752ldots,
which an seems to approach for large n, and likewise for
k=6 (the dice-throwing case) with ainfty=1/(6log1.2)=0.9141358ldots. Indeed as nrightarrowinfty we have
"anrightarrowainfty on average", in the sense that (for instance)
sumNn=1(an/n)simainftyphantom.sumNn=1(1/n)
as Nrightarrowinfty. But, as suggested by earlier
posted answers to Tim Chow's question, an does not converge,
though it stays quite close to ainfty: we have
an=ainfty+epsilonphantom.0(logqn)+O(1/n)

as nrightarrowinfty, where epsilonphantom.0 is a smooth
function of period 1 whose average over bfR/bfZ vanishes
but is not identically zero; for large k (already k=2 is large
enough), epsilonphantom.0 is a nearly perfect sine wave
with a tiny amplitude exp(pi2k+O(logk)), namely
frac2klogqleft|phantom.Gammabigl(1+frac2piilogqbigr)right|phantom.=phantom.frac2klogqleft[frac(2pi2/logq)sinh(2pi2/logq)right]1/2.

For example, for k=2 the amplitude is 7.130117ldotscdot106,
in accordance with numerical observation (see previously posted answers
and the plot below). For k=6 the amplitude is only
8.3206735ldotscdot1023 so one must compute well beyond
the usual "double precision" to see the oscillations.



More precisely, there is an asymptotic expansion
ansimainfty+epsilonphantom.0(logqn)+n1epsilonphantom.1(logqn)+n2epsilonphantom.2(logqn)+n3epsilonphantom.3(logqn)+cdots,


where each epsilonphantom.j is smooth function of period 1
whose average over bfR/bfZ vanishes, and
— while the series need not converge —
truncating it before the term njepsilonphantom.j(logqn)
yields an approximation good to within O(nj). The first few
epsilonphantom.j still have exponentially small amplitudes,
but larger that of epsilonphantom.0 by a factor
simCjk2j for some Cj>0; for instance, the amplitude of
epsilonphantom.1 exceeds that of epsilonphantom.0
by about 2(pi/logq)2sim2pi2k2. So an must be
computed up to a somewhat large multiple of k2 before it becomes
experimentally plausible that the residual oscillation anainfty
won't tend to zero in the limit as nrightarrowinfty.



Here's a plot that shows an for k=2 (so also q=2) and
26leqnleq213, and compares with the periodic approximation
ainfty+epsilonphantom.0(logqn) and the refined approximation
ainfty+sum2j=0njepsilonphantom.j(logqn).
(See http://math.harvard.edu/~elkies/mo11255+.pdf for
the original PDF plot, which can be "zoomed in" to view details.) The
horizontal coordinate is log2n; the vertical coordinate is centered at
ainfty=1/(2log2), showing also the lines ainftypm2|a1|;
black cross-hairs, eventually merging visually into a continuous curve,
show the numerical values of an; and the red and green contours
show the smooth approximations.





To obtain this asymptotic expansion, we start by generalizing
R.Barton's formula from k=2 to arbitrary k>1:
an=frac1ksumir=0nftyphantom.nqr(1qr)n1.


[The proof is the same, but note the exponent n has been corrected
to n1 since we want n1 players eliminated at the r-th step,
not all n; this does not affect the limiting behavior
ainfty+epsilonphantom.0(logqn), but is needed to get
epsilonphantom.m right for m>1.] We would like to approximate
the sum by an integral, which can be evaluated by the change of variable
qr=z:
frac1kintir=0nftyphantom.nqr(1qr)n1=frac1klogqint10phantom.n(1z)n1dz=left[ainfty(1z)nright]1z=0=ainfty.

But it takes some effort to get at the error in this approximation.



We start by comparing (1qr)n1 with exp(nqr):
begin{eqnarray} (1-q^{-r})^{n-1} &=& exp(-nq^{-r}) cdot exp phantom. [nq^{-r} + (n-1) log(1-q^{-r})] cr &=& exp(-nq^{-r}) cdot  exp left[q^{-r} - (n-1) left(     frac{q^{-2r}}2 + frac{q^{-3r}}3 + frac{q^{-4r}}4 + cdots     right)   right]. end{eqnarray}


The next two steps require justification (as R.Barton noted for
the corresponding steps at the end of his analysis), but the
justification should be straightforward. Expand the second factor
in powers of u:=nqr, and collect like powers of n, obtaining
exp(nqr)cdotleft(1fracu22u2n+frac3u420u3+24u224n2fracu614u5+52u448u348n3+cdotsright).

Each term njepsilonj(logq(n)) (j=0,1,2,3,ldots)
will arise from the nj term in this expansion.



We start with the main term, for j=0,
which is the only one that does not decay with n. Define
varphi0(x):=qxexp(qx),


which as Reid observed decays rapidly both as xrightarrowinfty
and as xrightarrowinfty. Our zeroth-order approximation to an is
frac1ksumir=0nftyphantom.varphi0(logq(n)r),

which as nrightarrowinfty rapidly nears
frac1ksumir=inftynftyvarphi0(logq(n)r).

For k=q=2, this is equivalent with Reid's formula for R(n),
even though he wrote it in terms of the fractional part of log2(n),
because the sum is clearly invariant under translation of logq(n)
by integers.



We next apply Poisson summation. Since
sumrinbfZphantom.varphi0(t+r)
is a smooth bfZ-periodic function of t, it has a Fourier expansion
summinbfZphantom.cme2piimt


where
cm=int10left[sumrinbfZphantom.varphi0(t+r)right]phantom.e2piimtdt=intiinftynftyvarphi0(t)phantom.e2piimtdt=hatvarphi0(m).

Changing the variable of integration from t to qt lets us recognize the
Fourier transform hatvarphi as 1/log(q) times a Gamma integral:
hatvarphi0(y)=frac1logqGammaBigl(1+frac2piiylogqBigr).

This gives us the coefficients am in closed form. The constant coefficient
a0=1/(logq) can again be interpreted as the approximation of the
Riemann sum sumrinbfZphantom.varphi0(t+r) by an integral;
the oscillating terms ame2piimt for mneq0
are the corrections to this approximation, and are small due to the
exponential decay of the Gamma function on vertical strips — indeed
we can compute the magnitude |am| in elementary closed form using the formula
|Gamma(1+itau)|=(pitau/sinh(pitau))1/2. So we have
frac1ksumrinbfZphantom.varphi0(logq(n)r)=frac1ksumminbfZphantom.hatvarphi0(m)e2piilogq(n)=ainfty+epsilon0(logq(n))

where ainfty=a0/k=1/(klogq) as above, and
epsilonphantom.0, defined by
epsilonphantom.0(t)=left[sumrinbfZphantom.varphi0(t+r)right]ainfty,

has the Fourier series
epsilonphantom.0(t)=frac1ksummneq0hatvarphi0(m)e2piimt.

Taking m=pm1 recovers the amplitude 2|a1|/k exhibited above;
the m=pm2 and further terms yield faster but tinier oscillations,
e.g. for k=2 the m=pm2 terms oscillate twice as fast but with
amplitude only 6.6033857ldotscdot1012.



The functions epsilonphantom.j appearing in the further terms
njepsilonphantom.j(logq(n))
of the asymptotic expansion of an are defined similarly by
epsilonphantom.j(t)=frac1ksumrinbfZphantom.varphij(t+r),


where
varphij(x)=Pj(qx)varphi0(x)=Pj(qx)qxexp(qx)

and Pj is the coefficient of nj in our power series
(1qr)n1=exp(nqr)phantom.sumij=0nftyfracPj(nqr)nj.

Thus
P0(u)=1,phantom+P1(u)=(u22u)/2,phantom+P2(u)=(3u420u3+24u2)/24, etc.
Again we apply Poisson to expand epsilonphantom.j(logq(n))
in a Fourier series:
epsilonphantom.j(t)=frac1ksumminbfZhatvarphij(m)e2piimt,

and evaluate the Fourier transform hatvarphij by integrating
with respect to qt. This yields a linear combination of Gamma
integrals evaluated at 1+(2piiy/logq)+j for
integers jin[j,2j], giving hatvarphij as a
degree-2j polynomial multiple of hatvarphi0. The first case is
begin{eqnarray*} hatvarphi_1(y) &=& frac1{log q} left[   GammaBigl(2 + frac{2 pi i y} {log q}Bigr)   - frac12 GammaBigl(3 + frac{2 pi i y} {log q}Bigr)   right] \ &=& frac1{log q} frac{pi y}{log q} left(frac{2 pi y}{log q} - iright)   phantom.   GammaBigl(1 + frac{2 pi i y} {log q}Bigr) \ &=& frac{pi y}{log q} left(frac{2 pi y}{log q} - iright)  phantom. hatvarphi_0(y). end{eqnarray*}

Note that varphi1(0)=0, so the constant coefficient of the
Fourier series for epsilonphantom.1(t) vanishes;
this is indeed true of epsilonphantom.j(t) for each j>0,
because hatvarphij(0)=intiinftynftyphij(x)phantom.dx
is the nj coefficient of a power series in n1 that we've
already identified with the constant ainfty. Hence (as can also
be seen in the plot above) none of the decaying corrections
njepsilonphantom.j(logqn) biases the average of an
away from ainfty, even when n is small enough that
those corrections are a substantial fraction of the
residual oscillation epsilon0(logqn). This leaves
hatvarphij(mp1)epm2piit/k as the leading terms
in the expansion of each epsilonphantom.j(t), so we see as promised
that epsilonphantom.j is still exponentially small but with
an extra factor whose leading term is a multiple of (2pi/logq)2j.

No comments:

Post a Comment