



0, 1, 0, 5, 1, 3, 1, 1, 0, 14, 1, 15, 5, 3, 3, 11, 1, 21, 8, 10, 6, 5, 1, 3, 2, 12, 0, 17, 25, 14, 5, 13, 6, 74, 1, 54, 41, 12, 8, 14, 4, 105, 41, 55, 63, 33, 25, 13, 5, 103, 3, 33, 40, 63, 3, 52, 15, 23, 40, 21, 20, 10, 21, 11, 25, 33, 41, 47, 45, 14, 1, 171
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,4


COMMENTS

a(n) measures the gap between the smallest ndigit number not containing the digit 0 and the smallest ndigit Niven number not containing the digit 0.
For more informations and links, see A348150.


LINKS



FORMULA



EXAMPLE

A348150(4) = 1116 since it is the smallest 4digit integer not containing the digit 0 that is divisible by the sum of its digits:1116 = (1+1+1+6) * 124; A002275(4) = R_4 = 1111, hence a(4) = 1116  1111 = 5.


MATHEMATICA

hQ[n_] := ! MemberQ[(d = IntegerDigits[n]), 0] && Divisible[n, Plus @@ d]; a[n_] := Module[{m= (10^n  1)/9, k=0}, While[! hQ[m+k], k++]; k]; Array[a, 30] (* Amiram Eldar, Oct 13 2021 *)


PROG

(Python)
def a(n):
s, k = "1"*n, int("1"*n)
while '0' in s or k%sum(map(int, s)): k += 1; s = str(k)
return k  int("1"*n)
(PARI) a(n) = my(r=(10^n1)/9); for(k=r, 10^n1, if (vecmin(digits(k)) && !(k % sumdigits(k)), return (kr))); \\ Michel Marcus, Oct 13 2021


CROSSREFS



KEYWORD

nonn,base


AUTHOR



EXTENSIONS



STATUS

approved



