login
A341693
Numbers k whose sum of digits divides sigma(k)-k.
0
1, 6, 10, 14, 20, 24, 26, 30, 38, 42, 44, 60, 78, 90, 100, 102, 106, 110, 112, 114, 120, 121, 132, 150, 153, 176, 182, 190, 198, 202, 204, 210, 220, 222, 224, 240, 244, 258, 260, 264, 268, 270, 272, 280, 285, 294, 298, 306, 312, 314, 330, 332, 334, 360, 361, 393, 395
OFFSET
1,2
EXAMPLE
k=10 -> sigma(k)=1+2+5+10=18 sum_digits(k)=1+0=1 -> 18/1 = 18.
k=42 -> sigma(k)=1+2+3+6+7+14+21+42=96 sum_digits(k)=4+2=6 -> 96/6 = 16.
MAPLE
isA341693 := proc(n)
if modp(numtheory[sigma](n)-n, digsum(n)) =0 then
true;
else
false;
end if
end proc:
for n from 1 to 395 do
if isA341693(n) then
printf("%d, ", n) ;
end if;
end do: # R. J. Mathar, Jun 04 2021
MATHEMATICA
Select[Range[400], Divisible[DivisorSigma[1, #] - #, Plus @@ IntegerDigits[#]] &] (* Amiram Eldar, May 24 2021 *)
PROG
(PARI)
list(nn) = for(n=1, nn, if ((sigma(n)-n) % sumdigits(n) == 0, print1(n, ", ")))
list(1000)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Zdenek Cervenka, May 24 2021
STATUS
approved