OFFSET
0,5
COMMENTS
The first numbers which appear twice in the sequence are 0, 1, 7, 26, 77, 220, 608, 1665, 4540, 12356, 33605, 91367, 248383, 675199,... - Giovanni Resta, Feb 26 2014
These numbers appear at roughly exp(n - gamma). - Charles R Greathouse IV, Feb 26 2014
LINKS
Giovanni Resta, Table of n, a(n) for n = 0..1000
FORMULA
a(n) = n - log n + O(1). - Charles R Greathouse IV, Feb 26 2014
EXAMPLE
a(3) = floor(0/1 + 1/2 + 2/3 + 3/4) = floor(1.91666...) = 1.
MATHEMATICA
Floor[Accumulate[Table[i/(i+1), {i, 0, 70}]]] (* Harvey P. Dale, May 18 2023 *)
PROG
(JavaScript)
c=0;
for (i=1; i<50; i++) {
c+=i/(i+1);
document.write(Math.floor(c)+", ");
}
(PARI) a(n)=n-ceil(sum(i=2, n, 1./i)) \\ Charles R Greathouse IV, Feb 26 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
Jon Perry, Feb 26 2014
EXTENSIONS
a(50)-a(67) from Giovanni Resta, Feb 26 2014
STATUS
approved