cp's OEIS Frontend

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.

Showing 1-1 of 1 results.

A301861 a(n) is the sum of the decimal digits of (n!)!.

Original entry on oeis.org

1, 1, 2, 9, 81, 783, 7164, 69048, 711009, 7961040, 95935761, 1242436185, 17235507996
Offset: 0

Views

Author

Jon E. Schoenfield, Mar 28 2018

Keywords

Comments

Presumably, lim_{n->oo} a(n)/A008906(n!) = 9/2.

Examples

			a(0) = digitsum((0!)!) = digitsum(1!) = digitsum(1) = 1.
a(1) = digitsum((1!)!) = digitsum(1!) = digitsum(1) = 1.
a(2) = digitsum((2!)!) = digitsum(2!) = digitsum(2) = 2.
a(3) = digitsum((3!)!) = digitsum(6!) = digitsum(720) = 7+2 = 9.
a(4) = digitsum((4!)!) = digitsum(24!) = digitsum(620448401733239439360000) = 6+2+0+4+4+8+4+0+1+7+3+3+2+3+9+4+3+9+3+6+0+0+0+0 = 81.
		

Crossrefs

Cf. A000142 (factorial numbers), A000197 ((n!)!), A004152 (sum of digits of n!), A007953 (sum of digits of n), A008906 (number of digits in n! excluding trailing zeros), A027868 (number of trailing zeros in n!), A034886 (number of digits in n!), A063979 (number of digits in (n!)!).

Programs

  • Magma
    [&+Intseq(Factorial(Factorial(n))): n in [0..10]]; // Vincenzo Librandi, Mar 29 2018
    
  • Maple
    a:= n-> add(i, i=convert(n!!, base, 10)):
    seq(a(n), n=0..8);  # Alois P. Heinz, Oct 27 2021
  • Mathematica
    Table[Plus@@IntegerDigits[(n!)!], {n, 0, 10}] (* Vincenzo Librandi, Mar 29 2018 *)
  • PARI
    a(n) = sumdigits(n!!); \\ Michel Marcus, Mar 28 2018
    
  • Python
    from math import factorial
    def A301861(n):
        return sum(int(d) for d in str(factorial(factorial(n)))) # Chai Wah Wu, Mar 31 2018
    # faster program for larger values of n
    from gmpy2 import mpz, digits, fac
    def A301861(n): return int(sum(mpz(d) for d in digits(fac(fac(n))))) # Chai Wah Wu, Oct 24 2021

Formula

a(n) = A007953(A000197(n)). - Michel Marcus, Mar 28 2018
a(n) = A004152(A000142(n)). - Altug Alkan, Mar 28 2018

Extensions

a(11) from Chai Wah Wu, Mar 31 2018
a(12) from Chai Wah Wu, Apr 01 2018
Showing 1-1 of 1 results.