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-5 of 5 results.

A003070 a(n) = ceiling(log_2 n!).

Original entry on oeis.org

0, 0, 1, 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

Keywords

Comments

a(n) is a lower bound for the minimum number of comparisons needed to sort n elements using a comparison sort (A036604). - Alex Costea, Mar 23 2019

References

  • D. E. Knuth, Art of Computer Programming, Vol. 3, Sect. 5.3.1.
  • E. Reingold, J. Nievergelt and N. Deo, Combinatorial Algorithms, Prentice-Hall, 1977, section 7.4.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • Tianxing Tao, On optimal arrangement of 12 points, pp. 229-234 in Combinatorics, Computing and Complexity, ed. D. Du and G. Hu, Kluwer, 1989.

Crossrefs

Cf. A036604. Essentially the same as A072831.

Programs

  • Magma
    [Ceiling(Log(2,Factorial(n))) : n in [0..70]]; // G. C. Greubel, Nov 03 2022
    
  • Mathematica
    Array[Ceiling@ Log2[#!] &, 60, 0] (* Michael De Vlieger, Mar 27 2019 *)
  • SageMath
    [ceil(log(factorial(n),2)) for n in range(71)] # G. C. Greubel, Nov 03 2022

A213857 Least m such that n! <= 3^m.

Original entry on oeis.org

1, 1, 2, 3, 5, 6, 8, 10, 12, 14, 16, 19, 21, 23, 26, 28, 31, 34, 36, 39, 42, 45, 47, 50, 53, 56, 59, 62, 65, 68, 72, 75, 78, 81, 84, 88, 91, 94, 98, 101, 104, 108, 111, 115, 118, 122, 125, 129, 132, 136, 139, 143, 146, 150, 154, 157, 161, 165, 168, 172, 176
Offset: 1

Views

Author

Clark Kimberling, Jul 17 2012

Keywords

Comments

Also the number of digits in the ternary representation of n!. - Martin Renner, Jan 03 2022

Examples

			a(8) = 10 because 3^9 < 8! <= 3^10.
		

Crossrefs

Programs

  • Maple
    seq(nops(convert(n!,base,3)),n=1..100); # Martin Renner, Jan 03 2022
  • Mathematica
    Table[m=1; While[n!>3^m, m++]; m, {n,1,100}]

A093710 Numbers k such that in their binary representation all numbers from 1 to k are contained in k!.

Original entry on oeis.org

1, 2, 3, 4, 6, 7, 8, 14, 23, 26, 28, 30, 33, 34, 35, 39, 42, 43, 51, 53, 58, 61, 62, 63, 64, 66, 68, 70, 73, 77, 80, 83, 93, 94, 106, 108, 111, 114, 115, 116, 126, 131, 132, 133, 134, 136, 137, 147, 149, 153, 155, 156, 169, 172, 175, 180, 185, 187, 191, 195, 206
Offset: 1

Views

Author

Reinhard Zumkeller, Apr 11 2004

Keywords

Examples

			6 is in the sequence because 6! = 1011010000_2 which contains 4 = 100_2, 5 = 101_2 and 6 = 110_2 as a substring in the binary expansion. As it contains 4, 5 and 6 in binary it contains the binary expansion of every smaller number than 4 in its binary expansion. - _David A. Corneth_, Aug 05 2025
		

Crossrefs

Complement of A093711.

Formula

A092601(a(n)) = a(n).

A078565 Number of zeros in the binary expansion of n!.

Original entry on oeis.org

0, 0, 1, 1, 3, 3, 6, 7, 10, 13, 11, 19, 17, 21, 25, 23, 27, 27, 30, 40, 40, 41, 42, 44, 51, 54, 54, 56, 56, 63, 60, 71, 76, 77, 77, 77, 88, 86, 90, 90, 97, 99, 106, 105, 107, 117, 115, 117, 114, 122, 126, 130, 138, 138, 151, 144, 146, 157, 160, 158, 160, 176
Offset: 0

Views

Author

Jose R. Brox (tautocrona(AT)terra.es), Jan 26 2003

Keywords

Examples

			a(4) = 3 because 4! = 24_10 = 11000_2 and it has 3 zero digits.
		

Crossrefs

Programs

  • Mathematica
    Table[Count[IntegerDigits[n!, 2], 0], {n, 0, 100}] (* T. D. Noe, Apr 10 2012 *)
    DigitCount[Range[0,70]!,2,0] (* Harvey P. Dale, Mar 11 2019 *)
  • PARI
    for(n=1,300,b=binary(n!); print1(sum(k=1,length(b),if(b[k],0,1))","))
    
  • Python
    import math
    def a(n):
        return bin(math.factorial(n))[2:].count("0")
    # Indranil Ghosh, Dec 23 2016

Formula

a(n) = A072831(n) - A079584(n). - Michel Marcus, Dec 23 2016

A152168 Number of binary digits in (n!)!.

Original entry on oeis.org

1, 1, 2, 10, 80, 661, 5802, 54725, 558704, 6178565, 73840164, 950331113, 13121175977, 193618002604, 3042570732326, 50747501675076, 895651186352884, 16679929313440954, 326936145826028780, 6728526339596831313, 145085354333183129464, 3271200076443827203823
Offset: 0

Views

Author

Jon E. Schoenfield, Nov 27 2008

Keywords

Examples

			(3!)! = 6! = 720 has ten binary digits (1011010000), so a(3) = 10.
		

Crossrefs

Programs

Showing 1-5 of 5 results.