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.

A240666 Least k such that k^m == -1 (mod prime(n)) has a solution for some m.

Original entry on oeis.org

3, 2, 2, 3, 2, 2, 2, 2, 5, 2, 3, 2, 2, 2, 5, 2, 2, 2, 2, 7, 3, 3, 2, 3, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 2, 3, 2, 2, 5, 2, 2, 2, 7, 2, 2, 3, 2, 3, 2, 2, 3, 7, 2, 2, 2, 5, 2, 3, 2, 2, 2, 2, 2, 11, 2, 2, 2, 3, 2, 2, 2, 7, 3, 2, 2, 5, 2, 2, 2, 2, 2, 2, 7, 2, 3, 2, 2
Offset: 1

Views

Author

T. D. Noe, Apr 15 2014

Keywords

Comments

Looking at sequences A240657-A240665, one sees many 0 terms. This sequence finds the least k having a solution. Is the least k always prime?

Crossrefs

Programs

  • Mathematica
    Table[p = Prime[n]; k = 2; While[s = Select[Range[p/2], PowerMod[k, #, p] == p - 1 &, 1]; s == {}, k++]; k, {n, 100}]