OFFSET
1,1
COMMENTS
Beginning at n=3, a(n) represents the maximum length of consecutive numbers that are divisible by the product of their nonzero digits in base n. In particular, if n=10, the sequence of numbers that are divisible by the product of their nonzero digits is given by A055471.
FORMULA
a(2k+1) = 2k+3.
a(2k) >= 2k+3.
EXAMPLE
For n=6, the least non-divisor of 6 is 4, so a(6) = 6+4 = 10. As seen in the Comments section, 55980, 55981, ..., 55989 form a sequence of length 10, where every number is divisible by the product of its nonzero digits in base n=6. Work has been done to show that 10 is the maximum length for such sequences.
MATHEMATICA
a[n_] := Module[{k = 1}, While[Divisible[n, k], k++]; n + k]; Array[a, 100] (* Amiram Eldar, Jul 23 2021 *)
PROG
(Python)
goal = 100
these = []
n = 1
while n <= goal:
k = 1
while n % k == 0:
k = k + 1
these.append(n + k)
n += 1
print(these)
(PARI) a(n) = my(k=2); while(!(n % k), k++); n+k; \\ Michel Marcus, Jul 23 2021
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Michael Gohn, Joshua Harrington, Sophia Lebiere, Hani Samamah, Kyla Shappell, Wing Hong Tony Wong, Jul 23 2021
STATUS
approved