OFFSET
1,2
COMMENTS
a(n) is the smallest positive integer m with the property that p(n+1)^m == 1 (mod p(n)), where p(n) stands for the n-th prime; it is always a divisor of p(n)-1. For n < 10^8, a(n) is never equal to A226295(n).
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..20000
EXAMPLE
a(2) = 2 because 5^2 == 1 (mod 3) but 5^1 !== 1(mod 3).
a(6) = 6 because 17^6 == 1 (mod 13) but 17^u !== 1 (mod 13) for u < 6.
MATHEMATICA
Table[MultiplicativeOrder[Prime[n+1], Prime[n]], {n, 1, 75}]
PROG
(PARI) vector(80, n, p = prime(n); znorder(Mod(nextprime(p+1), p))) \\ Michel Marcus, Feb 09 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
Emmanuel Vantieghem, Jun 05 2013
STATUS
approved