OFFSET
1,1
COMMENTS
The numbers 2, 3, and 4 occur with density 0.929... since (zeta(2) - 1) + (zeta(3) - 1) + (zeta(4) - 1) = (Pi^2/6 - 1) + 0.20205... + 0.0823... = 0.929...
From Kevin Ryde, Dec 05 2020: (Start)
a(n) can be calculated by writing n-1 in the following mixed-radix expansion,
.. m m ... m m m-1 ... 3 2 radix
.. !=m-1 m-1 ... m-1 0 !=0 ... !=0 !=0 digit of n-1
|-----j-----| a(n) = j+2
The least significant digit is radix 2, the next is radix 3, etc., until a 0 digit is found at radix m. Further higher digits are radix m. j is the number of consecutive m-1 digits immediately above the 0. That part of n-1 is floor((n-1)/m!) and is equal to floor(n/m!) since any carry when incrementing n-1 to n will not go past the 0 digit.
Those n in class k, i.e., a(n)=k, can be characterized by certain sets of remainders n mod m^(k-1)*m! for each m >= 2. The modulus covers digits up to and including !=m-1 for the given k. There are (m-1)! combinations of permitted digit values within the modulus, so density (m-1)!/(m^(k-1)*m!) = 1/m^k (and total Sum_{m>=2} 1/m^k = zeta(k)-1).
The smallest n with a(n)=k is n = 2^(k-1)-1. This is m=2 and n-1 = binary 011..110 where the number of 1's is j=k-2.
(End)
LINKS
Kevin Ryde, Table of n, a(n) for n = 1..10080
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.
FORMULA
Given [Keith's array, section 4]; and A143028 through A143034, which partitions the set of natural numbers according to asymptotic density of zeta(k) - 1:
A2 = [1, 2, 4, 5, 6, 10, 12, ...] = A143028, density zeta(2) - 1 = 0.6449...
A3 = [3, 11, 14, 19, 27, 32, ...] = A143029, density zeta(3) - 1 = 0.2020...
A4 = [7, 23, 39, 50, 55, 71, ...] = A143030, density zeta(4) - 1 = 0.0823...
A5 = [15, 47, 79, 111, 143, ...] = A143031, density zeta(5) - 1 = ........ etc., where Sum_{k>=2} (zeta(k) - 1) = 1.0 or 100%; such that "2" will occur with a frequency zeta(2) - 1 = 0.644...; "3" will occur with the frequency zeta(3) - 1 = 0.20205...; and "k" will occur with the frequency zeta(k) - 1. Thus a(n) = the zeta(k) - 1 subset to which n belongs, according to the system discovered by Keith.
From Kevin Ryde, Dec 05 2020: (Start)
a(n) = j+2 where n = L + m!*(b[0]*m^0 + b[1]*m^1 + b[2]*m^2 + ...) where m=A339013(n), L in the range 0 < L < m!, each digit b[i] in the range 0 <= b[i] < m, and smallest j where b[j] != m-1. [Keith, section 3]
a(n) = 2 + A286563(1+floor(n/m!), m), where m=A339013(n) and A286563(q,m) is the m-adic valuation of q (including A286563(q,m)=0 when m>q).
(End)
Asymptotic mean: lim_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Sum_{k>=2} k*(zeta(k)-1) = Pi^2/6 + 1. - Amiram Eldar, Feb 15 2021
EXAMPLE
Examples: A143028 gives a subset of terms within the natural number system that tend to density zeta(2) - 1 = Pi^2/6 - 1 = 0.644...: where A143028 = [1, 2, 4, 5, 6, 8, 9, 10, 12, ...]. Terms a(1), a(2), a(4), ... = 2.
Similarly, zeta(3) - 1 = 0.20205..., denoted by A143029: [3, 11, 14, 19, 27, 32, ...]; so terms a(3), a(11), a(14), ... = 3.
From Kevin Ryde, Dec 05 2020: (Start)
For n = 880644, the mixed-radix expansion of n-1 is
m lowest 0 digit gives m
6 6 6 6 6 5 4 3 2 radix
5 3 5 5 0 3 1 2 1 digit of n-1
|---| 2 digits m-1, a(n)=2+2=4
(End)
MATHEMATICA
a[n_] := Module[{k = n - 1, m = 2, r}, While[{k, r} = QuotientRemainder[k, m]; r != 0, m++]; IntegerExponent[k + 1, m] + 2]; Array[a, 30] (* Amiram Eldar, Feb 15 2021 after Kevin Ryde's PARI code *)
PROG
(PARI) a(n) = n--; my(m=2, r); while([n, r]=divrem(n, m); r!=0, m++); 2+valuation(n+1, m); \\ Kevin Ryde, Dec 05 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Gary W. Adamson, Jun 06 2009
STATUS
approved