A383746 Numbers k such that k divides the sum of the digits of k^(3k).
Examples
2 is a term since the sum of digits of 2^(3*2) is 64, which is divisible by 2. 3 is a term since the sum of digits of 3^(3*3) is 19683, which is divisible by 3. 1098 is a term since the sum of digits of 1098^(3*1098) is 45018, which is divisible by 1098.
Programs
-
Mathematica
Do[If[Mod[Plus @@ IntegerDigits[n^(3*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**(3*n))))%n == 0 print([k for k in range(1100) if ok(k)]) # Michael S. Branicky, May 08 2025
Comments