OFFSET
1,1
COMMENTS
The prohibition in the definition distinguishes this sequence from A065559. This sequence identifies the first occurrence of a gap between numbers with the same tau, where no intervening number has that tau. Each tau t > 1 has a corresponding sequence of gaps (e.g., for t = 2, A001223, for t = 3, A069482), and a(n) is the smallest index of terms in A000005 corresponding to the first occurrence of a gap of length n in all of these (same tau) gap sequences.
A number appearing in this sequence cannot appear again, and many numbers do not appear at all (1 is not in because it is the only number with 1 divisor; 5 6 and 8 are not in because 3 is already a term; 10 is not in because 7 is a term, etc.
LINKS
David A. Corneth, Table of n, a(n) for n = 1..10000
EXAMPLE
a(1) = 2 because 2 is the smallest k such that tau(k) = tau(k+1); a(2) = 3 because it is the smallest k with tau(k) = tau(k+2) with no intervening same tau number; a(3) = 35 because d(35) = 4, d(36) = 9, d(37) = 2, d(38) = 4 = d(35) and this is the least case of a gap of 3. (Here d means tau, namely, A000005.)
MATHEMATICA
Block[{a = {}, k, d = DivisorSigma[0, Range[2^14]]}, Do[k = 1; While[Or[#[[1]] != #[[-1]], Count[#, #[[1]]] > 2] &@ d[[k ;; k + n]], k++]; AppendTo[a, k], {n, 55}]; a] (* Michael De Vlieger, Aug 27 2021 *)
PROG
(PARI) a(n) = {my(i); for(i = 1, oo, if(iscan(i, n), return(i) ) ) }
iscan(k, n) = { my(c); c = numdiv(k); if(numdiv(k + n) != c, return(0) ); for(i = 1, n-1, if(numdiv(k + i) == c, return(0) ) ); 1 } \\ David A. Corneth, Aug 27 2021
(Python)
from sympy import divisor_count
from functools import lru_cache
@lru_cache(maxsize=None)
def tau(n): return divisor_count(n)
def a(n):
k = 2
while True:
while tau(k) != tau(k+n): k += 1
if not any(tau(m) == tau(k) for m in range(k+1, k+n)): return k
k += 1
print([a(n) for n in range(1, 56)]) # Michael S. Branicky, Aug 27 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
David James Sycamore, Aug 27 2021
STATUS
approved