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 21-30 of 46 results. Next

A058814 Numbers k such that k divides the number of digits of k!.

Original entry on oeis.org

1, 22, 23, 24, 266, 267, 268, 2712, 2713, 27175, 27176, 271819, 271820, 271821, 2718272, 2718273, 27182807, 27182808, 271828170, 271828171, 271828172
Offset: 1

Views

Author

Robert G. Wilson v, Jan 03 2001

Keywords

Comments

For k = 1, 22, 23 and 24 only, the number of digits in k! is equal to k. - Bernard Schott, Feb 02 2013
I employed R. Wm. Gosper's approximation (A090583). - Robert G. Wilson v, Feb 04 2013
For large m, 10^m*C -> 10^m*e, where e is Euler's or Napier's constant (A001113). Conjecture: There exist at least two contiguous terms for each k > 0, sometimes three contiguous terms, but never four. - Robert G. Wilson v, Feb 04 2013

Examples

			23! = 25852016738884976640000 has 23 digits.
		

References

  • Gardner, M. "Factorial Oddities." Ch. 4 in Mathematical Magic Show: More Puzzles, Games, Diversions, Illusions and Other Mathematical Sleight-of-Mind from Scientific American. New York: Vintage, pp. 50-65, 1978
  • D. Wells, Curious and Interesting Numbers, Penguin Books, 1997, page 78.

Crossrefs

Programs

  • Mathematica
    fQ[n_] := Mod[ Floor[(n*Log[n] - n + Log[(2 n + 1/3) Pi]/2)/Log[10] + 1], n] == 0; k = 1; s = {}; While[k < 1000001, If[ fQ@ k, AppendTo[s, k]; Print[k]]; k++]; s (* Robert G. Wilson v, Feb 04 2013 *)
  • PARI
    A034886(n)= /* Number of digits in n! */;
    { if(n==0, 1, 1 + floor((-n + (2*n+1)*log(n)/2 + 1/2*log(2*Pi))/log(10)) + (n==1)); }
    goA058814(maxsearch)= /* write b-File for A058814 */
    { my(k=0); for(n=1, maxsearch, if(A034886(n)%n==0, k++; print(k" "n);write("b058814.txt",k" "n);));}
    /* Enrique Pérez Herrero, Jun 05 2011 */

A063979 Number of decimal digits in (n!)!; A000197.

Original entry on oeis.org

1, 1, 1, 3, 24, 199, 1747, 16474, 168187, 1859934, 22228104, 286078171, 3949867548, 58284826485, 915905054360, 15276520209206, 269617872744249, 5021159048900643, 98417586560408168, 2025488254833817394, 43675043585825292775, 984729344827900257489, 23172929656443132617906
Offset: 0

Views

Author

Robert G. Wilson v, Sep 05 2001

Keywords

Crossrefs

Programs

  • Magma
    // Using about 100 more digits of precision than needed.
    nMax:=30; SetDefaultRealField(RealField(Ceiling(Log(10,Factorial(nMax))+100))); a:=[]; for n in [0..nMax] do a[n+1]:=1+Floor(LogGamma(Factorial(n)+1)/Log(10)); end for; a; // Jon E. Schoenfield, Aug 07 2015
  • Maple
    seq(length((n)!!), n=0..19); # Zerinvary Lajos, Mar 10 2007
  • Mathematica
    LogBase10Stirling[n_] := Floor[ Log[10, 2 Pi n]/2 + n*Log[10, n/E] + Log[10, 1 + 1/(12n) + 1/(288n^2) - 139/(51840n^3) - 571/(2488320n^4) + 163879/(209018880n^5) + 5246819/(75246796800n^6)]]; (* A001163/A001164; good to at least a(1000) *) LogBase10Stirling[0] = LogBase10Stirling[1] = 0; Table[1 + LogBase10Stirling[n!], {n, 0, 101}] (* Robert G. Wilson v, Aug 05 2015 *)
  • PARI
    \\ Using 100 digits of precision.
     a(n)=localprec(100); my(t=n!);return(floor((t*log(t)-t+1/2*log(2*Pi*t)+1/(12*t))/log(10)+1))\\ Robert Gerbicz, Jul 08 2008
    

Extensions

More terms from Vladeta Jovovic, Sep 06 2001
A correspondent reported that terms a(17) - a(19) shown here were wrong. That's not true, they are correct. The correspondent was using Python, where the default precision was not large enough to calculate these terms correctly. Thanks to Brendan McKay, Max Alekseyev and Robert Gerbicz for confirming the entries. - N. J. A. Sloane, Jul 08 2008
a(20) from Brendan McKay, Jul 08 2008
a(21)-a(22) from Hugo Pfoertner, Nov 25 2023

A333431 Numbers k such that k! has a factorial number of decimal digits.

Original entry on oeis.org

0, 1, 2, 3, 4, 9, 24, 342, 11158, 145435633325318659
Offset: 1

Views

Author

Robert G. Wilson v, Mar 20 2020

Keywords

Comments

From Vaclav Kotesovec, Mar 22 2020: (Start)
a(11) has 1199 digits and a(11)! has 525! digits.
a(12) has 1300 digits and a(12)! has 562! digits.
a(13) has 3733 digits and a(13)! has 1380! digits.
a(14) has 4730 digits and a(14)! has 1693! digits.
a(15), if it exists, must have more than 5732 digits and a(15)! must have more than 2000! digits. (End)

Examples

			9 is in the sequence since 9! = 362880 which has 6 decimal digits and 6 = 3!.
		

Crossrefs

Programs

  • Mathematica
    f = k = 1; lst = {0}; While[k < 12000, f *= k; If[ MemberQ[{1, 2, 6, 24, 120, 720, 5040, 40320, 362880}, IntegerLength@ f], AppendTo[lst, k]]; k++]; lst

Extensions

a(10) from Giovanni Resta, Mar 21 2020
a(11)-a(12) from Vaclav Kotesovec, Mar 21 2020
a(13)-a(14) from Vaclav Kotesovec, Mar 22 2020

A356758 a(n) is the number of nonzero digits in n!.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 2, 2, 3, 5, 5, 6, 5, 6, 9, 9, 10, 11, 11, 12, 12, 13, 14, 18, 18, 17, 19, 20, 20, 24, 24, 27, 26, 29, 28, 32, 32, 32, 29, 35, 39, 35, 39, 40, 43, 44, 42, 49, 48, 49, 46, 49, 50, 53, 54, 56, 58, 57, 62, 62, 63, 58, 66, 67, 70, 71, 70, 73, 72, 78, 81
Offset: 0

Views

Author

Stefano Spezia, Aug 26 2022

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Length[Select[IntegerDigits[n!],Positive]],{n,0,70}]
  • PARI
    a(n) = #select(x->(x>0), digits(n!)); \\ Michel Marcus, Aug 26 2022
    
  • Python
    from math import factorial
    def a(n): return len(str(factorial(n)).replace("0", ""))
    print([a(n) for n in range(71)]) # Michael S. Branicky, Aug 26 2022

Formula

a(n) = A034886(n!) - A027869(n!).

A008906 Number of digits in n! excluding final zeros.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 2, 3, 4, 5, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 15, 16, 18, 19, 20, 20, 21, 23, 24, 25, 26, 27, 29, 30, 32, 33, 34, 36, 37, 39, 39, 41, 43, 44, 46, 47, 48, 50, 52, 53, 53, 55, 56, 58, 60, 61, 62, 64, 66, 68, 68, 70, 72, 74, 76, 76, 78, 80, 82, 84, 85, 86, 88, 90, 92, 92, 94
Offset: 0

Views

Author

Keywords

Comments

From Bernard Schott, Nov 19 2021: (Start)
a(n) < n iff 2 <= n <= 38 or n = 40;
a(n) = n iff n = 1, 39, 41;
a(n) > n iff n = 0 or n >= 42. (End)

Crossrefs

Programs

  • Mathematica
    Array[IntegerLength[#!//.x_/;x~Mod~10==0:>x/10]&,77,0] (* Giorgos Kalogeropoulos, Nov 19 2021 *)
  • Python
    from math import factorial
    def A008906(n): return len(str(factorial(n)).rstrip('0')) # Chai Wah Wu, Oct 24 2021

Formula

a(n) = A034886(n) - A027868(n). - Michel Marcus, Jun 24 2013

A104351 Number of digits in decimal representation of A104350(n).

Original entry on oeis.org

1, 1, 1, 2, 2, 3, 4, 4, 4, 5, 6, 7, 8, 9, 9, 10, 11, 11, 13, 13, 14, 15, 16, 17, 18, 19, 19, 20, 22, 22, 24, 24, 25, 26, 27, 28, 29, 30, 32, 32, 34, 35, 36, 37, 38, 40, 41, 42, 42, 43, 44, 46, 47, 48, 49, 50, 51, 52, 54, 55, 57, 58, 59, 59, 60, 61, 63, 64, 66, 67, 69, 69, 71, 72
Offset: 1

Views

Author

Reinhard Zumkeller, Mar 06 2005

Keywords

Crossrefs

Programs

  • Mathematica
    IntegerLength[FoldList[Times, Array[FactorInteger[#][[-1, 1]] &, 100]]] (* Amiram Eldar, Apr 08 2024 *)
  • PARI
    gpf(n) = {my(p = factor(n)[, 1]); p[#p];}
    a(n) = logint(prod(k = 2, n, gpf(k)), 10) + 1; \\ Amiram Eldar, Apr 08 2024

Formula

a(n) = A055642(A104350(n)).

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

A375348 a(n) is the mode of the digits of n! not counting trailing zeros (using -1 if multimodal).

Original entry on oeis.org

1, 1, 2, 6, -1, -1, -1, -1, -1, 8, 8, 9, 0, 2, -1, -1, 8, -1, 7, -1, -1, -1, 7, 8, 3, 1, 6, 8, -1, -1, 8, 2, 3, 8, 9, -1, 9, -1, 0, 8, 1, -1, -1, 3, 8, 6, -1, 1, 7, 2, 6, -1, 8, 3, -1, 5, 4, 2, -1, 8, 4, 0, 2, 6, -1, 2, 4, 6, 1, 2, 8, 8, 8, 0, 2, 4, -1, 8, 2, 1, 5, 7, 4, -1, 1, 0
Offset: 0

Views

Author

Keywords

Comments

Inspired by A356758.
If we were to count trailing zeros, then would have a(n) = 0 for all n >= 34. Therefore we only consider the decimal digits of A004154(n).
Conjecture: excluding -1, as n -> oo, all digits occur equally often.

Examples

			a(0) = a(1) = 1 because 0! = 1! = 1 and 1 is the only digit present;
a(4) = -1 since 4! = 24 and there are only two digits appearing with the same frequency, 2 and 4.
a(14) = -1 because 14! = 87178291200 and, not counting the two trailing 0's, there are two 1's, two 2's, two 7's, and two 8's.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := If[Length[c=Commonest[IntegerDigits[n! / 10^IntegerExponent[n!]]]] > 1, -1, c[[1]]]; Array[a, 86, 0]
  • Python
    from collections import Counter
    from sympy import factorial
    def A375348(n): return -1 if len(k:=Counter(str(factorial(n)).rstrip('0')).most_common(2)) > 1 and k[0][1]==k[1][1] else int(k[0][0]) # Chai Wah Wu, Sep 15 2024

A066026 a(n) = ceiling(log(n!)).

Original entry on oeis.org

0, 1, 2, 4, 5, 7, 9, 11, 13, 16, 18, 20, 23, 26, 28, 31, 34, 37, 40, 43, 46, 49, 52, 55, 59, 62, 65, 68, 72, 75, 79, 82, 86, 89, 93, 96, 100, 103, 107, 111, 115, 118, 122, 126, 130, 133, 137, 141, 145, 149, 153, 157, 161, 165, 169, 173, 177, 181, 185, 189, 193, 197, 202
Offset: 1

Views

Author

Robert A. Stump (bee_ess107(AT)yahoo.com), Dec 11 2001

Keywords

Crossrefs

Programs

  • Mathematica
    Ceiling[Log[Range[70]!]] (* Harvey P. Dale, Jul 23 2012 *)
  • PARI
    { for (n=1, 1000, a=ceil(log(n!)); write("b066026.txt", n, " ", a) ) } \\ Harry J. Smith, Nov 07 2009
    
  • PARI
    a(n) = ceil(lngamma(n+1)) \\ Michel Marcus, Jun 29 2015

Extensions

Terms a(51)-a(63) from Harry J. Smith, Nov 07 2009

A132826 Decimal expansion of the integer Googol!.

Original entry on oeis.org

1, 6, 2, 9, 4, 0, 4, 3, 3, 2, 4, 5, 9, 3, 3, 7, 3, 7, 3, 4, 1, 7, 9, 3, 4, 6, 5, 2, 9, 8, 3, 5, 4, 2, 1, 7, 2, 8, 2, 1, 8, 8, 8, 4, 2, 6, 7, 1, 4, 8, 6, 6, 2, 3, 0, 3, 6, 2, 3, 6, 1, 1, 9, 3, 6, 9, 4, 0, 9, 2, 2, 0, 2, 9, 4, 5, 2, 5, 0, 4, 6, 8, 6, 6, 7, 9, 8, 5, 4, 4, 7, 0, 8, 4, 2, 2, 3, 1, 7, 8, 9, 2, 2, 8, 1
Offset: 1

Views

Author

Martin Raab, Nov 18 2007, Dec 11 2007

Keywords

Comments

The number in question has 9956570551809674817234887108108339491770560299419 \ 63334338855462168341353507911292252707750506615682568 digits and ends in exactly 10^101/8 - 18 zeros. - Robert G. Wilson v, Jan 09 2013
The last nonzero term of this sequence is 6. - Washington Bomfim, Dec 24 2010

References

  • Ronald L. Graham, Donald E. Knuth and Oren Patashnik, Concrete Math.; section 4, exercises 40, and 54.

Crossrefs

Programs

  • Mathematica
    f[n_] := 10^FractionalPart[N[(n*Log[n] - n + (1/2)*Log[(2*n + 1/3)*Pi])/Log[10], 203]]; RealDigits[ f[10^100], 10, 101][[1]] (* Robert G. Wilson v, Jan 09 2013 *)

Formula

10^100! = 1*2*3*4*...*(10^100-1)*10^100.
Previous Showing 21-30 of 46 results. Next