login
A346563
a(n) = n + A007978(n).
0
3, 5, 5, 7, 7, 10, 9, 11, 11, 13, 13, 17, 15, 17, 17, 19, 19, 22, 21, 23, 23, 25, 25, 29, 27, 29, 29, 31, 31, 34, 33, 35, 35, 37, 37, 41, 39, 41, 41, 43, 43, 46, 45, 47, 47, 49, 49, 53, 51, 53, 53, 55, 55, 58, 57, 59, 59, 61, 61, 67, 63, 65, 65, 67, 67
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
STATUS
approved