OFFSET
1,1
COMMENTS
For n > 1, equals the smaller of A069561(n) (increasing) and A187930(n)-(n-1) (decreasing, normalized to the number at the beginning of the run).
a(1717) is the smallest case where a run of primes larger than 2 occurs before any equal length run of primes including 2. This is a trivial case, where the same decreasing run accounts for both a(1717) and a(1718) (a(1718) = a(1717) - 1). It is unknown if there are any nontrivial cases, such as there are examples for larger primes, e.g., {20, 21, 22} -> {5, 7, 11} (the first run of 3 with 5 as the smallest prime) occurs before {49, 50, 51} -> {7, 5, 3} (the first run of 3 with 3 as the smallest prime).
EXAMPLE
a(7) = 210998 because 2 is a factor of 210998, 3 is a factor of 210999, 5 is a factor of 211000, 7 is a factor of 211001, 11 is a factor of 211002, 13 is a factor of 211003, and 17 (= prime(7) = A000040(7)) is a factor of 211004.
a(8) = 4383585 because 19 (= prime(8) = A000040(8)) is a factor of 4383585, 17 is a factor of 4383586, 13 is a factor of 4383587, 11 is a factor of 4383588, 7 is a factor of 4383589, 5 is a factor of 4383590, 3 is a factor of 4383591, and 2 is a factor of 4383592.
PROG
(PARI) a(n)={if(n==1, return(2)); vecmin(vector(2, i, lift(chinese(vector(n, k, Mod((k-1)*if(i==1, -1, 1), prime(k)))))-if(i==1, 0, n-1)))}
CROSSREFS
KEYWORD
nonn,new
AUTHOR
Charles L. Hohn, Jul 06 2026
STATUS
approved
