login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A022554 a(n) = Sum_{k=0..n} floor(sqrt(k)). 11
0, 1, 2, 3, 5, 7, 9, 11, 13, 16, 19, 22, 25, 28, 31, 34, 38, 42, 46, 50, 54, 58, 62, 66, 70, 75, 80, 85, 90, 95, 100, 105, 110, 115, 120, 125, 131, 137, 143, 149, 155, 161, 167, 173, 179, 185, 191, 197, 203, 210, 217, 224, 231, 238, 245, 252, 259, 266, 273, 280 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

COMMENTS

Partial sums of A000196. - Michel Marcus, Mar 01 2016

REFERENCES

R. L. Graham, D. E. Knuth, and O. Patashnik, Concrete Mathematics, 2nd Edition, Addison-Wesley, 1994, Eq. 3.27 on page 87.

D. E. Knuth, The Art of Computer Programming, Vol. 1, 3rd Edition, Addison-Wesley, 1997, Ex. 43 of section 1.2.4.

K. H. Rosen, Discrete Mathematics and Its Application, 6th Edition, McGraw-Hill, 2007, Ex. 25 of section 2.4.

LINKS

G. C. Greubel, Table of n, a(n) for n = 0..1000

M. Griffiths, More sums involving the floor function, Math. Gaz., 86 (2002), 285-287.

FORMULA

a(0)=0, a(1)=1; a(n) = 2 a(n-1) - a(n-2) if n is not a perfect square; a(n) = 2 a(n-1) - a(n-2) + 1 if n is a perfect square.

a(n) = floor(sqrt(n)) * (n-1/6*(2*floor(sqrt(n))+5)*(floor(sqrt(n))-1)). - Yong Kong (ykong(AT)curagen.com), Mar 10 2001

a(n) = 2/3 n^(3/2) - 1/2 n + O(sqrt(n)). - Charles R Greathouse IV, Jan 12 2012

G.f.: Sum_{k>=1} x^(k^2)/(1 - x)^2. - Ilya Gutkovskiy, Dec 22 2016

EXAMPLE

G.f. = x + 2*x^2 + 3*x^3 + 5*x^4 + 7*x^5 + 9*x^6 + 11*x^7 + 13*x^8 + 16*x^9 + ...

MAPLE

Sum(floor(sqrt(k)), k=0..n)

MATHEMATICA

Accumulate[Floor[Sqrt[Range[0, 60]]]] (* Harvey P. Dale, Feb 16 2011 *)

Table[Sum[Floor[Sqrt[i]], {i, 0, n}], {n, 0, 50}] (* G. C. Greubel, Dec 22 2016 *)

PROG

(PARI) a(n)=sum(k=1, n, sqrtint(k)) \\ Charles R Greathouse IV, Jan 12 2012

(PARI) a(n)=my(k=sqrtint(n)); k*(n-(2*k+5)/6*(k-1)) \\ Charles R Greathouse IV, Jan 12 2012

CROSSREFS

Cf. A000196.

Sequence in context: A096149 A033055 A186390 * A097046 A248420 A011861

Adjacent sequences:  A022551 A022552 A022553 * A022555 A022556 A022557

KEYWORD

nonn,easy

AUTHOR

Michel Tixier (tixier(AT)dyadel.net)

EXTENSIONS

More terms from Yong Kong (ykong(AT)curagen.com), Mar 10 2001

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.

License Agreements, Terms of Use, Privacy Policy .

Last modified March 25 21:19 EDT 2017. Contains 284111 sequences.