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.

A354597 a(n) is the smallest number k>0 such that -n is not a quadratic residue modulo k.

Original entry on oeis.org

3, 4, 5, 3, 4, 4, 3, 5, 4, 3, 7, 5, 3, 4, 7, 3, 4, 4, 3, 11, 4, 3, 5, 9, 3, 4, 5, 3, 4, 4, 3, 5, 4, 3, 8, 7, 3, 4, 7, 3, 4, 4, 3, 7, 4, 3, 5, 5, 3, 4, 7, 3, 4, 4, 3, 11, 4, 3, 8, 7, 3, 4, 5, 3, 4, 4, 3, 5, 4, 3, 7, 5, 3, 4, 8, 3, 4, 4, 3, 11, 4, 3, 5, 9, 3, 4, 5, 3, 4, 4, 3, 5, 4, 3, 7, 9, 3, 4, 7, 3
Offset: 1

Views

Author

Bruno Langlois, Jul 08 2022

Keywords

Comments

All values are prime powers, and every prime power except 2 appears in the sequence. This can be proved using the Chinese remainder theorem.

Crossrefs

Cf. A139401.

Programs

  • PARI
    a(n) = my(k=2); while (issquare(Mod(-n, k)), k++); k; \\ Michel Marcus, Jul 08 2022