This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A004152 #86 Aug 26 2024 11:42:56 %S A004152 1,1,2,6,6,3,9,9,9,27,27,36,27,27,45,45,63,63,54,45,54,63,72,99,81,72, %T A004152 81,108,90,126,117,135,108,144,144,144,171,153,108,189,189,144,189, %U A004152 180,216,207,216,225,234,225,216,198,279,279,261,279,333,270,288 %N A004152 Sum of digits of n!. %C A004152 If n > 5, then 9 divides a(n). - _Enrique Pérez Herrero_, Mar 01 2009 %H A004152 Maciej Ireneusz Wilczynski, <a href="/A004152/b004152.txt">Table of n, a(n) for n = 0..10000</a> %H A004152 Florian Luca, <a href="http://math.ca/10.4153/CMB-2002-013-9">The number of non-zero digits of n!</a>, Canad. Math. Bull. 45 (2002), pp. 115-118. %H A004152 Carlo Sanna, <a href="http://arxiv.org/abs/1409.4912">On the sum of digits of the factorial</a>, Journal of Number Theory 147 (February 2015), pp. 836-841. arXiv:1409.4912 [math.NT]. %H A004152 Carlo Sanna, <a href="https://dx.doi.org/10.1016/j.jnt.2014.09.003">On the sum of digits of the factorial</a>, Journal of Number Theory 147 (February 2015), pp. 836-841. %F A004152 Luca shows that a(n) >> log n. In particular, a(n) > log_10 n - log_10 log_10 n. - _Charles R Greathouse IV_, Dec 27 2011 %F A004152 a(n) < floor(log_10(n)*9/2). - _Carmine Suriano_, Feb 20 2013 %F A004152 a(n) = A007953(A000142(n)). - _Michel Marcus_, Sep 18 2014 %F A004152 a(n) < 9*(A034886(n) - A027868(n)). - _Enrique Pérez Herrero_, Nov 16 2014 %F A004152 Sanna improved Luca's result to a(n) >> log n log log log n. - _Charles R Greathouse IV_, Jan 30 2015 %F A004152 a(n) = 9*A202708(n), n>=6. - _R. J. Mathar_, Jul 30 2021 %e A004152 a(5) = 3 because 5! = 120 and 1 + 2 + 0 = 3. %e A004152 a(6) = 9 because 6! = 720 and 7 + 2 + 0 = 9. %p A004152 seq(convert(convert(n!,base,10),`+`),n=0..100); # _Robert Israel_, Nov 13 2014 %t A004152 Table[ Plus @@ IntegerDigits[n!], {n, 0, 100}] (* _Enrique Pérez Herrero_, Mar 01 2009 *) %o A004152 (PARI) a(n)=my(v=eval(Vec(Str(n!))));sum(i=1,#v,v[i]) \\ _Charles R Greathouse IV_, Dec 27 2011 %o A004152 (PARI) a(n) = sumdigits(n!); \\ _Michel Marcus_, Sep 18 2014 %o A004152 (Magma) [&+Intseq(Factorial(n)): n in [0..70]]; // _Vincenzo Librandi_, Jan 30 2015 %Y A004152 Cf. A000142 (factorial), A007953 (sum of digits), A079584 (same in base 2), A086358 (digital root of n!). %Y A004152 Cf. A066419 (k such that a(k) does not divide k!). %K A004152 nonn,base %O A004152 0,3 %A A004152 _N. J. A. Sloane_