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