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.

A075989 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).

Original entry on oeis.org

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, 13, 12, 15, 10, 11, 14, 17, 12, 16, 13, 16, 15, 16, 17, 20, 15, 16, 18, 19, 16, 23, 20, 21, 18, 19, 20, 25, 20, 22, 23, 26, 21, 24, 21, 24, 27, 28, 25, 28, 22, 25, 28, 29, 26, 31, 30
Offset: 1

Views

Author

Clark Kimberling, Sep 28 2002

Keywords

Examples

			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.
		

Crossrefs

Programs

  • 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 *)
  • 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

Formula

a(n) + A075988(n) = n-d(n), where d(n) = A000005(n) is the number of divisors of n.
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