login
A357937
a(n) is the least multiple of n that is not a Niven (or Harshad) number.
2
11, 14, 15, 16, 15, 66, 14, 16, 99, 130, 11, 96, 13, 14, 15, 16, 17, 2898, 19, 160, 105, 22, 23, 96, 25, 26, 189, 28, 29, 390, 31, 32, 33, 34, 35, 2988, 37, 38, 39, 160, 41, 168, 43, 44, 495, 46, 47, 96, 49, 250, 51, 52, 53, 28998, 55, 56, 57, 58, 59, 4980, 61
OFFSET
1,1
COMMENTS
Niven (or Harshad) numbers are divisible by the sum of their digits, and correspond to sequence A005349.
FORMULA
a(n) = n * A144262(n).
EXAMPLE
For n = 3, we have:
.
k 3*k Niven?
- --- ------
1 3 Yes
2 6 Yes
3 9 Yes
4 12 Yes
5 15 No
so a(3) = 15.
MATHEMATICA
a[n_]:=Module[{k=1}, While[Divisible[k*n, Total[IntegerDigits[k*n]]], k++]; k*n]; Array[a, 61]
PROG
(PARI) a(n, base=10) = forstep (m=n, oo, n, if (m%sumdigits(m, base), return (m)))
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Oct 21 2022
STATUS
approved