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.

A381924 Multiplicative order of n mod prime(n).

Original entry on oeis.org

1, 2, 4, 3, 5, 12, 16, 6, 11, 28, 30, 9, 40, 21, 46, 13, 29, 60, 33, 7, 24, 13, 41, 88, 48, 100, 34, 106, 54, 7, 63, 26, 136, 23, 74, 75, 39, 9, 166, 86, 178, 5, 95, 192, 196, 99, 105, 222, 113, 228, 29, 34, 120, 250, 256, 262, 67, 270, 46, 8, 47, 292, 153, 155, 312
Offset: 1

Views

Author

Giorgos Kalogeropoulos, Mar 12 2025

Keywords

Comments

a(n) is the least k such that prime(n) divides n^k-1.

Examples

			a(12) = 9 because the multiplicative order of 12 mod prime(12) is 9.
		

Crossrefs

Cf. A226295, A014664, A091185 (n^(-1) mod prime(n)).

Programs

  • Magma
    [Order(n, NthPrime(n)) : n in [1..65]]; // Vincenzo Librandi, Mar 25 2025
  • Mathematica
    Table[MultiplicativeOrder[n,Prime[n]],{n,65}]
  • PARI
    a(n) = znorder(Mod(n, prime(n))); \\ Michel Marcus, Mar 12 2025
    

Formula

If n is a primitive root modulo prime(n), a(n) = prime(n) - 1.