OFFSET
1,2
COMMENTS
Most, but not all, of the terms in this sequence are divisible by 3; is this a coincidence?
In general, terms should be more likely to occur in regions where the number of digits in the sum of the first n factorials is close to an integer multiple of 2*n/9. This happens, e.g., around n = 268, 449, 752, 1257, 2100, 3506, 5851, 9763, 16290, 27177, 45337, 75631, 126165, etc. - Jon E. Schoenfield, Jun 16 2010
Numbers n such that A349403(n) (mod n) == 0. - Kevin P. Thompson, Nov 28 2021
a(43) > 5570000. - Kevin P. Thompson, Nov 28 2021
LINKS
Kevin P. Thompson, Table of n, a(n) for n = 1..42
EXAMPLE
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.
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 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Ryan Propper, Aug 06 2005
EXTENSIONS
More terms from Jon E. Schoenfield, Jun 16 2010
a(26)-a(40) from Kevin P. Thompson, Nov 28 2021
STATUS
approved