OFFSET
1,2
COMMENTS
A base 16 version of Harshad (or Niven) numbers (A005349).
Numbers n such that n = 0 modulo A053836(n). - Antti Karttunen, Aug 22 2014
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..10000
EXAMPLE
82478 is in the sequence as it is 1422E in hexadecimal and 1+4+2+2+14 = 23 which divides 82478.
MATHEMATICA
Select[Range[200], Divisible[#, Total@ IntegerDigits[#, 16]] &] (* Indranil Ghosh, Jun 12 2017 *)
PROG
(Python)
from gmpy2 import digits
A241989 = [n for n in range(1, 10**3) if not n % sum([int(d, 16) for d in digits(n, 16)])]
(MIT/GNU Scheme, with Antti Karttunen's IntSeq-library)
(define (A053836 n) (let loop ((n n) (i 0)) (if (zero? n) i (loop (floor->exact (/ n 16)) (+ i (modulo n 16))))))
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Chai Wah Wu, Aug 22 2014
STATUS
approved