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.

Previous Showing 11-20 of 23 results. Next

A116988 Sum of digits of (10^n)!.

Original entry on oeis.org

1, 27, 648, 10539, 149346, 1938780, 23903442, 284222502, 3292100235, 37420852599
Offset: 0

Views

Author

Zak Seidov, Apr 02 2006

Keywords

Comments

Cf. A004152 Sum of digits of factorial numbers, A113364 1,27,648,16245,... with first three terms coinciding with this SEQ.

Examples

			a(1)=27 because 10!=3628800 and 3+6+2+8+8+0+0=27.
		

Crossrefs

Programs

  • Mathematica
    Do[Print[Total[IntegerDigits[(10^n)! ]]], {n, 0, 7}]
  • Python
    from math import factorial
    def A116988(n):
        return sum(int(d) for d in str(factorial(10**n))) # Chai Wah Wu, May 21 2018

Extensions

One more term from Ryan Propper, Jun 27 2007
a(9) from Chai Wah Wu, May 21 2018

A127554 Sum of the digits of left factorial !n.

Original entry on oeis.org

0, 1, 2, 4, 1, 7, 10, 19, 19, 19, 19, 28, 37, 37, 55, 55, 37, 46, 46, 73, 73, 64, 82, 100, 100, 118, 109, 100, 127, 127, 145, 118, 163, 145, 154, 172, 172, 154, 181, 181, 199, 172, 226, 208, 253, 226, 262, 262, 253, 271, 235, 271, 262, 280, 325, 325, 307, 343, 334
Offset: 0

Views

Author

Keywords

Examples

			!5 = 0!+1!+2!+3!+4! = 1+1+2+6+24 = 34 --> 3+4=7.
		

Crossrefs

Programs

  • Maple
    P:=proc(n) local a,i,k,w; a:=0; for i from 1 by 1 to n do w:=0;k:=(i-1)!+a; a:=k; while k>0 do w:=w+k-(trunc(k/10)*10); k:=trunc(k/10); od; print(w); od; end: P(100);
  • Mathematica
    Array[Total[IntegerDigits[Total[Range[0,#-1]!]]]&,59,0] (* James C. McMahon, Jan 01 2025 *)

Formula

a(n) = A007953(A003422(n)). - R. J. Mathar, Apr 22 2007

A202708 Sum of digits of n! divided by 9.

Original entry on oeis.org

1, 1, 1, 3, 3, 4, 3, 3, 5, 5, 7, 7, 6, 5, 6, 7, 8, 11, 9, 8, 9, 12, 10, 14, 13, 15, 12, 16, 16, 16, 19, 17, 12, 21, 21, 16, 21, 20, 24, 23, 24, 25, 26, 25, 24, 22, 31, 31, 29, 31, 37, 30, 32, 36, 32, 35, 34, 37, 36, 39, 39, 41, 38, 39, 51, 47, 48, 35, 42, 48
Offset: 6

Views

Author

Michel Lagneau, Dec 23 2011

Keywords

Comments

(sum of digits of n!) / 9 is an integer for n > 5.

Crossrefs

Programs

  • Mathematica
    Table[Sum[DigitCount[n!][[i]]*i/9, {i, 1, 9}], {n, 6, 100}]
    Total[IntegerDigits[#]]/9&/@(Range[6,80]!) (* Harvey P. Dale, Nov 22 2023 *)
  • PARI
    a(n) = sumdigits(n!)/9; \\ Michel Marcus, Aug 12 2022

Formula

a(n) = A004152(n)/9.

A229024 a(n) is the minimum distance to n! for the sum-of-digits of any factorial.

Original entry on oeis.org

0, 0, 0, 3, 3, 9, 27, 18, 0, 0, 9, 9, 0
Offset: 1

Views

Author

Hans Havermann, Sep 11 2013

Keywords

Comments

One could talk of signed integers here: 0, 0, 0, +3, -3, +9, +27, -18, 0, 0, +9, +9, depending on whether the minimum sum-of-digits finds itself above (plus) or below (minus) n!. The problem with so doing is that there might exist some n for which a nonzero minimum distance is both plus and minus.
Zeros indicate where there are solutions in A228311.
List of solutions:
1! 0 (0, 1)
2! 0 (2)
3! 0 (3, 4)
4! +3 (9, 10, 12, 13)
5! -3 (30)
6! +9 (116)
7! +27 (541, 554)
8! -18 (3154, 3186, 3219)
9! 0 (21966)
10! 0 (176755)
11! +9 (1607130)
12! +9 (16305323)
13! 0 (182624820)

Examples

			The minimum distance to 4! is 3, given by the sum of digits for 9!, 10!, 12!, or 13!.
The minimum distance to 5! is also 3, given by the sum of digits of 30!.
		

Crossrefs

Extensions

a(13) from Hans Havermann, Nov 04 2013

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

A228311 Numbers k such that the sum of digits of k! is itself a factorial.

Original entry on oeis.org

0, 1, 2, 3, 4, 21966, 176755, 182624820
Offset: 1

Views

Author

Keywords

Comments

The sum of digits of k! is approximately (9/2)*(d-z), where d=A034886(k) is the number of digits of k!, which is about (log(k/E)*k + log(2*k*Pi)/2)/log(10), and z=A027868(k) is the number of trailing zeros of k!, which is Sum_{j>=1} floor(k/5^j). - Giovanni Resta, Aug 28 2013
a(9) > 2.235*10^9. - Hans Havermann, May 16 2014
k! has ~ k log_10(k) digits, so its digit sum is typically close to C*k*log_10(k) for some constant C. A random number around j has probability something like log(j)/(j log log(j)) of being a factorial, so the probability that the digit sum of k! is a factorial should be something like const/(k log log k). The sum of this diverges, so we should expect infinitely many terms in the sequence. - Robert Israel, Aug 08 2014

Examples

			The sum of the digits of 21966! is 362880 = 9!.
The sum of the digits of 176755! is 3628800 = 10!.
The sum of the digits of 182624820! is 6227020800 = 13!.
		

Crossrefs

Programs

  • Mathematica
    lst = {0}; k = p = 1; fctl = Range@ 15!; While[k < 180000, p = p*k; While[ Mod[p, 10] == 0, p /= 10]; If[ MemberQ[ fctl, Plus @@ IntegerDigits@ p], Print[k]; AppendTo[lst, k]]; k++]; lst (* Robert G. Wilson v, Feb 18 2014 *)
    With[{fcts=Range[20]!},Select[Range[0,22000],MemberQ[fcts,Total[IntegerDigits[#!]]]&]] (* Harvey P. Dale, Jan 06 2024 *)
  • PARI
    lpf(n)=my(f=factor(n)[,1]); f[1]
    factorial_lval(n, p)={
        my(s);
        while(n\=p, s+=n);
        s
    };
    isfactorial(n)={
        if(n<3, return(n>0));
        my(v2=valuation(n,2),mn=v2+1,mx=mn+log(v2+1.5)\log(2),t,c);
        while (mx - mn > 1,
            t = mn + (mx - mn)\2;
            c = factorial_lval(t, 2);
            if (c < v2,
                mn = t+1
            ,
                if (c > v2,
                    mx = t-1
                ,
                    mx = bitor(t,1);
                    mn = max(mn, mx-1)
                )
            )
        );
        if (mn < mx,
            my(p=lpf(mx));
            t = valuation(n, p);
            c = factorial_lval(mx, p);
            if (t > c,return(0));
            if (t == c,
                mn = mx
            )
        );
        n==mn!
    };
    is(n)=isfactorial(sumdigits(n!))

Extensions

a(8) from Hans Havermann, Mar 24 2014

A304335 Sum of digits of (2*n-1)!!.

Original entry on oeis.org

1, 1, 3, 6, 6, 18, 18, 18, 18, 36, 45, 45, 36, 63, 72, 72, 90, 90, 108, 108, 126, 108, 144, 144, 135, 144, 153, 180, 180, 171, 180, 198, 198, 189, 216, 243, 243, 234, 252, 225, 243, 261, 252, 297, 306, 333, 360, 324, 342, 342, 315, 360, 369, 378, 396, 387, 387, 414
Offset: 0

Views

Author

Seiichi Manyama, May 11 2018

Keywords

Crossrefs

Programs

  • Maple
    a:= n-> add(i, i=convert(doublefactorial(2*n-1), base, 10)):
    seq(a(n), n=0..60);  # Alois P. Heinz, May 11 2018
  • PARI
    {a(n) = sumdigits((2*n)!/(n!*2^n))}

Formula

a(n) = A007953(A001147(n)).

A349403 Sum of the digits of Sum_{k=1..n} k!.

Original entry on oeis.org

0, 1, 3, 9, 6, 9, 18, 18, 18, 18, 27, 36, 36, 54, 54, 36, 45, 45, 72, 72, 63, 81, 99, 99, 117, 108, 99, 126, 126, 144, 117, 162, 144, 153, 171, 171, 153, 180, 180, 198, 171, 225, 207, 252, 225, 261, 261, 252, 270, 234, 270, 261, 279, 324, 324, 306, 342, 333, 333, 297, 351, 360, 351, 333, 387, 405, 369
Offset: 0

Views

Author

Seiichi Manyama, Nov 15 2021

Keywords

Comments

If n > 4, then 9 divides a(n).

Examples

			   n |  A007489 | A003422 | a(n) | A127554 |
-----+----------+---------+------+---------+
   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 |
		

Crossrefs

Programs

  • Mathematica
    Table[Total[IntegerDigits[Sum[k!,{k,n}]]],{n,0,66}] (* Stefano Spezia, Nov 16 2021 *)
  • PARI
    a(n) = sumdigits(sum(k=1, n, k!));

Formula

a(n) = A007953(A007489(n)).
a(n) = A127554(n+1) - 1 for n > 3.

A202706 Numbers k such that (sum of digits of k!) / 9 is prime.

Original entry on oeis.org

9, 10, 12, 13, 14, 15, 16, 17, 19, 21, 23, 30, 36, 37, 45, 52, 53, 54, 55, 56, 63, 67, 71, 78, 82, 84, 88, 89, 94, 98, 101, 106, 109, 110, 124, 126, 127, 131, 132, 137, 139, 141, 144, 146, 170, 175, 195, 199, 224, 255, 263, 267, 270, 271, 276, 277, 278, 281
Offset: 1

Views

Author

Michel Lagneau, Dec 23 2011

Keywords

Comments

Numbers k such that A004152(k)/9 is prime.
If k > 5, then (sum of digits of k!) / 9 is an integer (see A004152).

Examples

			10 is in the sequence because 10!= 3628800 and (3+6+2+8+8)/9 = 27/9 = 3 is prime.
		

Crossrefs

Programs

  • Mathematica
    lst={}; Do[If[PrimeQ[Sum[DigitCount[n!][[i]]*i/9,{i,1,9}]], AppendTo[lst, n]], {n, 300}]; lst

A242538 Squares that are sum of digits of factorials.

Original entry on oeis.org

1, 9, 36, 81, 144, 225, 324, 441, 729, 1089, 1296, 2025, 2304, 2601, 2916, 3249, 3600, 3969, 4356, 4761, 6561, 7056, 7569, 8100, 8649, 9216, 9801, 10404, 11025, 11664, 12996, 13689, 15129, 16641, 17424, 20736, 22500, 23409, 26244, 29241
Offset: 1

Views

Author

Carmine Suriano, May 17 2014

Keywords

Comments

Intersection of A000290 and A004152.

Examples

			a(5)=144 for 33!=8683317618811886495518194401280000000 whose sum of digits is 144=12^2. a(5) is also originated from 34! and 35!.
		

Crossrefs

Cf. A066235.

Programs

  • Mathematica
    Union[Select[Total[IntegerDigits[#]]&/@(Range[2500]!),IntegerQ[Sqrt[#]]&]] (* Harvey P. Dale, Feb 20 2015 *)
  • PARI
    lista(nn) = {v = vector(nn, n, sumdigits(n!)); Set(select(x->issquare(x), v));} \\ Michel Marcus, May 18 2014
Previous Showing 11-20 of 23 results. Next