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

A079691 Number of 6's in n!.

Original entry on oeis.org

0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 2, 0, 2, 1, 1, 2, 0, 2, 3, 2, 0, 4, 3, 2, 3, 3, 2, 5, 3, 4, 7, 2, 3, 5, 2, 3, 6, 5, 6, 5, 8, 4, 7, 6, 6, 9, 5, 8, 7, 3, 9, 6, 7, 4, 6, 8, 6, 6, 11, 6, 8, 8, 11, 6, 4, 11, 11, 10, 6, 5, 9, 8, 9, 8, 11, 10, 8, 11, 12, 13, 9, 11, 7, 12, 15, 15, 17, 8, 11, 16, 11
Offset: 0

Views

Author

Cino Hilliard, Jan 31 2003

Keywords

Crossrefs

Programs

  • Mathematica
    Table[DigitCount[n!,10,6],{n,0,100}] (* Harvey P. Dale, Aug 08 2023 *)

Formula

a(n) = A034886(n) - (A027869(n) + A079680(n) + A079714(n) + A079684(n) + A079688(n) + A079690(n) + A079692(n) + A079693(n) + A079694(n)). - Reinhard Zumkeller, Jan 27 2008

A079693 Number of 8's in n!.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 1, 0, 1, 2, 1, 4, 2, 1, 2, 1, 0, 1, 4, 1, 2, 1, 6, 4, 2, 5, 6, 2, 8, 2, 1, 3, 2, 0, 7, 4, 2, 4, 2, 9, 3, 7, 4, 4, 7, 5, 5, 9, 8, 9, 4, 11, 7, 10, 9, 4, 11, 7, 7, 12, 7, 9, 9, 7, 8, 14, 18, 15, 9, 9, 10, 8, 18, 12, 14, 13, 8, 10, 8, 12, 5, 8, 8, 18, 10, 14, 9, 11, 12, 16
Offset: 0

Views

Author

Cino Hilliard, Jan 31 2003

Keywords

Crossrefs

Programs

  • Mathematica
    Table[DigitCount[n!,10,8],{n,0,100}] (* Harvey P. Dale, May 06 2016 *)

Formula

a(n) = A034886(n) - (A027869(n) + A079680(n) + A079714(n) + A079684(n) + A079688(n) + A079690(n) + A079691(n) + A079692(n) + A079694(n)). - Reinhard Zumkeller, Jan 27 2008

A079694 Number of 9's in n!.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 1, 0, 1, 0, 2, 1, 0, 0, 1, 3, 0, 1, 2, 2, 1, 1, 0, 4, 2, 1, 2, 2, 5, 3, 7, 4, 1, 5, 5, 0, 4, 2, 2, 4, 6, 7, 3, 2, 2, 3, 3, 6, 4, 6, 6, 5, 6, 8, 6, 7, 6, 7, 5, 6, 6, 8, 8, 7, 12, 5, 7, 5, 7, 10, 12, 7, 6, 9, 5, 12, 13, 12, 10, 9, 9, 10, 13, 18, 14, 12, 7, 7, 7, 15, 20, 16
Offset: 0

Views

Author

Cino Hilliard, Jan 31 2003

Keywords

Crossrefs

Programs

  • Mathematica
    DigitCount[#,10,9]&/@(Range[0,100]!) (* Harvey P. Dale, Dec 12 2013 *)

Formula

a(n) = A034886(n) - (A027869(n) + A079680(n) + A079714(n) + A079684(n) + A079688(n) + A079690(n) + A079691(n) + A079692(n) + A079693(n)). - Reinhard Zumkeller, Jan 27 2008

A079714 Number of 2's in n!.

Original entry on oeis.org

0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 3, 2, 0, 3, 1, 2, 2, 3, 1, 2, 2, 2, 1, 2, 1, 0, 0, 4, 7, 3, 1, 4, 3, 3, 3, 7, 4, 5, 4, 3, 4, 4, 4, 8, 6, 6, 10, 3, 10, 3, 6, 9, 6, 1, 9, 10, 6, 9, 10, 13, 8, 6, 11, 8, 8, 8, 14, 7, 8, 10, 8, 14, 9, 12, 10, 16, 8, 12, 9, 5, 9, 12, 14, 17, 16, 12, 9, 10, 8, 8, 17, 11, 19, 7, 13, 16, 19, 19, 14
Offset: 0

Views

Author

Cino Hilliard, Jan 31 2003

Keywords

Crossrefs

Programs

  • Maple
    a:= n-> numboccur(2, convert(n!, base, 10)):
    seq(a(n), n=0..101);  # Alois P. Heinz, Apr 26 2021
  • Mathematica
    Table[DigitCount[n!,10,2],{n,0,110}] (* Harvey P. Dale, Jun 20 2021 *)
  • PARI
    a(n) = #select(x->(x==2), digits(n!)); \\ Michel Marcus, Apr 26 2021

Formula

a(n) = A034886(n) - (A027869(n) + A079680(n) + A079684(n) + A079688(n) + A079690(n) + A079691(n) + A079692(n) + A079693(n) + A079694(n)). - Reinhard Zumkeller, Jan 27 2008

Extensions

a(36) ff. corrected by Georg Fischer, Apr 26 2021

A061010 Number of digits in (10^n)!.

Original entry on oeis.org

1, 7, 158, 2568, 35660, 456574, 5565709, 65657060, 756570557, 8565705523, 95657055187, 1056570551816, 11565705518104, 125657055180975, 1356570551809683, 14565705518096757, 155657055180967491
Offset: 0

Views

Author

Robert G. Wilson v, May 20 2001

Keywords

References

  • Jerry Glynn and Theodore Gray, "The Beginner's Guide To Mathematica, Version 4," Cambridge University Press, Cambridge, UK, 2000, p. 26.

Crossrefs

Programs

  • Mathematica
    Table[ Floor[ N[ Log[ 10, (10^n)! ]] + 1 ], {n, 0, 7} ]
    $MaxPrecision = Infinity; A061010[n_] := 1 + KroneckerDelta[n, 0] + Floor[(-2*10^n + Log[2] + (1 + 2*10^n)*n*Log[10] + Log[Pi])/(2*Log[10])] (* Enrique Pérez Herrero, Nov 09 2009 *)

Formula

From Enrique Pérez Herrero, Nov 09 2009: (Start)
a(n) = 1 + floor(log((10^n)!)/(log(10))), and using Stirling's approximation:
a(n) = 1 + delta(n,0) + floor((-2*10^n + log(2) + (1+2*10^n)*n*log(10) + log(Pi))/(2*log(10))). (End)
a(n) = 10^n*(n - 1/log(10)) + n/2 + O(1). [Arkadiusz Wesolowski, Jan 21 2012]

Extensions

a(7) from Farideh Firoozbakht, Jul 05 2005
More terms from Eric W. Weisstein, Dec 01 2005
Typo in formula fixed, and Mathematica formula changed to cover a(0)=1, Enrique Pérez Herrero, Feb 06 2010

A072831 Number of bits in n!.

Original entry on oeis.org

1, 1, 2, 3, 5, 7, 10, 13, 16, 19, 22, 26, 29, 33, 37, 41, 45, 49, 53, 57, 62, 66, 70, 75, 80, 84, 89, 94, 98, 103, 108, 113, 118, 123, 128, 133, 139, 144, 149, 154, 160, 165, 170, 176, 181, 187, 192, 198, 203, 209, 215, 220, 226, 232, 238, 243, 249, 255, 261, 267
Offset: 0

Views

Author

Rick L. Shepherd, Jul 22 2002

Keywords

Examples

			a(4)=5 because 4! = 4*3*2*1 = 24 (base 10) = 11000 (base 2), using 5 bits.
		

Crossrefs

Cf. A034886 (decimal digits of n!), A000142 (n!). Essentially the same as A003070.

Programs

  • Maple
    a:= n-> 1+ilog2(n!):
    seq(a(n), n=0..100);  # Alois P. Heinz, May 03 2016
  • Mathematica
    Floor[Log[2,Range[0,60]!]]+1 (* Harvey P. Dale, Nov 16 2011 *)
  • PARI
    for(n=0,100,print1(floor(log(n!)/log(2))+1,","))
    
  • PARI
    a(n) = #binary(n!); \\ Michel Marcus, Dec 23 2016
    
  • Python
    import math
    def a(n):
      return len(bin(math.factorial(n))[2:]) # Indranil Ghosh, Dec 23 2016

Formula

a(n) = floor(log(n!)/log(2)) + 1.

A006488 Numbers n such that n! has a square number of digits.

Original entry on oeis.org

0, 1, 2, 3, 7, 12, 18, 32, 59, 81, 105, 132, 228, 265, 284, 304, 367, 389, 435, 483, 508, 697, 726, 944, 1011, 1045, 1080, 1115, 1187, 1454, 1494, 1617, 1659, 1788, 1921, 2012, 2105, 2200, 2248, 2395, 2445, 2861, 2915, 3192, 3480, 3539, 3902, 3964, 4476
Offset: 1

Views

Author

Keywords

Comments

Numbers whose square is represented by the number of digits of n!: 1, 2, 3, 4, 6, 9, 11, 13, 15, 21, 23, 24, 25, 28, 29, ..., . - Robert G. Wilson v, May 14 2014
From Bernard Schott, Jan 04 2020: (Start)
In M. Gardner's book, see reference, there is a tree printout of 105! with 169 digits, where the bottom row consists of the 25 trailing zeros of 105!. M. Gardner does not explain if this is the only factorial that can be displayed in a similar tree form.
Proof: If m! has q^2 digits, hence the number of trailing zeros in m! must be equal to 2*q-1 to satisfy this triangular look; m = 105 satisfies these two conditions with q = 13 because 105! has 13^2 = 169 digits and 2*13-1 = 25 trailing zeros.
When m < 105 and m! has q^2 digits (m <= 81), then q <= 11 and the number of trailing zeros is <= 2*q - 3.
When m > 105 and m! has q^2 digits (m >= 132), then q >= 15 and the number of trailing zeros is >= 2*q + 2.
Hence, only 105! presents such a tree printout.
1
081
39675
8240290
900504101
30580032964
9720646107774
902579144176636
57322653190990515
3326984536526808240
339776398934872029657
99387290781343681609728
0000000000000000000000000
(End)

References

  • M. Gardner, Mathematical Magic Show. Random House, NY, 1978, p. 55.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A000142, A027868 (trailing zeros), A034886 (number of digits), A056851.

Programs

  • Magma
    [k:k in [0..5000]| IsSquare(#Intseq(Factorial(k)))]; // Marius A. Burtea, Jan 04 2020
  • 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)]]; Select[ Range[ 4500], IntegerQ[ Sqrt[ (LogBase10Stirling[ # ] + 1)]] & ] (* The Mathematica coding comes from J. Stirling's expansion for the Gamma function; see the links. For more terms inside the last Log_10 function, use A001163 & A001164. Robert G. Wilson v, Apr 27 2014 *)
    Select[Range[0,4500],IntegerQ[Sqrt[IntegerLength[#!]]]&] (* Harvey P. Dale, Sep 27 2018 *)
  • PARI
    isok(n) = issquare(#Str(n!)); \\ Michel Marcus, Sep 05 2015
    

A035065 Numbers k such that k! has a prime number of digits.

Original entry on oeis.org

4, 5, 6, 8, 10, 14, 15, 20, 23, 27, 29, 33, 35, 39, 43, 51, 58, 68, 70, 84, 86, 89, 90, 95, 104, 107, 110, 111, 116, 117, 119, 120, 133, 134, 136, 139, 147, 150, 158, 159, 170, 183, 193, 199, 206, 211, 224, 229, 235, 239, 244, 249, 254, 270, 279, 282, 291, 299
Offset: 1

Views

Author

Patrick De Geest, Nov 15 1998

Keywords

Examples

			a(1)=4 because 4! = 24 has 2 (a prime) digits.
23! = 25852016738884976640000 has exactly 23 digits!
		

Crossrefs

Programs

  • Magma
    [n: n in [1..300] | IsPrime(Floor(Log(10, Factorial(n))+1))]; // Vincenzo Librandi, Mar 28 2018
  • Maple
    filter:= n -> isprime(1+ilog10(n!)):
    select(filter, [$1..1000]); # Robert Israel, Mar 27 2018
  • Mathematica
    Select[ Range[300], PrimeQ[ Floor[ Log[10, #! ] + 1]] & ]
  • PARI
    isok(n) = isprime(#digits(n!)); \\ Michel Marcus, Mar 28 2018
    

Extensions

Offset corrected by Robert Israel, Mar 27 2018

A056851 Integers n such that the number of digits in n! is a cube.

Original entry on oeis.org

0, 1, 2, 3, 11, 26, 83, 128, 186, 258, 572, 875, 1494, 2029, 3859, 4810, 6497, 9274, 18033, 19243, 24600, 26073, 30828, 32528, 34287, 41930, 48325, 96475, 103590, 118814, 126936, 205022, 240742, 260009, 331334, 379612, 396656, 405360, 414186
Offset: 1

Views

Author

Robert G. Wilson v, Aug 30 2000

Keywords

Comments

Numbers whose cube is represented by the number of digits of n!: 1, 2, 3, 5, 6, 7, 8, 11, 13, 16, 18, 23, 25, 28, ..., . - Robert G. Wilson v, May 14 2014
Ed Pegg Jr conjectures that n^3 - n = k! has a solution if and only if n is 2, 3, 5 or 9 (when k is 3, 4, 5 and 6).

Crossrefs

Programs

  • Mathematica
    Do[ If[ IntegerQ[ RealDigits[ n! ][[ 2 ]]^(1/3) ], Print[ n ]], {n, 0, 53100}]
    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)]]; Select[ Range[ 500000], IntegerQ[ (LogBase10Stirling[ # ] + 1)^(1/3)] & ]
    Select[Range[0,420000],IntegerQ[Surd[IntegerLength[#!],3]]&] (* Harvey P. Dale, Mar 09 2019 *)

Formula

{n: A034886(n) in A000578}. - R. J. Mathar, Jan 15 2013

Extensions

More terms from Robert G. Wilson v, Jun 25 2003

A177901 Numbers n > 1 such that log_10(n!) is closer to an integer than at any smaller n.

Original entry on oeis.org

2, 3, 5, 14, 22, 27, 35, 95, 96, 197, 261, 5935, 7399, 8998, 11671, 17411, 108965, 165535, 258335, 549545, 1542194, 2064173, 4146167, 4594140, 5814278, 9242360, 21603225, 28563732, 40700787, 54528830, 252544447, 1430841730, 5042264463, 11012237562, 31774693500
Offset: 1

Views

Author

T. D. Noe, Dec 15 2010

Keywords

Comments

If the Kamenetsky formula (see A034886) for the number of digits in n! ever fails, it will be at some number in this sequence where log_10(n!) and log_10(2*Pi*n)/2 + n*(log_10(n/e)) are on opposite sides of an integer. For n > 1, log_10(n!) cannot be an integer, otherwise n! = 10^m for some m, which is not possible because n! has all the primes up to n as factors, but 10^m has only two prime factors: 2 and 5.
The above comment is mostly correct. As it turns out, the smallest counterexample to Kamenetsky's formula, 6561101970383, does, in fact, belong to this sequence. However, there should exist an infinite number of such counterexamples [see the Elkies link], and while most of them should belong to this sequence, a small percentage should not, because of the presence of some smaller number n at which log_10(n!) is even closer (whether on the high or low side) to its nearest integer (see Example section). As N increases, the number of terms below N in this sequence should approach log(N), and the number of counterexamples to Kamenetsky's formula should approach log_10(N)/12; e.g., if we could search through all integers up to N=10^1200, we should expect to find roughly log(10^1200) ~ 2763 terms in this sequence, and roughly 100 failures of Kamenetsky's formula, a few of which should not be in this sequence. - Jon E. Schoenfield, Dec 02 2014

Examples

			From _Jon E. Schoenfield_, Dec 02 2014: (Start)
This sequence contains a subset of each of two related sequences: A249829 and A250022 (values of n at which the fractional part of log_10(n!) reaches a record high or a record low, respectively). To see how they interrelate, consider the following four integers (two from each of those sequences):
       +------------------------+-----------------------+
       |      log_10(n!)        |  Member of sequence   |
       +----------+-------------+-------+-------+-------+
   n   | near int |  difference |A249829|A250022|A177901|
=======+==========+=============+=======+=======+=======+
1542194|  8873548 | +0.00000133 |  yes  |  no   |  yes  |
1692693|  9807947 | -0.00000158 |  no   |  yes  |  no   |
2064173| 12138273 | -0.00000030 |  no   |  yes  |  yes  |
2159448| 12740851 | +0.00000052 |  yes  |  no   |  no   |
=======+==========+=============+=======+=======+=======+
.
At n=1542194, log_10(n!) = 8873548.00000133 differs from its nearest integer by only 0.00000133; this absolute difference is less than that at any smaller value of n, so 1542194 is in this sequence.
At n=1692693, log_10(n!) = 9807946.99999842 differs from its nearest integer by only 0.00000158; although the fractional part reaches a record high, this absolute difference is greater than that at n=1542194, so 1692693 is not in this sequence.
At n=2064173, log_10(n!) = 12138272.99999970 differs from its nearest integer by only 0.00000030; this absolute difference is less than that at any smaller value of n, so 2064173 is in this sequence.
At n=2159448, log_10(n!) = 12740851.00000052 differs from its nearest integer by only 0.00000052; although the fractional part reaches a record low, this absolute difference is greater than that at n=2064173, so 2159448 is not in this sequence.
(End)
		

Crossrefs

Programs

  • Mathematica
    mx=1; s=0; Reap[Do[s=s+N[Log[10,n], 30]; d=Abs[Round[s]-s]; If[d
    				

Extensions

a(31)-a(35) from Jon E. Schoenfield, Nov 11 2014
Previous Showing 11-20 of 46 results. Next