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.

A103680 Numbers m such that the binary representation of m! contains 7!.

Original entry on oeis.org

7, 8, 100, 113, 117, 123, 136, 145, 155, 156, 163, 165, 168, 179, 186, 203, 245, 247, 248, 259, 265, 275, 283, 289, 293, 294, 296, 305, 307, 309, 311, 318, 328, 330, 341, 342, 343, 346, 352, 355, 360, 375, 384, 386, 399, 402, 405, 408, 410, 413, 415, 419
Offset: 1

Views

Author

Reinhard Zumkeller, Feb 12 2005

Keywords

Comments

All the numbers from 5154 to 5*10^5 belong to the sequence. - Giovanni Resta, Apr 07 2013

Crossrefs

Programs

  • Mathematica
    Select[Range[0, 420], 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(1))); 0 \\ Charles R Greathouse IV, Apr 07 2013

Formula

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

A103675 a(n) = 1 if the binary representation of n! contains 7! (bit string "1001110110000"), otherwise a(n) = 0.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Feb 12 2005

Keywords

Comments

a(A103680(n)) = 1, a(A103681(n)) = 0.
Probably a(5153) is the last zero term. a(n) = 1 for n from 5154 to 5*10^5. - Giovanni Resta, Apr 07 2013

Crossrefs

Programs

  • PARI
    a(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(1))); 0 \\ Charles R Greathouse IV, Apr 07 2013

Extensions

Name edited by Antti Karttunen, Dec 24 2018

A103677 Numbers m such that in binary representation m! doesn't contain 5!.

Original entry on oeis.org

0, 1, 2, 3, 4, 6, 7, 8, 9, 11, 13, 14, 15, 16, 17, 18, 19, 20, 21, 24, 26, 28, 30, 31, 32, 36, 46, 53, 58, 65
Offset: 1

Views

Author

Reinhard Zumkeller, Feb 12 2005

Keywords

Comments

Conjecture: there are no further terms;
complement of A103676: A103673(a(n))=0, A103673(A103676(n))=1.

Crossrefs

Programs

  • 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(0))); 1 \\ Charles R Greathouse IV, Apr 07 2013
Showing 1-5 of 5 results.