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.

A240663 Least k such that 8^k == -1 (mod prime(n)), or 0 if no such k exists.

Original entry on oeis.org

0, 1, 2, 0, 5, 2, 4, 3, 0, 14, 0, 6, 10, 7, 0, 26, 29, 10, 11, 0, 0, 0, 41, 0, 8, 50, 0, 53, 6, 14, 0, 65, 34, 23, 74, 0, 26, 27, 0, 86, 89, 30, 0, 16, 98, 0, 35, 0, 113, 38, 0, 0, 4, 25, 8, 0, 134, 0, 46, 35, 47, 146, 17, 0, 26, 158, 5, 0, 173, 58, 44, 0, 0, 62
Offset: 1

Views

Author

T. D. Noe, Apr 14 2014

Keywords

Comments

The least k, if it exists, such that prime(n) divides 8^k + 1.

Crossrefs

Cf. A211244 (order of 8 mod prime(n)).

Programs

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

Formula

a(n) = A211244(n)/2 if A211244(n) is even, otherwise 0.