This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A161189 #30 Mar 09 2024 15:30:34 %S A161189 2,2,3,2,2,2,4,2,2,2,3,2,2,3,5,2,2,2,3,2,2,2,4,2,2,2,3,2,2,2,6,3,2,2, %T A161189 3,2,2,2,4,2,2,2,3,2,2,2,5,2,2,4,3,2,2,2,4,2,2,2,3,2,2,2,7,2,2,2,3,3, %U A161189 2,2,4,2,2,2,3,3,2,3,5,2,2,2,3,2,2,3,4,2,2,2,3,2,2,2,6,2,2,2,3,2 %N A161189 Set a(n) = k if n is in the set zeta(k) - 1 in the notation defined by William J. Keith in 2010. %C A161189 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... %C A161189 From _Kevin Ryde_, Dec 05 2020: (Start) %C A161189 a(n) can be calculated by writing n-1 in the following mixed-radix expansion, %C A161189 .. m m ... m m m-1 ... 3 2 radix %C A161189 .. !=m-1 m-1 ... m-1 0 !=0 ... !=0 !=0 digit of n-1 %C A161189 |-----j-----| a(n) = j+2 %C A161189 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. %C A161189 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). %C A161189 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. %C A161189 (End) %H A161189 Kevin Ryde, <a href="/A161189/b161189.txt">Table of n, a(n) for n = 1..10080</a> %H A161189 William J. Keith, <a href="https://www.emis.de/journals/INTEGERS/papers/k19/k19.Abstract.html">Sequences of Density zeta(K) - 1</a>, INTEGERS, Vol. 10 (2010), Article #A19, pp. 233-241. Also <a href="http://arxiv.org/abs/0905.3765">arXiv preprint</a>, arXiv:0905.3765 [math.NT], 2009 and <a href="http://www.math.drexel.edu/~keith/ZetaKMinusOne.pdf">author's copy</a>. %F A161189 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: %F A161189 A2 = [1, 2, 4, 5, 6, 10, 12, ...] = A143028, density zeta(2) - 1 = 0.6449... %F A161189 A3 = [3, 11, 14, 19, 27, 32, ...] = A143029, density zeta(3) - 1 = 0.2020... %F A161189 A4 = [7, 23, 39, 50, 55, 71, ...] = A143030, density zeta(4) - 1 = 0.0823... %F A161189 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. %F A161189 From _Kevin Ryde_, Dec 05 2020: (Start) %F A161189 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] %F A161189 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). %F A161189 (End) %F A161189 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 %e A161189 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. %e A161189 Similarly, zeta(3) - 1 = 0.20205..., denoted by A143029: [3, 11, 14, 19, 27, 32, ...]; so terms a(3), a(11), a(14), ... = 3. %e A161189 From _Kevin Ryde_, Dec 05 2020: (Start) %e A161189 For n = 880644, the mixed-radix expansion of n-1 is %e A161189 m lowest 0 digit gives m %e A161189 6 6 6 6 6 5 4 3 2 radix %e A161189 5 3 5 5 0 3 1 2 1 digit of n-1 %e A161189 |---| 2 digits m-1, a(n)=2+2=4 %e A161189 (End) %t A161189 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 *) %o A161189 (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 %Y A161189 Cf. A143028, A143029, A143030, A143031, A143032, A143033, A143034, A143035, A143036, A286563, A339013 (B class). %K A161189 nonn %O A161189 1,1 %A A161189 _Gary W. Adamson_, Jun 06 2009