A339013 Class number m containing n in a partitioning of the natural numbers into classes B_m by William J. Keith.
2, 3, 2, 4, 2, 4, 2, 3, 2, 5, 2, 5, 2, 3, 2, 5, 2, 5, 2, 3, 2, 5, 2, 5, 2, 3, 2, 4, 2, 4, 2, 3, 2, 6, 2, 6, 2, 3, 2, 6, 2, 6, 2, 3, 2, 6, 2, 6, 2, 3, 2, 4, 2, 4, 2, 3, 2, 6, 2, 6, 2, 3, 2, 6, 2, 6, 2, 3, 2, 6, 2, 6, 2, 3, 2, 4, 2, 4, 2, 3, 2, 6, 2, 6, 2, 3, 2
Offset: 1
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.
Crossrefs
Programs
-
Mathematica
a[n_] := Module[{k = n - 1, m = 2, r}, While[{k, r} = QuotientRemainder[k, m]; r != 0, m++]; m]; Array[a, 30] (* Amiram Eldar, Feb 15 2021 after Kevin Ryde's PARI code *)
-
PARI
a(n) = n--; my(b=2,r); while([n,r]=divrem(n,b);r!=0, b++); b;
Formula
a(n) = A339012(n-1) + 2.
a(n) = m iff n == 1 + Sum_{j=1..m-2} d[j]*j! (mod m!) with d[j] in ranges 1 <= d[j] <= j. [Keith, section 2.1 lemma 1]
a(n)=2 iff n mod 2 = 1. [Keith section 4 residues].
a(n)=3 iff n mod 6 = 2.
a(n)=4 iff n mod 24 = 4 or 6.
a(n)=5 iff n mod 120 = any of 10, 12, 16, 18, 22, 24.
Comments