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.

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

A103679 Numbers m such that the binary representation of m! does not contain 6!.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 21, 22, 24, 25, 26, 27, 28, 29, 33, 34, 35, 36, 38, 39, 40, 41, 42, 44, 45, 46, 47, 48, 49, 50, 51, 52, 54, 56, 57, 59, 60, 61, 62, 63, 64, 66, 67, 68, 69, 70, 72, 73, 75, 76, 77, 78, 79, 80, 82, 83, 84, 85, 87
Offset: 1

Views

Author

Reinhard Zumkeller, Feb 12 2005

Keywords

Comments

Last term is probably 802. No numbers between 803 and 500000 belong to the sequence. - Giovanni Resta, Apr 07 2013

Crossrefs

Programs

  • Mathematica
    Select[Range[0,100],SequenceCount[IntegerDigits[#!,2],{1,0,1,1,0,1,0,0,0,0}]==0&] (* Harvey P. Dale, Oct 12 2024 *)
  • PARI
    is(n)=n=n!; while(n>719, my(e=valuation(n, 2), e1=valuation((n>>=e)+1, 2)); n>>=e1; if(e>3 && e1==1 && bitand(n, 31)==22, return(0))); 1 \\ Charles R Greathouse IV, Apr 07 2013

Formula

A103674(a(n)) = 0, A103674(A103678(n)) = 1.

A103681 Numbers m such that in binary representation m! does not contain 7!.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73
Offset: 1

Views

Author

Reinhard Zumkeller, Feb 12 2005

Keywords

Comments

Last term is probably 5153, since all numbers from 5154 to 5*10^5 do not belong to the sequence. - Giovanni Resta, Apr 07 2013

Crossrefs

Programs

  • Mathematica
    Select[Range[0, 100], !StringContainsQ[IntegerString[#!, 2], IntegerString[7!, 2]] &] (* Amiram Eldar, Apr 03 2025 *)
  • PARI
    is(n)=n=n!; while(n>5039, my(e=valuation(n, 2), e1=valuation((n>>=e)+1, 2)); n>>=e1; if(e>3 && e1==2 && bitand(n, 127)==78, return(0))); 1 \\ Charles R Greathouse IV, Apr 07 2013

Formula

A103675(a(n)) = 0, A103675(A103680(n)) = 1.

A103673 If in binary representation n! contains 5! then 1 else 0.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 0

Views

Author

Reinhard Zumkeller, Feb 12 2005

Keywords

Comments

a(A103676(n)) = 1, a(A103677(n)) = 0.
Conjecture: a(n) = 1 for n > 65. - Charles R Greathouse IV, Apr 07 2013

Crossrefs

Programs

  • PARI
    a(n)=n=n!;while(n>119, my(e=valuation(n,2),e1=valuation((n>>=e)+1,2)); n>>=e1; if(e>2 && e1>3, return(1))); 0 \\ Charles R Greathouse IV, Apr 07 2013

A103676 Numbers m such that in binary representation m! contains 5!.

Original entry on oeis.org

5, 10, 12, 22, 23, 25, 27, 29, 33, 34, 35, 37, 38, 39, 40, 41, 42, 43, 44, 45, 47, 48, 49, 50, 51, 52, 54, 55, 56, 57, 59, 60, 61, 62, 63, 64, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99
Offset: 1

Views

Author

Reinhard Zumkeller, Feb 12 2005

Keywords

Comments

Complement of A103677: A103673(a(n))=1, A103673(A103677(n))=0.

Crossrefs

Programs

  • Mathematica
    Select[Range[100],MemberQ[Partition[IntegerDigits[#!,2],7,1],{1,1,1,1,0,0,0}]&] (* Harvey P. Dale, Apr 09 2012 *)
  • PARI
    is(n)=n=n!; while(n>119, my(e=valuation(n, 2), e1=valuation((n>>=e)+1, 2)); n>>=e1; if(e>2 && e1>3, return(1))); 2 \\ Charles R Greathouse IV, Apr 07 2013
Showing 1-5 of 5 results.