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.

A336302 a(n) = n^2 mod ceiling(sqrt(n)).

Original entry on oeis.org

0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 4, 4, 1, 0, 1, 4, 4, 1, 0, 4, 3, 4, 1, 0, 1, 4, 3, 4, 1, 0, 4, 2, 2, 4, 1, 0, 1, 4, 2, 2, 4, 1, 0, 4, 1, 0, 1, 4, 1, 0, 1, 4, 1, 0, 1, 4, 1, 0, 4, 0, 7, 7, 0, 4, 1, 0, 1, 4, 0, 7, 7, 0, 4, 1, 0, 4, 9, 6, 5, 6, 9, 4, 1, 0, 1, 4, 9, 6, 5, 6, 9, 4, 1, 0, 4, 9, 5, 3, 3, 5, 9, 4
Offset: 1

Views

Author

William Phoenix Marcum, Oct 05 2020

Keywords

Comments

A pattern emerges for certain values where ceiling(sqrt(n)) is the same.

Crossrefs

Programs

  • Mathematica
    Table[Mod[n^2, Ceiling @ Sqrt[n]], {n, 100}] (* Amiram Eldar, Oct 05 2020 *)
  • PARI
    a(n) = lift(Mod(n, ceil(sqrt(n)))^2); \\ Michel Marcus, Oct 05 2020

Formula

a(n) = A000290(n) mod A003059(n). - Michel Marcus, Oct 05 2020
a(n^2) = 0. - Michel Marcus, Oct 07 2020