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

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

A137577 Largest of the least frequent digits in decimal representation of n!.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Jan 27 2008

Keywords

Comments

A137578(n) <= a(n).

Examples

			n=10: 10! = 3628800 => a(10) = Max{1,4,5,7,9} = 9;
n=11: 11! = 39916800 => a(11) = Max{2,4,5,7} = 7.
		

Crossrefs

A137578 Smallest of the least frequent digits in decimal representation of n!.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Jan 27 2008

Keywords

Comments

a(n) <= A137577(n).

Examples

			n=10: 10! = 3628800 => a(10) = Min{1,4,5,7,9} = 1;
n=11: 11! = 39916800 => a(11) = Min{2,4,5,7} = 2.
		

Crossrefs

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!).

A137581 Number of inner zeros in decimal representation of n!.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Jan 27 2008

Keywords

Crossrefs

Programs

  • Haskell
    a137581 = a055641 . a004154  -- Reinhard Zumkeller, Apr 01 2015
  • Maple
    A137581:= proc(n) uses StringTools;
    CountCharacterOccurrences(TrimRight(SubstituteAll(
        convert(n!,string),"0"," "))," ")
    end proc; # Robert Israel, May 07 2012
  • Mathematica
    f[n_] := f[n] = Block[{a = n!}, While[Mod[a, 10] == 0, a = a/10]; Count[ IntegerDigits@a, 0]]; Table[f@n, {n, 0, 98}] (* Robert G. Wilson v, Jan 28 2008 *)
    Table[DigitCount[n!/10^IntegerExponent[n!,10],10,0],{n,0,100}] (* Harvey P. Dale, Apr 10 2023 *)

Formula

a(n) = A027869(n) - A027868(n);
a(A137582(n)) = 0.
a(n) = A055641(A004154(n)). - Reinhard Zumkeller, Apr 01 2015

A356757 Omit zero digits from factorial numbers.

Original entry on oeis.org

1, 1, 2, 6, 24, 12, 72, 54, 432, 36288, 36288, 399168, 47916, 622728, 871782912, 137674368, 2922789888, 35568742896, 64237375728, 121645148832, 243292817664, 5199421717944, 11247277776768, 258521673888497664, 624484173323943936, 15511214333985984, 4329146112665635584
Offset: 0

Views

Author

Stefano Spezia, Aug 26 2022

Keywords

Examples

			a(12) = 47916 since 12! = 479001600.
		

Crossrefs

Cf. A027869 (number of omitted zero digits), A356758 (number of nonzero digits).

Programs

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

Formula

a(n) = A004719(A000142(n)).

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

A137582 Numbers having no inner zeros in decimal representation of their factorial.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 9, 10, 11, 14, 31, 40
Offset: 1

Views

Author

Reinhard Zumkeller, Jan 27 2008

Keywords

Comments

Conjecture: the sequence is finite.

Examples

			A000142(a(10)) = 11! = 399168*10^2;
A000142(a(11)) = 14! = 871782912*10^2;
A000142(a(12)) = 31! = 822283865417792281772556288*10^7.
		

Crossrefs

Programs

  • PARI
    isok(k) = my(f=k!); while(!(f % 10), f \= 10); #select(x->(x == 0), digits(f)) == 0; \\ Michel Marcus, Jun 28 2023

Formula

A137581(a(n)) = 0.

A181583 Smallest prime p such that p! contains exactly n 0's (or 0, if no such p exists).

Original entry on oeis.org

2, 5, 7, 0, 13, 23, 19, 29, 0, 0, 0, 47, 37, 43, 0, 41, 0, 53, 0, 59, 0, 0, 67, 0, 0, 71, 61, 0, 0, 79, 83, 0, 0, 0, 89, 73, 103, 0, 0, 109, 0, 0, 107, 0, 0, 0, 131, 0, 0, 137, 0, 0, 149, 0, 127, 0, 0, 139, 0, 0, 151, 0, 0, 0, 0, 0, 173, 0, 163, 0, 167, 199, 0, 0, 179, 0, 197, 0, 0, 0, 0, 0
Offset: 0

Views

Author

Lekraj Beedassy, Nov 02 2010

Keywords

Comments

The smallest prime p such that A027869(p) = n. [R. J. Mathar, Nov 18 2010]

Examples

			a(2) = 7 because 7! = 5040 is the first prime factorial followed by 11! = 39916800 to contain exactly 2 0's.
		

Crossrefs

Extensions

More terms from Robert G. Wilson v, Nov 04 2010
Previous Showing 11-20 of 23 results. Next