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.

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

This page as a plain text file.
%I A102730 #27 Apr 03 2025 02:51:31
%S A102730 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,
%T A102730 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,
%U A102730 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
%N A102730 Number of factorials contained in the binary representation of n!
%C A102730 Conjecture: the sequence is bounded.
%C A102730 I conjecture the contrary: for every k, there exists n with a(n) > k. See A103670. - _Charles R Greathouse IV_, Aug 21 2011
%C A102730 For n > 0: A103670(n) = smallest m such that a(m) = n.
%C A102730 A103671(n) = smallest m such that the binary representation of n! does not contain m!.
%C A102730 A103672(n) = greatest m less than n such that the binary representation of n! contains m!.
%H A102730 Charles R Greathouse IV, <a href="/A102730/b102730.txt">Table of n, a(n) for n = 0..1000</a>
%H A102730 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>.
%H A102730 <a href="/index/Fa#factorial">Index entries for sequences related to factorial numbers</a>.
%e A102730 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'.
%t A102730 a[n_] := Sum[Boole[StringContainsQ[IntegerString[n!, 2], IntegerString[k!, 2]]], {k, 0, n}]; Array[a, 100, 0] (* _Amiram Eldar_, Apr 03 2025 *)
%o A102730 (PARI) contains(v,u)=for(i=0,#v-#u,for(j=1,#u,if(v[i+j]!=u[j],next(2)));return(1));0
%o A102730 a(n)=my(v=binary(n--!));sum(i=0,n-1,contains(v,binary(i!)))+1 \\ _Charles R Greathouse IV_, Aug 21 2011
%Y A102730 Cf. A036603, A007088, A000142, A011371, A093684, A103673, A103676, A103677, A103674, A103678, A103679, A103675, A103680, A103681.
%K A102730 nonn,base
%O A102730 0,2
%A A102730 _Reinhard Zumkeller_, Feb 07 2005