A108859 Numbers k such that k divides the sum of the digits of k^(2k).
1, 3, 5, 9, 18, 63, 72, 74, 104, 111, 116, 117, 565, 621, 734, 1242, 1620, 4596, 4728, 5823, 5956, 21135, 28251, 46530, 46908, 78257, 129619, 277407, 463689, 464706, 599119
Offset: 1
Examples
734 is a term because the sum of the digits of 734^(2*734), 19084, is divisible by 734.
Crossrefs
Cf. A062206.
Programs
-
Mathematica
Do[If[Mod[Plus @@ IntegerDigits[n^(2*n)], n] == 0, Print[n]], {n, 1, 10000}]
-
Python
from gmpy2 import digits, mpz def ok(n): return n and sum(map(mpz, digits(n**(2*n))))%n == 0 print([k for k in range(2000) if ok(k)]) # Michael S. Branicky, May 08 2025
Extensions
a(22)-a(28) from Lars Blomberg, Jul 12 2011
a(29)-a(31) from Michael S. Branicky, May 13 2025
Comments