OFFSET
0,3
COMMENTS
If n > 4, then 9 divides a(n).
EXAMPLE
-----+----------+---------+------+---------+
0 | 0 | 0 | 0 | 0 |
1 | 1 | 1 | 1 | 1 |
2 | 3 | 2 | 3 | 2 |
3 | 9 | 4 | 9 | 4 |
4 | 33 | 10 | 6 | 1 |
5 | 153 | 34 | 9 | 7 |
6 | 873 | 154 | 18 | 10 |
7 | 5913 | 874 | 18 | 19 |
8 | 46233 | 5914 | 18 | 19 |
9 | 409113 | 46234 | 18 | 19 |
10 | 4037913 | 409114 | 27 | 19 |
11 | 43954713 | 4037914 | 36 | 28 |
MATHEMATICA
Table[Total[IntegerDigits[Sum[k!, {k, n}]]], {n, 0, 66}] (* Stefano Spezia, Nov 16 2021 *)
PROG
(PARI) a(n) = sumdigits(sum(k=1, n, k!));
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Seiichi Manyama, Nov 15 2021
STATUS
approved