|
|
A052020
|
|
Sum of digits of k is a prime proper factor of k.
|
|
7
|
|
|
12, 20, 21, 30, 50, 70, 102, 110, 111, 120, 133, 140, 200, 201, 209, 210, 230, 247, 300, 308, 320, 322, 364, 407, 410, 476, 481, 500, 506, 511, 605, 629, 700, 704, 715, 782, 803, 832, 874, 902, 935, 1002, 1010, 1011, 1015, 1020, 1040, 1066, 1088, 1100, 1101
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
For each prime p there are infinitely many terms with sum of digits p. - Robert Israel, Feb 26 2017
|
|
LINKS
|
|
|
MAPLE
|
filter:= proc(n) local s;
s:= convert(convert(n, base, 10), `+`);
isprime(s) and (n mod s = 0)
end proc:
|
|
PROG
|
(Python)
from sympy import isprime
def ok(n):
sd = sum(map(int, str(n)))
return 1 < sd < n and n%sd == 0 and isprime(sd)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|