OFFSET
2,2
COMMENTS
Each valid number in a given base n must be a one-digit extension to the right (or left) of another valid number in the same base; otherwise, you could ignore the added digit, make a multiple of n+1 with the rest of the number, then multiply it by the new digit to get a multiple of n+1.
a(n) is always less than n^(n+1).
a(n) also appears to be less than n^(n/2), except at n=3.
LINKS
Tomas Rigaux, Python generator code
EXAMPLE
For n = 2, the binary notation of a number cannot contain any 0, as you could then construct 0 by multiplying all the digits together, so the only candidates are 1, 11, 111, 1111 (or 1, 3, 7, 15, ... in base 10).
Out of those, if you have at least 2 digits, the number contains the substring '11', which can be multiplied by all the other digits to give 11 (or 3 in base 10), which gives a(2) = 1 as the largest and only solution.
For n = 4, a(n) = 13 can be easily checked using the fact that the base-4 expansion of a valid number cannot contain a 2 and a 3 next to each other, as 2+3 = 5 = n+1.
For n = 10, 12345 is not a valid number as 1+2*3*4*5 = 121 = 11*11.
PROG
(Python) # See Python link
CROSSREFS
KEYWORD
nonn,more,base
AUTHOR
Tomas Rigaux, Jan 18 2020
STATUS
approved