OFFSET
1,5
COMMENTS
The probability mass function used here is a simple example of a heavy log tail distribution. It can be seen as a discrete analog of the log-Cauchy distribution. As a consequence of the heavy tail, the arithmetic mean of this sequence diverges to infinity but it has a finite geometric mean.
A general family of these distributions is given by 1/log_2(i+1)^p - 1/log_2(i+2)^p where p>0.
Properties change sharply at p=1, the arithmetic mean remains infinite for all p but the geometric mean becomes finite for p>1 and infinite for p<=1.
| mean | 0 < p <= 1 | p > 1 |
|------------|------------|--------|
| arithmetic | oo | oo |
| geometric | oo | finite |
The Fisher information is always finite and given by Sum_{i=1..inf} ((ln(log_2(i+2))/(log_2(i+2))^p - ln(log_2(i+1))/(log_2(i+1))^p)^2) / (1/(log_2(i+1))^p - 1/(log_2(i+2))^p).
This sequence is generated by the D'Hondt (or Jefferson) apportionment method for the given distribution.
The geometric mean equals Product_{i>=1} (1+1/i)^(1/log_2(i+2)^2) = 2.097184811... and for general power p in the family above it equals Product_{i>=1} (1+1/i)^(1/log_2(i+2)^p). - Jwalin Bhatt, Jun 03 2026
LINKS
Jwalin Bhatt, Table of n, a(n) for n = 1..10000
Wikipedia, D'Hondt method.
Wikipedia, Log-Cauchy distribution.
EXAMPLE
Let p(k) denote the probability of k and c(k) denote the count of occurrences of k so far.
We take the ratio of the actual occurrences c(k)+1 to the probability and pick the one with the lowest value.
Since p(k) is monotonic decreasing, we only need to compute c(k) once we see c(k-1).
| n | (c(1)+1)/p(1) | (c(2)+1)/p(2) | (c(3)+1)/p(3) | choice |
|---|---------------|---------------|---------------|--------|
| 1 | 1.661 | - | - | 1 |
| 2 | 3.322 | 6.753 | - | 1 |
| 3 | 4.983 | 6.753 | - | 1 |
| 4 | 6.645 | 6.753 | - | 1 |
| 5 | 8.306 | 6.753 | - | 2 |
| 6 | 8.306 | 13.506 | 15.499 | 1 |
MATHEMATICA
pdf[i_] := 1/Log2[i+1]^2 - 1/Log2[i+2]^2
samplePDF[numCoeffs_] := Module[
{coeffs = {}, counts = {0}, minTime, minIndex, time},
Do[
minTime = Infinity;
Do[
time = (counts[[i]] + 1)/pdf[i];
If[time < minTime, minIndex = i; minTime = time],
{i, 1, Length[counts]}
];
If[minIndex == Length[counts], AppendTo[counts, 0]];
counts[[minIndex]] += 1;
AppendTo[coeffs, minIndex],
{numCoeffs}
];
coeffs
]
A396405 = samplePDF[120]
PROG
(Python)
from mpmath import iv
def pdf(k):
return 1/iv.log(k+1, 2)**2 - 1/iv.log(k+2, 2)**2
def sample_log_tail_distribution(num_coeffs):
coeffs, counts = [], [0]
for _ in range(num_coeffs):
min_time = iv.inf
for i, count in enumerate(counts, start=1):
time = (count+1) / pdf(i)
if time < min_time:
min_index, min_time = i, time
if min_index == len(counts):
counts.append(0)
counts[min_index-1] += 1
coeffs.append(min_index)
return coeffs
A396405 = sample_log_tail_distribution(120)
CROSSREFS
KEYWORD
nonn
AUTHOR
Jwalin Bhatt, May 24 2026
STATUS
approved
