The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
The OEIS is supported by the many generous donors to the OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A348317 a(n) = A348150(n) - A002275(n) where A002275(n) = R_n is the repunit with n times digit 1. 4
 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 n-digit number not containing the digit 0 and the smallest n-digit Niven number not containing the digit 0. For more informations and links, see A348150. a(n) = 0 iff n is in A014950. LINKS Michael S. Branicky, Table of n, a(n) for n = 1..10000 FORMULA a(n) = A348150(n) - A002275(n). EXAMPLE A348150(4) = 1116 since it is the smallest 4-digit 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) print([a(n) for n in range(1, 73)]) # Michael S. Branicky, Oct 12 2021 (PARI) a(n) = my(r=(10^n-1)/9); for(k=r, 10^n-1, if (vecmin(digits(k)) && !(k % sumdigits(k)), return (k-r))); \\ Michel Marcus, Oct 13 2021 CROSSREFS Cf. A002275, A005349, A014950, A217973, A348150. Sequence in context: A201526 A091384 A011305 * A254378 A134568 A198798 Adjacent sequences: A348314 A348315 A348316 * A348318 A348319 A348320 KEYWORD nonn,base AUTHOR Bernard Schott, Oct 12 2021 EXTENSIONS a(23) and beyond from Michael S. Branicky, Oct 12 2021 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified May 22 21:38 EDT 2024. Contains 372758 sequences. (Running on oeis4.)