This site is supported by donations to The OEIS Foundation.

 Please make a donation to keep the OEIS running. We are now in our 55th year. In the past year we added 12000 new sequences and reached 8000 citations (which often say "discovered thanks to the OEIS"). We need to raise money to hire someone to manage submissions, which would reduce the load on our editors and speed up editing. Other ways to donate

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A270825 a(n) = Sum_{i=0..n} (-1)^floor(i/2)*floor(sqrt(i)). 0
 0, 1, 0, -1, 1, 3, 1, -1, 1, 4, 1, -2, 1, 4, 1, -2, 2, 6, 2, -2, 2, 6, 2, -2, 2, 7, 2, -3, 2, 7, 2, -3, 2, 7, 2, -3, 3, 9, 3, -3, 3, 9, 3, -3, 3, 9, 3, -3, 3, 10, 3, -4, 3, 10, 3, -4, 3, 10, 3, -4, 3, 10, 3, -4, 4, 12, 4, -4, 4, 12, 4, -4, 4, 12, 4, -4, 4 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,6 LINKS FORMULA a(4m)=floor(sqrt(m)), a(4m+1)=floor(3/2*floor(sqrt(4m+1))), a(4m+2)=floor(sqrt(m)), a(4m+3)=-floor((1+sqrt(4m+3))/2). EXAMPLE Letting [] denote the floor function, a(7) = [sqrt(0)]+[sqrt(1)]-[sqrt(2)]-[sqrt(3)]+[sqrt(4)]+[sqrt(5)]-[sqrt(6)]-[sqrt(7)] = 0+1-1-1+2+2-2-2 = -1. MATHEMATICA Print[Table[Sum[(-1)^(Floor[i/2])*Floor[Sqrt[i]], {i, 0, n}], {n, 0, 100}]] PROG (PARI) a(n)=sum(i=0, n, (-1)^(floor(i/2))*floor(sqrt(i))) CROSSREFS Cf. A268173, A022554, A270370, A031876, A032512, A032513, A032514, A032515, A032516, A032517, A032518, A032519, A032520, A032521. Sequence in context: A318577 A157603 A305439 * A059619 A098950 A318873 Adjacent sequences:  A270822 A270823 A270824 * A270826 A270827 A270828 KEYWORD sign,easy AUTHOR John M. Campbell, Mar 23 2016 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 December 13 12:37 EST 2019. Contains 329968 sequences. (Running on oeis4.)