Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A132295
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A132295 Sum of the first n nonsquare numbers. +0
1
0, 2, 5, 5, 10, 16, 23, 31, 31, 41, 52, 64, 77, 91, 106, 106, 123, 141, 160, 180, 201, 223, 246, 270, 270, 296, 323, 351, 380, 410, 441, 473, 506, 540, 575, 575, 612, 650, 689, 729, 770, 812, 855, 899, 944, 990, 1037, 1085, 1085, 1135, 1186, 1238, 1291, 1345 (list; graph; listen)
OFFSET

1,2

FORMULA

Let r = floor(sqrt(n)). Then a(n) = n(n+1)/2 - r(r+1)(2r+1)/6.

EXAMPLE

Let n=5.

The sum of the nonsquare numbers <= 5 is 2+3+5 = 10, the 5-th entry in the sequence.

PROGRAM

(PARI) sumNsq(n)= { for(x=1, n, r=floor(sqrt(x)); sq=r*(r+1)*(2*r+1)/6; sn=x*(x+1)/2; print1(sn-sq", ")) }

CROSSREFS

Sequence in context: A059797 A034387 A081240 this_sequence A086651 A074495 A081467

Adjacent sequences: A132292 A132293 A132294 this_sequence A132296 A132297 A132298

KEYWORD

nonn

AUTHOR

Cino Hilliard (hillcino368(AT)hotmail.com), Nov 07 2007

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified November 27 22:38 EST 2009. Contains 167602 sequences.


AT&T Labs Research