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.

A003560 Least number m such that 4^m == +- 1 (mod 4n + 1).

Original entry on oeis.org

1, 1, 3, 3, 2, 3, 5, 7, 5, 9, 5, 6, 21, 13, 9, 15, 3, 11, 9, 15, 27, 4, 11, 5, 12, 25, 6, 9, 7, 6, 55, 25, 7, 9, 17, 23, 7, 37, 12, 13, 33, 10, 39, 43, 29, 45, 9, 9, 24, 49, 33, 5, 45, 35, 15, 12, 30, 19, 29, 39, 6, 42, 41, 55, 4, 42, 13, 67, 6, 23, 35, 18, 34
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A003573.

Programs

  • Mathematica
    Table[Module[{m=1}, While[PowerMod[4, m, 4 n + 1]!=1 && PowerMod[4, m, 4 n + 1]!=4 n, m++]; m], {n, 0, 70}] (* Vincenzo Librandi, Jun 10 2019 *)
  • PARI
    a(n) = {my(m=1); while (((mm=Mod(4, 4*n+1)^m) != 1) && (mm != 4*n), m++); m;} \\ Michel Marcus, Jun 10 2019

Formula

a(n) <= A003573(n). - Michel Marcus, Jun 10 2019