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

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A081946 a(n) = Sum_{i=1..n} floor(r*floor(i/r)), where r=sqrt(2). 1
 0, 1, 3, 5, 9, 14, 19, 26, 34, 43, 52, 63, 75, 87, 101, 116, 132, 148, 166, 185, 204, 225, 247, 269, 293, 318, 344, 370, 398, 427, 456, 487, 519, 552, 585, 620, 656, 692, 730, 769, 808, 849, 891, 934, 977, 1022, 1068, 1114, 1162, 1211, 1261, 1311, 1363, 1416 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,3 COMMENTS More generally if r is irrational 1 < r < 2 then Sum_{i=1..n} floor(r*floor(i/r)) = n*(n+1)/2 - floor((1-1/r)*n); if r > 2, there is the asymptotic formula Sum_{i=1..n} floor(r*floor(i/r)) = n*(n+1)/2 - ceiling(r)*(1-floor(r)/(2*r))*n + O(1). LINKS G. C. Greubel, Table of n, a(n) for n = 1..5000 FORMULA a(n) = n*(n+1)/2 - floor((1-1/sqrt(2))*n). MATHEMATICA Table[Sum[Floor[Sqrt[2] Floor[k/Sqrt[2]]], {k, n}], {n, 50}] (* G. C. Greubel, Oct 01 2018 *) PROG (PARI) a(n) = sum(i=1, n, floor(sqrt(2)*floor(i/sqrt(2)))); \\ Michel Marcus, Dec 04 2013 (MAGMA) [(&+[Floor(Sqrt(2)*Floor(k/Sqrt(2))): k in [1..n]]): n in [1..50]]; // G. C. Greubel, Oct 01 2018 CROSSREFS Sequence in context: A118002 A069533 A054066 * A166709 A310040 A215369 Adjacent sequences:  A081943 A081944 A081945 * A081947 A081948 A081949 KEYWORD nonn AUTHOR Benoit Cloitre, Jun 13 2003 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.

Last modified May 9 13:42 EDT 2021. Contains 343742 sequences. (Running on oeis4.)