login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A077026
a(n) = Sum_{k=1..n} floor(n/k + 1)-floor(n/k + 1/2).
0
1, 2, 2, 4, 3, 5, 5, 6, 6, 8, 6, 10, 9, 9, 9, 13, 11, 12, 12, 14, 14, 16, 12, 18, 17, 17, 17, 19, 17, 21, 21, 22, 20, 22, 20, 26, 26, 24, 22, 28, 25, 29, 27, 29, 29, 29, 27, 33, 33, 32, 32, 36, 30, 34, 34, 38, 38, 38, 34, 40, 39, 39, 37, 43, 41, 45, 43, 41, 41, 45, 43, 50, 48
OFFSET
1,2
FORMULA
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} 1-f(n,k). - Benedict W. J. Irwin, Sep 22 2016
EXAMPLE
[4/1+1]-[4/1+1/2] + [4/2+1]-[4/2+1/2] + [4/3+1]-[4/3+1/2] + [4/4+1]-[4/4+1/2] = 1+1+1+1 = 4.
MATHEMATICA
Table[Sum[Floor[n/k + 1] - Floor[n/k + 1/2], {k, n}], {n, 73}] (* Michael De Vlieger, Sep 26 2016 *)
PROG
(PARI) a(n) = sum(k=1, n, floor(n/k + 1)-floor(n/k + 1/2)); \\ Michel Marcus, Sep 24 2016
CROSSREFS
Sequence in context: A225381 A007728 A262991 * A060026 A329437 A318632
KEYWORD
nonn
AUTHOR
Clark Kimberling, Oct 18 2002
EXTENSIONS
Duplicate term at a(44) removed by Benedict W. J. Irwin, Sep 22 2016
STATUS
approved