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.

A082532 a(n) = n^2 - 2*floor(n/sqrt(2))^2.

Original entry on oeis.org

1, 2, 1, 8, 7, 4, 17, 14, 9, 2, 23, 16, 7, 34, 25, 14, 1, 36, 23, 8, 49, 34, 17, 64, 47, 28, 7, 62, 41, 18, 79, 56, 31, 4, 73, 46, 17, 92, 63, 32, 113, 82, 49, 14, 103, 68, 31, 126, 89, 50, 9, 112, 71, 28, 137, 94, 49, 2
Offset: 1

Views

Author

Carmine Suriano, May 01 2003

Keywords

Examples

			a(3)=1 since 3^2 - 2*floor(3/1.4142..)^2 = 9 - 2*2^2 = 9 - 8 = 1.
		

Crossrefs

a(n)=1 for n in A001541.

Programs

  • Magma
    [n^2 - 2*Floor(n/Sqrt(2))^2: n in [1..50]]; // G. C. Greubel, Jan 27 2018
  • Maple
    A049472 := proc(n) floor(n/sqrt(2)) ; end proc:
    A082532 := proc(n) n^2-2*A049472(n)^2 ; end proc:
    seq(A082532(n),n=1..80) ; # R. J. Mathar, Mar 28 2011
  • Mathematica
    Table[n^2 - 2*Floor[n/Sqrt[2]]^2, {n, 1, 100}] (* G. C. Greubel, Jan 27 2018 *)
  • PARI
    for(n=1,50, print1(n^2 - 2*floor(n/sqrt(2))^2, ", ")) \\ G. C. Greubel, Jan 27 2018
    

Formula

a(n) = n^2 - 2*(A049472(n))^2. - R. J. Mathar, Mar 28 2011