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!)
A262352 a(n) = Sum_{k=0..n} (-1)^k*floor(k^(1/4)). 1
0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -2, 1, -2, 1, -2, 1, -2, 1, -2, 1, -2, 1, -2, 1, -2, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,82
LINKS
FORMULA
a(n) = floor(n^(1/4))*(-1)^n/2-((-1)^(floor(n^(1/4))+1)+1)/4.
EXAMPLE
Letting [] denote the floor function, a(7) = [0^(1/4)] - [1^(1/4)] + [2^(1/4)] - [3^(1/4)] + [4^(1/4)] - [5^(1/4)] + [6^(1/4)] - [7^(1/4)] = 0 - 1 + 1 - 1 + 1 - 1 + 1 - 1 = -1.
MATHEMATICA
Print[Table[Sum[(-1)^k*Floor[k^(1/4)], {k, 0, n}], {n, 0, 100}]] ;
PROG
(PARI) a(n)=floor(n^(1/4))*(-1)^n/2-((-1)^(floor(n^(1/4))+1)+1)/4
(PARI) a(n)=sum(k=0, n, (-1)^k*floor(k^(1/4)))
(PARI) A262352(n) = sum(k=0, n, ((-1)^k)*sqrtnint(k, 4)); \\ Antti Karttunen, Nov 06 2018
CROSSREFS
Sequence in context: A371384 A022927 A063435 * A167964 A280193 A327767
KEYWORD
sign,easy
AUTHOR
John M. Campbell, Mar 24 2016
EXTENSIONS
More terms from Antti Karttunen, Nov 06 2018
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 March 28 16:34 EDT 2024. Contains 371254 sequences. (Running on oeis4.)