[math-fun] Gould's sequence and 'mean spectra'
Gould's sequence: http://oeis.org/A001316 This sequence is very erratic, but it is straightforward to apply some calculations to determine various means of the first n terms: Arithmetic mean: O(n^(log(3)/log(2)-1)) Quadratic mean: O(n^(log(5)/log(4)-1/2)) Cubic mean: O(n^(log(9)/log(8)-1/3)) Quartic mean: O(n^(log(17)/log(16)-1/4)) ... Clearly, these converge to O(n). The first formula is derived from the Sierpinski triangle; subsequent formulae are based on higher-dimensional generalisations. The harmonic mean can be calculated in a very different way, by analysing A000120. Let the sum of the first 2^a terms be denoted omega(a). We have the recurrence relation: omega(a+1) = 2*omega(a) + 2^a Expanding this yields: omega(a+1) = 2^a + 2*2^(a-1) + 4*2^(a-2) + ... + 2^a = (a+1)*2^a The arithmetic mean, omega(a+1)/2^(a+1) = (a+1)/2. So, the arithmetic mean of the first 2^a terms is a/2. The arithmetic mean of the first n terms is asymptotically (log(n)/log(2))/2 = log(n)/log(4). The geometric mean of Gould's sequence is thus: O(2^(log(n)/log(4))) = O(sqrt(n)). The harmonic mean of Gould's sequence is the reciprocal of the arithmetic mean of the reciprocal of Gould's sequence. The sum of the first 2^a terms is (3/2)^a; the mean is (3/2)^a/2^a = (3/4)^a. The reciprocal of this is (4/3)^a. Taking logs yields: (4/3)^a = exp(log((4/3)^a)) = exp(a*log(4/3)) = O(exp(log(n)*log(4/3)/log(2))) = O(n^(log(4/3)/log(2))) = O(n^(2-log(3)/log(2))) Specifically, the exponents of the means (henceforth referred to as the 'mean spectrum') are as follows: -infM: 0 ... -xM: 1-log((2^x+1)/2)/log(2^x) ... -4M: log(32/17)/log(16) = 0.228134... -3M: log(16/9)/log(8) = 0.276692... -2M: log(8/5)/log(4) = 0.339036... HM: log(4/3)/log(2) = 0.415037... GM: 1/2 = 0.500000... AM: log(3/2)/log(2) = 0.584963... QM: log(5/2)/log(4) = 0.660964... CM: log(9/2)/log(8) = 0.723308... 4M: log(17/2)/log(16) = 0.771866... ... xM: log((2^x+1)/2)/log(2^x) ... infM: 1 There is an elegant reflection formula here, which is that the opposite exponents sum to unity. The spectrum is sigmoid, or S-shaped, similar to the logistic function, hyperbolic tangent function, and cumulative normal distribution function. The spectrum has the formula: f(x) = (log_2(2^x + 1) - 1)/x. A natural analogue of the function is g(x) = (ln(e^x + 1) - 1)/x, which is also a sigmoid function. Differentiating with respect to x produces: g'(x) = (x*e^x/(e^x+1) - ln(e^x + 1) + 1)/x^2. It can be verified that this is indeed an even function. Which other discrete sequences produce interesting mean spectra? For the sequence of natural numbers, we have f(x) = 1 for x >= 0, and f(x) = -1/x for x <= -1. I'm not sure what the spectrum is like between -1 and 0. Sincerely, Adam P. Goucher
participants (1)
-
Adam P. Goucher