cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A262352 a(n) = Sum_{k=0..n} (-1)^k*floor(k^(1/4)).

Original entry on oeis.org

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
Offset: 0

Views

Author

John M. Campbell, Mar 24 2016

Keywords

Examples

			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.
		

Crossrefs

Programs

  • Mathematica
    Print[Table[Sum[(-1)^k*Floor[k^(1/4)],{k,0,n}],{n,0,100}]] ;
  • 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

Formula

a(n) = floor(n^(1/4))*(-1)^n/2-((-1)^(floor(n^(1/4))+1)+1)/4.

Extensions

More terms from Antti Karttunen, Nov 06 2018