login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A316296 a(n) = Sum_{k=1..n} f(k, n), where f(i, j) is the number of multiples of i greater than j and less than 2*j. 0
0, 1, 3, 5, 9, 10, 15, 18, 21, 24, 31, 30, 38, 41, 44, 48, 55, 56, 64, 65, 70, 75, 84, 81, 90, 95, 98, 103, 112, 109, 120, 123, 129, 134, 139, 139, 150, 155, 160, 161, 173, 170, 183, 184, 187, 198, 205, 202, 212, 217, 223, 226, 239, 236, 245, 248, 255, 262, 271, 266, 282, 285, 288 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,3

COMMENTS

f(n, m) is the number of multiples of n that are > m and < 2*m. n and m must be both >= 0.

By definition, this means that f(n, m) =

  0    if n >= 2m;

  1    if m < n < 2m;

If n <= m, then m = kn + q, where 0 <= q < n.

It can be proven that in this case f(n, m) =

  k - 1    if q = 0;

  k        if q > 0 and (n - q) >= q;

  k + 1    if q > 0 and (n - q) < q.

Let sd(n) = A006218; then a(n) = sd(2n-1) - sd(n) - (n - 1).

Also, a(n) = Sum_{k=n+1..2n-1} (d(k) - 1), where d(k) is number of divisors (A000005).

LINKS

Table of n, a(n) for n=1..63.

EXAMPLE

For n = 7, a(7) = f(1,7) + f(2,7) + f(3,7) + f(4,7) + f(5,7) + f(6,7) + f(7,7) = 6 + 3 + 2 + 2 + 1 + 1 = 15.

PROG

(Javascript)

function f(n, m){

    var count = 0;

    for(var i=m+1; i<2*m; i++){

        if(i%n === 0) count++;

    }

    return count;

}

function sf(n){

    var sum = 0;

    for(var i=1; i<=n; i++){

        sum += f(i, n);

    }

    return sum;

}

(PARI) a(n) = n + sum(m = 1, n, (floor((n<<1 - 1) / m) - ceil((n + 1) / m))) \\ David A. Corneth, Jun 29 2018

CROSSREFS

Sequence in context: A269399 A175468 A286065 * A344293 A063038 A236309

Adjacent sequences:  A316293 A316294 A316295 * A316297 A316298 A316299

KEYWORD

nonn,easy

AUTHOR

Andrea La Rosa, Jun 29 2018

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 13 11:17 EDT 2021. Contains 344990 sequences. (Running on oeis4.)