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-6 of 6 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

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.

A103674 If in binary representation n! contains 6! then 1 else 0.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Feb 12 2005

Keywords

Comments

Conjecture: a(n) = 1 for n > 802. - Charles R Greathouse IV, Apr 07 2013
Conjecture checked up to n <= 5*10^5. - Giovanni Resta, Apr 07 2013

Crossrefs

Programs

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

Formula

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

A103678 Numbers m such that in binary representation m! contains 6!.

Original entry on oeis.org

6, 20, 23, 30, 31, 32, 37, 43, 53, 55, 58, 65, 71, 74, 81, 86, 91, 94, 95, 99, 102, 106, 108, 111, 115, 116, 117, 118, 122, 123, 124, 127, 128, 129, 133, 134, 135, 139, 141, 143, 144, 145, 149, 153, 155, 157, 158, 159, 160, 162, 163, 166, 167, 168, 169, 170, 171
Offset: 1

Views

Author

Reinhard Zumkeller, Feb 12 2005

Keywords

Comments

Complement of A103679: A103674(a(n))=1, A103674(A103679(n))=0.
All the numbers 803 <= n <= 500000 are in the sequence. - Giovanni Resta, Apr 07 2013

Crossrefs

Programs

  • Mathematica
    With[{c=IntegerDigits[6!,2]},Select[Range[180],SequenceCount[ IntegerDigits[ #!,2], c]>0&]] (* The program uses the SequenceCount function from Mathematica version 10 *) (* Harvey P. Dale, Jul 26 2016 *)
  • 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(1))); 0 \\ Charles R Greathouse IV, Apr 07 2013

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.

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