|
|
A165209
|
|
Numbers whose digital sum is divisible by the digital sum of its divisors.
|
|
1
|
|
|
1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 13, 17, 19, 22, 23, 26, 27, 29, 31, 33, 37, 39, 41, 43, 44, 46, 47, 53, 55, 59, 61, 62, 66, 67, 69, 71, 73, 77, 79, 81, 82, 83, 86, 88, 89, 93, 97, 99, 101, 103, 107, 109, 113, 121, 127, 131, 137, 139, 143, 149, 151, 157, 163, 167, 169, 173
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
All primes are terms of this sequence.
Nonprime terms begin 1, 4, 6, 8, 9, 22, 26, 27, ...
This sequence deviates from A072227; they first differ at n=40: a(40) = 81 while A072227(40) = 82. Each of the first 65 terms of A072227 is a term of this sequence. Sequence of different terms: 81, ..., ?
|
|
LINKS
|
|
|
EXAMPLE
|
a(40) = 81, the divisors of 81 are 1, 3, 9, 27, 81, with digital sums 1, 3, 9, 9, 9 which all divide the digital sum of 81, i.e., 9.
|
|
MATHEMATICA
|
dsdQ[n_]:=Module[{dsn=Total[IntegerDigits[n]], dsd=Total[ IntegerDigits[ #]]&/@ Divisors[n]}, And@@Divisible[dsn, dsd]]; Select[Range[200], dsdQ] (* Harvey P. Dale, Aug 11 2014 *)
|
|
PROG
|
(PARI) dsum(n)=my(s); while(n, s+=n%10; n\=10); s
(Python)
from sympy import divisors
def ds(n): return sum(map(int, str(n)))
def ok(n):
dsn = ds(n)
return all(dsn%ds(d) == 0 for d in divisors(n, generator=True))
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|