This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A052020 #19 May 18 2024 14:45:36 %S A052020 12,20,21,30,50,70,102,110,111,120,133,140,200,201,209,210,230,247, %T A052020 300,308,320,322,364,407,410,476,481,500,506,511,605,629,700,704,715, %U A052020 782,803,832,874,902,935,1002,1010,1011,1015,1020,1040,1066,1088,1100,1101 %N A052020 Sum of digits of k is a prime proper factor of k. %C A052020 For each prime p there are infinitely many terms with sum of digits p. - _Robert Israel_, Feb 26 2017 %H A052020 Robert Israel, <a href="/A052020/b052020.txt">Table of n, a(n) for n = 1..10000</a> %p A052020 filter:= proc(n) local s; %p A052020 s:= convert(convert(n,base,10),`+`); %p A052020 isprime(s) and (n mod s = 0) %p A052020 end proc: %p A052020 select(filter, [$10..10^4]); # _Robert Israel_, Feb 26 2017 %t A052020 Select[Range[0, 2000], With[{s = DigitSum[#]}, s < # && Divisible[#, s] && PrimeQ[s]] &] (* _Paolo Xausa_, May 18 2024 *) %o A052020 (Python) %o A052020 from sympy import isprime %o A052020 def ok(n): %o A052020 sd = sum(map(int, str(n))) %o A052020 return 1 < sd < n and n%sd == 0 and isprime(sd) %o A052020 print([k for k in range(1102) if ok(k)]) # _Michael S. Branicky_, Dec 20 2021 %Y A052020 Cf. A052018, A052019, A052021, A052022, A007953, A005349, A028834. %K A052020 nonn,base,easy %O A052020 1,1 %A A052020 _Patrick De Geest_, Nov 15 1999