login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A086849 Sum of first n nonsquares. 10
2, 5, 10, 16, 23, 31, 41, 52, 64, 77, 91, 106, 123, 141, 160, 180, 201, 223, 246, 270, 296, 323, 351, 380, 410, 441, 473, 506, 540, 575, 612, 650, 689, 729, 770, 812, 855, 899, 944, 990, 1037, 1085, 1135, 1186, 1238, 1291, 1345, 1400, 1456, 1513, 1571, 1630 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
FORMULA
From Jonathan Vos Post, Aug 28 2005: (Start)
a(n) = Sum_{i=1..n} A000037(i).
a(n) = Sum_{i=1..n} (i + floor(1/2 + sqrt(i))).
a(n) = A000217(A000037(n)) -(1/3)*(2*A000196(n)+1)*A000217(A000196(A000037(n))). (End)
a(n) = floor(1/2 + (n + sqrt(n))*(n/2 + sqrt(n)/6 + 1/3) - (floor(1/2 + sqrt(n)) - sqrt(n))^2*sqrt(n)). - Graeme McRae, Aug 28 2007
a(n) = n^2/2 + 2n*sqrt(n)/3 + O(n). - Charles R Greathouse IV, Aug 28 2016
MATHEMATICA
Accumulate[Table[n + Round[Sqrt[n]], {n, 120}]] (* Vladimir Joseph Stephan Orlovsky, Jul 08 2011 *)
PROG
(Haskell)
a086849 n = a086849_list !! (n-1)
a086849_list = scanl1 (+) a000037_list
-- Reinhard Zumkeller, Oct 26 2015
(PARI) a(n)=my(k=n+(sqrtint(4*n)+1)\2, s=sqrtint(k)); k*(k+1)/2 - s*(s+1)*(2*s+1)/6 \\ Charles R Greathouse IV, Aug 28 2016
(Python)
from math import isqrt
def A086849(n): return (m:= n + isqrt(n + isqrt(n)))*(m + 1)//2 - (k:=isqrt(m))*(k + 1)*(2*k + 1)//6 # Chai Wah Wu, Mar 31 2022
CROSSREFS
Sequence in context: A135061 A323624 A348387 * A131938 A031871 A026056
KEYWORD
nonn,easy
AUTHOR
Reinhard Zumkeller, Aug 18 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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 12:33 EDT 2024. Contains 371969 sequences. (Running on oeis4.)