%I #44 Aug 23 2022 10:09:50
%S 1,2,8,9,10,11,17,18,20,26,27,35,36,39,44,45,48,53,54,57,62,63,66,71,
%T 72,75,80,81,84,90,93,99,100,101,107,108,110,116,117,125,126,129,134,
%U 135,138,143,144,147,152,153,156,161,162,165,170,171,174,180,183,189,192,198,200
%N Numbers whose sum of digits is a refactorable number.
%C Also numbers k such that A007953(k) = c * A000005(A007953(k)); c >= 1 is a positive integer. For c = 1 see A356520.
%e k = 17; A007953(17) = 2 * A000005(A007953(17)), thus k = 17 is in the sequence.
%p filter:= proc(n) local s; s:= convert(convert(n,base,10),`+`); s mod numtheory:-tau(s) = 0 end proc:
%p select(filter, [$1..200]); # _Robert Israel_, Aug 10 2022
%t refQ[n_] := Divisible[n, DivisorSigma[0,n]]; Select[Range[2000], refQ[Plus @@ IntegerDigits[#]] &] (* _Amiram Eldar_, Aug 10 2022 *)
%o (Python)
%o from sympy import divisor_count
%o def ok(n): sd = sum(map(int, str(n))); return sd%divisor_count(sd) == 0
%o print([k for k in range(1, 200) if ok(k)]) # _Michael S. Branicky_, Aug 10 2022
%o (PARI) isok(k) = my(s=sumdigits(k)); denominator(s/numdiv(s)) == 1; \\ _Michel Marcus_, Aug 10 2022
%Y Cf. A000005, A033950, A007953, A306509, A356520.
%K nonn,base,easy
%O 1,2
%A _Ctibor O. Zizka_, Aug 10 2022
|