OFFSET
1,4
COMMENTS
The geometric mean approaches Product_{k>=2} k^(zeta(k+1)-1) = 1.40665264499... in the limit.
This sequence is generated by the D'Hondt (or Jefferson) apportionment method for the given distribution. - Pontus von Brömssen, Mar 31 2026
LINKS
Jwalin Bhatt, Table of n, a(n) for n = 1..10000
William J. Keith, Sequences of Density zeta(K) - 1, INTEGERS, Vol. 10 (2010), Article #A19, pp. 233-241. Also arXiv preprint, arXiv:0905.3765 [math.NT], 2009 and author's copy.
Wikipedia, D'Hondt method.
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.550 | - | - | 1 |
| 2 | 3.101 | 4.949 | - | 1 |
| 3 | 4.651 | 4.949 | - | 1 |
| 4 | 6.202 | 4.949 | - | 2 |
| 5 | 6.202 | 9.898 | 12.147 | 1 |
MATHEMATICA
pdf[i_] := Zeta[i+1] -1
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
]
A393663 = samplePDF[120]
PROG
(Python)
from sympy import oo, zeta
def sample_zeta_distribution(num_coeffs):
coeffs, counts = [], [0]
for _ in range(num_coeffs):
min_time = oo
for i, count in enumerate(counts, start=1):
time = (count+1) / ((zeta(i+1))-1)
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
A393663 = sample_zeta_distribution(120)
CROSSREFS
KEYWORD
nonn
AUTHOR
Jwalin Bhatt, Feb 24 2026
STATUS
approved
