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.

A226295 Multiplicative order of the n-th prime modulo the (n+1)th prime.

Original entry on oeis.org

2, 4, 6, 10, 12, 4, 9, 22, 7, 10, 4, 5, 7, 46, 13, 29, 60, 66, 70, 18, 39, 82, 88, 16, 25, 102, 106, 36, 7, 63, 130, 136, 69, 148, 30, 156, 54, 166, 86, 89, 180, 190, 96, 49, 198, 7, 111, 226, 76, 58, 34, 24, 25, 256, 262, 67, 270, 276, 70, 47, 73, 153, 310
Offset: 1

Views

Author

Emmanuel Vantieghem, Jun 02 2013

Keywords

Comments

a(n) is the smallest positive integer m such that p(n)^m == 1 (mod p(n+1)), where p(n) stands for the n-th prime.

Examples

			a(n) = 2 because 2^2 == 1 (mod 3) but 2^1 !== 1 (mod 3); a(6) = 4 because 13^4 == 1 (mod 17) but 13^u !== 1 (mod 17) for u = 1, 2, 3.
		

Programs

  • Mathematica
    Table[MultiplicativeOrder[Prime[n], Prime[n+1]], {n,80}]
  • PARI
    a(n)=my(p=prime(n));znorder(Mod(p,nextprime(p+1))) \\ Charles R Greathouse IV, Jun 04 2013
    
  • Python
    from sympy import prime, n_order
    def A226295(n): return n_order(prime(n),prime(n+1)) # Chai Wah Wu, Jun 15 2022