%I #31 Mar 25 2020 10:43:03
%S 0,0,1,0,2,1,2,2,3,2,5,2,4,5,6,3,6,6,7,6,7,6,11,6,8,9,10,9,12,9,10,10,
%T 13,12,15,10,11,14,17,12,16,13,16,15,16,17,20,15,16,18,19,16,23,20,21,
%U 18,19,20,25,20,22,23,26,21,24,21,24,27,28,25,28,22,25,28,29,26,31,30
%N Number of k satisfying 1<=k<=n and {n/k} >= 1/2, where {n/k} is the fractional part of n/k, i.e., {n/k} = n/k - floor(n/k).
%H Robert Israel, <a href="/A075989/b075989.txt">Table of n, a(n) for n = 1..10000</a>
%F a(n) + A075988(n) = n-d(n), where d(n) = A000005(n) is the number of divisors of n.
%F a(n) = (Sum_{k=1..n} floor(2*n/(2*k+1)) - floor(2*n/(2*k+2)); a(n) = (2*(log 2)-1)*n + O(n^(1/2)). Conjecture: a(n) = (2*(log 2)-1)*n + O(n^(1/4 + epsilon)) like for the divisor and Circle problems. - _Benoit Cloitre_, Oct 21 2012
%F Conjecture: Let f(a,b)=1, if (a+b) mod |a-b| != (a mod |a-b|)+(b mod |a-b|), and 0 otherwise. a(n) = Sum_{k=1..n-1} f(n,k). - _Benedict W. J. Irwin_, Sep 22 2016
%e For n = 5, the fractional parts of k/n are 0, 1/2, 2/3, 1/4, 0; a(5) = 2 counts 1/2 and 2/3. A075988(5) = 1 counts 1/4 and A000005(5) = 2 counts the 0's.
%p seq(nops(select(k -> frac(n/k) >= 1/2, [$1..n])), n=1..100); # _Robert Israel_, Sep 25 2016
%t Table[Count[Range@ n, k_ /; n/k - Floor[n/k] >= 1/2], {n, 78}] (* _Michael De Vlieger_, Sep 25 2016 *)
%o (PARI) a(n)=n-sum(i=1,n,frac(n/i)>=1/2)
%o (PARI) a(n)=sum(k=1,n,floor(2*n/(2*k+1))-floor(2*n/(2*k+2))) \\ _Benoit Cloitre_, Oct 21 2012
%o (PARI) A075989(n)=sum(k=1,n,2*n\(2*k+1)-n\(k+1)) \\ _M. F. Hasler_, Oct 21 2012
%Y Cf. A000005, A075988, A076991.
%K nonn
%O 1,5
%A _Clark Kimberling_, Sep 28 2002
|