A109657 Numbers n such that the sum of the digits of Sum_{k=1..n} (k!) is divisible by n.
1, 3, 6, 9, 12, 18, 54, 117, 272, 294, 296, 320, 783, 1125, 2088, 3375, 16164, 16407, 26286, 26777, 26784, 27516, 27568, 45945, 74970, 124236, 125589, 208116, 348705, 583746, 586218, 586353, 586368, 586536, 588567, 2712944, 2714655, 2714912, 2720288, 2720399
Offset: 1
Examples
6 is a member of the sequence since Sum_{k=1..6}(k!) = 1! + 2! + 3! + 4! + 5! + 6! = 1 + 2 + 6 + 24 + 120 + 720 = 873 which has a digit sum of 18 that is divisible by 6.
Links
- Kevin P. Thompson, Table of n, a(n) for n = 1..42
Programs
-
Mathematica
s = 0; Do[s += n!; k = Plus @@ IntegerDigits[s]; If[Mod[k, n] == 0, Print[n]], {n, 1, 10000}] Module[{nn=2721000,sf},sf=Total[IntegerDigits[#]]&/@Accumulate[Range[nn]!];Select[ Thread[ {Range[nn],sf}],Mod[#[[2]],#[[1]]]==0&]][[;;,1]] (* Harvey P. Dale, Apr 16 2023 *)
Extensions
More terms from Jon E. Schoenfield, Jun 16 2010
a(26)-a(40) from Kevin P. Thompson, Nov 28 2021
Comments