%I #41 Dec 14 2019 21:36:54
%S 3,7,15,23,31,47,63,79,87,95,127,143,151,159,186,191,215,223,255,271,
%T 279,287,319,343,351,383,415,447,471,511,527,535,543,575,599,607,639,
%U 671,698,703,727,767,799,831,895,959,964,1023,1039,1047,1055,1087,1111
%N Numbers n such that n!*Sum_{i=1..n} 1/(i*2^i) is an integer.
%C m is in this list if and only if v_2(d) + s_2(m) <= m where v_2(d) is the 2-adic valuation of the denominator of sum(i=1..n, 1/(i*2^i)) and s_2(m) is the sum of the digits in the expansion of m in base 2. - _Peter Luschny_, May 19 2014
%H Robert Israel and Charles R Greathouse IV, <a href="/A069119/b069119.txt">Table of n, a(n) for n = 1..10000</a> (first 220 terms from Israel)
%H A. Straub, V. H. Moll, T. Amdeberhan, <a href="http://arxiv.org/abs/0811.2028">The p-adic valuation of k-central binomial coefficients</a>, arXiv:0811.2028 [math.NT], 2008.
%H Nicolas Wider, <a href="http://user.math.uzh.ch/dehaye/thesis_students/Nicolas_Wider-Integrality_of_factorial_ratios.pdf">Integrality of factorial ratios</a>, Master's Thesis ETH Zürich, 2012.
%H Wadim Zudilin, <a href="http://mathoverflow.net/questions/26336/">Integer-valued factorial ratios</a>, MathOverflow question 26336, 2010.
%e 3 is in the sequence because 3!*(1/1/2^1 + 1/2/2^2 + 1/3/2^3) = 4 is an integer. - _Robert Israel_, May 18 2014
%p select(k -> type(k!*add(1/i/2^i,i=1..k),integer),[$1..10000]); # _Robert Israel_, May 18 2014
%t Select[Range[2000], IntegerQ[#!*Sum[1/(i*2^i), {i, 1, #}]]&] (* _Jean-François Alcover_, Jul 14 2018 *)
%o (Sage)
%o def is_A069119(n):
%o s = add(1/(i*2^i) for i in (1..n))
%o vf = n - sum(ZZ(n).digits(base=2))
%o return valuation(denominator(s),2) <= vf
%o filter(is_A069119, range(1112)) # _Peter Luschny_, May 19 2014
%o (PARI) sm(n)=my(s,o);forstep(i=n,1,-1,o=-valuation(s+=1/(i<<i),2);if(i+#binary(i)-1<o,return(o)));o
%o is(n)=hammingweight(n)+sm(n) <= n \\ _Charles R Greathouse IV_, May 19 2014
%Y Cf. A069120.
%K nonn
%O 1,1
%A _Benoit Cloitre_, Apr 07 2002