login
Least number k such that k! in binary representation has n consecutive ones.
1

%I #8 Oct 08 2017 23:45:52

%S 1,3,7,5,10,12,33,38,47,39,67,37,120,71,189,568,119,411,952,909,1438,

%T 1215,2107,3435,10644,4390,19154,12144,21458,27294,54773,104306,

%U 115552,46620,112657,100468

%N Least number k such that k! in binary representation has n consecutive ones.

%e a(4)=5 because 5!_d = 1111000_b.

%t helper[b_][a : {b_, ___}] := Length[a]; helper[b_][a_List] := 0; maxConsecutiveCount[m_List, x_] := Max[helper[x] /@ Split[m]] (* Bobby R. Treat (drbob(AT)bigfoot.com), Apr 20 2004)

%t a = Table[0, {30}]; Do[ b = maxConsecutiveCount[ IntegerDigits[n!, 2], 1]; If[ a[[b]] == 0, a[[b]] = n], {n, 17500}]; a

%Y Cf. A094010.

%K nonn

%O 1,2

%A _Robert G. Wilson v_, Apr 20 2004

%E 19154, 12144 and 21458 from Bobby R. Treat, Apr 21 2004

%E a(30) - a(36) from _Robert G. Wilson v_, Aug 18 2010