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.

A077024 a(n) = Sum_{k=1..n} floor(n/k + 1/2).

Original entry on oeis.org

1, 3, 6, 8, 12, 15, 18, 22, 26, 29, 34, 37, 41, 46, 51, 53, 58, 64, 67, 72, 77, 80, 87, 90, 95, 100, 105, 110, 115, 120, 123, 129, 136, 139, 146, 150, 153, 160, 167, 170, 176, 181, 186, 191, 198, 203, 208, 213, 217, 225, 230, 233, 242, 247, 252, 257, 262, 267
Offset: 1

Views

Author

Clark Kimberling, Oct 18 2002

Keywords

Comments

Number of ways the numbers from 1..n can divide the numbers from n+1..2n. For example, a(4) = 8; there are 8 ways that the numbers from 1..4 divide the numbers 5..8. 1 divides 5,6,7,8 (4 ways) + 2 divides 6,8 (2 ways) + 3 divides 6 (1 way) + 4 divides 8 (1 way) = 8 ways. - Wesley Ivan Hurt, Feb 07 2022

Examples

			[4/1 + 1/2] + [4/2 + 1/2] + [4/3 + 1/2] + [4/4 + 1/2] = 4+2+1+1 = 8 = a(4).
		

Crossrefs

Programs

  • PARI
    a(n) = sum(k=1, n, floor(n/k+1/2)); \\ Michel Marcus, Feb 07 2022

Formula

a(n) = n^2 - Sum_{k=1..n} Sum_{i=n+1..2n} sign(i mod k). - Wesley Ivan Hurt, Feb 08 2022