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.

Showing 1-3 of 3 results.

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

Original entry on oeis.org

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, -2, 1, -2, 1, -2, 1, -2, 1, -2, 1, -2, 1, -2, 1, -2, 1, -2, 1, -2, 1, -2, 1, -2, 1, -2, 1, -2, 1, -2, 1, -2, 1, -2, 1, -2, 1, -2, 2, -2, 2, -2, 2, -2
Offset: 0

Views

Author

John M. Campbell, Mar 15 2016

Keywords

Examples

			a(5) = [0^(1/3)]-[1^(1/3)]+[2^(1/3)]-[3^(1/3)]+[4^(1/3)]-[5^(1/3)] = 0-1+1-1+1-1 = -1, letting [] denote the floor function.
		

Crossrefs

Programs

  • Mathematica
    Print[Table[Sum[(-1)^i*Floor[i^(1/3)],{i,0,n}],{n,0,100}]]
  • PARI
    a(n)=sum(i=0,n,(-1)^i*sqrtnint(i,3))
    
  • PARI
    a(n)=sqrtnint(n,3)*(-1)^n/2-((-1)^(sqrtnint(n,3)+1)+1)/4

Formula

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

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

A270825 a(n) = Sum_{i=0..n} (-1)^floor(i/2)*floor(sqrt(i)).

Original entry on oeis.org

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

Views

Author

John M. Campbell, Mar 23 2016

Keywords

Examples

			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.
		

Crossrefs

Programs

  • Mathematica
    Print[Table[Sum[(-1)^(Floor[i/2])*Floor[Sqrt[i]],{i,0,n}],{n,0,100}]]
  • PARI
    a(n)=sum(i=0,n,(-1)^(floor(i/2))*floor(sqrt(i)))

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).
Showing 1-3 of 3 results.