A109663 Numbers k such that the sum of the digits of (k^k + k!) is divisible by k.
1, 2, 3, 9, 15, 18, 27, 36, 51, 81, 93, 169, 181, 348, 444, 504, 528, 1881, 2031, 9843, 16479, 16685, 45435, 129056, 138510, 214008, 358326
Offset: 1
Examples
The digits of 1881^1881 + 1881! sum to 28215 and 28215 is divisible by 1881, so 1881 is in the sequence.
Programs
-
Mathematica
Do[s = n^n + n!; k = Plus @@ IntegerDigits[s]; If[Mod[k, n] == 0, Print[n]], {n, 1, 10000}] Select[Range[360000],Divisible[Total[IntegerDigits[#^#+#!]],#]&] (* Harvey P. Dale, Dec 27 2018 *)
Extensions
a(21)-a(27) from Lars Blomberg, Jul 05 2011
Comments