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

A102730 Number of factorials contained in the binary representation of n!

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Feb 07 2005

Keywords

Comments

Conjecture: the sequence is bounded.
I conjecture the contrary: for every k, there exists n with a(n) > k. See A103670. - Charles R Greathouse IV, Aug 21 2011
For n > 0: A103670(n) = smallest m such that a(m) = n.
A103671(n) = smallest m such that the binary representation of n! does not contain m!.
A103672(n) = greatest m less than n such that the binary representation of n! contains m!.

Examples

			n = 6: 6! = 720 -> '1011010000' contains a(6) = 5 factorials: 0! = 1 -> '1', 1! = 1 -> '1', 2! = 2 -> '10', 3! = 6 -> '110' and 6! itself, but not 4! = 24-> '11000' and 5! = 120 -> '1111000'.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Sum[Boole[StringContainsQ[IntegerString[n!, 2], IntegerString[k!, 2]]], {k, 0, n}]; Array[a, 100, 0] (* Amiram Eldar, Apr 03 2025 *)
  • PARI
    contains(v,u)=for(i=0,#v-#u,for(j=1,#u,if(v[i+j]!=u[j],next(2)));return(1));0
    a(n)=my(v=binary(n--!));sum(i=0,n-1,contains(v,binary(i!)))+1 \\ Charles R Greathouse IV, Aug 21 2011

A103672 Greatest m < n such that the binary representation of n! contains m!.

Original entry on oeis.org

0, 1, 2, 3, 4, 3, 4, 7, 4, 5, 4, 5, 4, 4, 4, 15, 4, 4, 4, 6, 4, 5, 6, 4, 5, 4, 5, 4, 5, 6, 6, 31, 5, 5, 5, 4, 6, 5, 5, 5, 5, 5, 6, 5, 5, 4, 5, 5, 5, 5, 5, 5, 6, 5, 6, 5, 5, 6, 5, 5, 5, 5, 5, 63, 6, 5, 5, 5, 5, 5, 6, 5, 5, 6, 5, 5, 5, 5, 5, 5, 6, 5, 5, 5, 5, 6, 5, 5, 5, 5, 6, 5, 5, 6, 6, 5, 5, 5, 6, 7, 5, 6, 5, 5
Offset: 1

Views

Author

Reinhard Zumkeller, Feb 12 2005

Keywords

Crossrefs

Programs

  • Mathematica
    q[n_, m_] := StringContainsQ[IntegerString[n!, 2], IntegerString[m!, 2]]; a[n_] := Module[{m = n-1}, While[!q[n, m], m--]; m]; Array[a, 104] (* Amiram Eldar, Apr 03 2025 *)

Formula

a(2^k) = 2^k - 1, a(A000079(k)) = A000225(k).
Showing 1-2 of 2 results.