This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A006586 a(n) = Sum_{k=1..n} floor((2n-1)/(2k+1)). (Formerly M0988) 0
 1, 2, 4, 6, 8, 10, 14, 15, 18, 22, 24, 27, 31, 33, 37, 40, 44, 47, 51, 53, 57, 63, 65, 68, 73, 75, 81, 85, 87, 91, 97, 100, 104, 108, 112, 115, 121, 125, 129, 134, 136, 142, 146, 148, 156, 160, 164, 166, 173, 176, 180, 188, 190, 194, 200, 202, 208, 214, 218, 223, 227 (list; graph; refs; listen; history; text; internal format)
 OFFSET 2,2 COMMENTS "Nearest integer to" rounds down rather than up when given an exact half-integer. Can also be described as sum_{k=1..n-1} { nearest integer to (n-k)/k }. - Jackson Xier, Oct 04 2011 REFERENCES Marc LeBrun, personal communication. N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence). LINKS M. Le Brun, Email to N. J. A. Sloane, Jul 1991 FORMULA Clearly a(n) = n log n + O(n); a better estimate is surely possible. EXAMPLE Row sums of the triangle with entries floor((2n-1)/(2k+1)): 0; 1,0; 1,1,0; 2,1,1,0; 3,1,1,1,0; 3,2,1,1,1,0; 4,2,1,1,1,1,0; 5,3,2,1,1,1,1,0; 5,3,2,1,1,1,1,1,0; 6,3,2,2,1,1,1,1,1,0; 7,4,3,2,1,1,1,1,1,1,0; MAPLE N:=proc(x) local t1; t1:=floor(x); if x-t1 = 1/2 then t1 else floor(x+1/2); fi; end; f:=n->add(N((n-k)/k), k=1..n-1); [seq(f(n), n=1..120)]; MATHEMATICA Sum[Floor[(-1 + 2 n)/(1 + 2 k)], {k, 1, n}] (* Jackson Xier, Oct 04 2011 *) PROG (PARI) a(n)=sum(k=1, n, (2*n-1)\(2*k+1)) \\ Charles R Greathouse IV, Oct 04 2011 CROSSREFS Sequence in context: A121832 A253241 A302979 * A260391 A022292 A225241 Adjacent sequences:  A006583 A006584 A006585 * A006587 A006588 A006589 KEYWORD nonn,easy AUTHOR EXTENSIONS More terms from Gareth McCaughan (gareth.mccaughan(AT)pobox.com), Jun 10 2004 Maple code from N. J. A. Sloane, Oct 02 2011 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 | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified October 23 01:36 EDT 2018. Contains 316518 sequences. (Running on oeis4.)