OFFSET
1,5
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
FORMULA
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
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
EXAMPLE
MAPLE
seq(nops(select(k -> frac(n/k) >= 1/2, [$1..n])), n=1..100); # Robert Israel, Sep 25 2016
MATHEMATICA
Table[Count[Range@ n, k_ /; n/k - Floor[n/k] >= 1/2], {n, 78}] (* Michael De Vlieger, Sep 25 2016 *)
PROG
(PARI) a(n)=n-sum(i=1, n, frac(n/i)>=1/2)
(PARI) a(n)=sum(k=1, n, floor(2*n/(2*k+1))-floor(2*n/(2*k+2))) \\ Benoit Cloitre, Oct 21 2012
(PARI) A075989(n)=sum(k=1, n, 2*n\(2*k+1)-n\(k+1)) \\ M. F. Hasler, Oct 21 2012
CROSSREFS
KEYWORD
nonn
AUTHOR
Clark Kimberling, Sep 28 2002
STATUS
approved