login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 60th year, we have over 367,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Other ways to Give
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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:
select(filter, [$10..10^4]); # Robert Israel, Feb 26 2017
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)
print([k for k in range(1102) if ok(k)]) # Michael S. Branicky, Dec 20 2021
CROSSREFS
Sequence in context: A171795 A170806 A038528 * A075078 A050421 A307517
KEYWORD
nonn,base,easy
AUTHOR
Patrick De Geest, Nov 15 1999
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified December 8 14:30 EST 2023. Contains 367679 sequences. (Running on oeis4.)