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.

A076816 Squares modulo triangular numbers: n^2 minus the greatest triangular number smaller than or equal to n^2.

Original entry on oeis.org

0, 0, 1, 3, 1, 4, 0, 4, 9, 3, 9, 1, 8, 16, 6, 15, 3, 13, 24, 10, 22, 6, 19, 1, 15, 30, 10, 26, 4, 21, 39, 15, 34, 8, 28, 0, 21, 43, 13, 36, 4, 28, 53, 19, 45, 9, 36, 64, 26, 55, 15, 45, 3, 34, 66, 22, 55, 9, 43, 78, 30, 66, 16, 53, 1, 39, 78, 24, 64, 8, 49, 91, 33, 76, 16, 60, 105, 43
Offset: 0

Views

Author

Floor van Lamoen, Oct 17 2002

Keywords

Crossrefs

Cf. A064784.

Programs

  • Maple
    seq(n^2-floor(sqrt(2*n^2+1/4)-1/2)*floor(sqrt(2*n^2+1/4)+1/2)/2,n=0..100);
  • Mathematica
    smt[n_]:=Module[{x=Floor[(Sqrt[1+8n]-1)/2]},n-(x(x+1))/2]; smt/@(Range[ 0,80]^2) (* Harvey P. Dale, May 12 2014 *)

Formula

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