|
|
A217973
|
|
Niven (or Harshad) numbers not containing the digit 0.
|
|
6
|
|
|
1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 18, 21, 24, 27, 36, 42, 45, 48, 54, 63, 72, 81, 84, 111, 112, 114, 117, 126, 132, 133, 135, 144, 152, 153, 156, 162, 171, 192, 195, 198, 216, 222, 224, 225, 228, 234, 243, 247, 252, 261, 264, 266, 285, 288, 312, 315, 322, 324, 333, 336
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
Andreescu & Andrica prove that this sequence is infinite.
For each positive integer n, there exists a n-digit Niven (or Harshad) number not containing the digit 0 (see A348318 for more explanations and links). - Bernard Schott, Oct 20 2021
|
|
REFERENCES
|
Titu Andreescu and Dorin Andrica, Number Theory, Structures, Examples, and Problems, Problem 5.2.3 on pages 109-110.
|
|
LINKS
|
|
|
MAPLE
|
filter:= proc(n) local L;
L:= convert(n, base, 10);
not has(L, 0) and n mod convert(L, `+`) = 0
end proc:
|
|
MATHEMATICA
|
Select[Range[400], IntegerQ[ #/(Plus @@ IntegerDigits[#])] && DigitCount[#, 10, 0] == 0 &] (* Alonso del Arte, Oct 16 2012 *)
|
|
PROG
|
(PARI) is(n)=vecsort(digits(n))[1]&&n%sumdigits(n)==0
(Python)
def ok(n): s = str(n); return '0' not in s and n%sum(map(int, s)) == 0
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|