OFFSET
2,2
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 2..10000
EXAMPLE
We have a(7) = 10 because prime(7)*10 = 170 = 1 [mod 13] = 1 [mod prime(6)].
MAPLE
seq(`mod`(1/ithprime(n), ithprime(n-1)), n = 2..70); # G. C. Greubel, Aug 09 2019
MATHEMATICA
Table[PowerMod[Prime[n], -1, Prime[n - 1]], {n, 2, 68}] (* Geoffrey Critzer, May 16 2015 *)
PROG
(PARI) a(n)=my(p=prime(n-1), g=nextprime(p+1)-p); lift(Mod(1/g, p)) \\ Charles R Greathouse IV, Aug 23 2011
(Magma) [InverseMod(NthPrime(n), NthPrime(n-1)): n in [2..70]]; // G. C. Greubel, Aug 09 2019
(Sage) [nth_prime(n).inverse_mod(nth_prime(n-1)) for n in (2..70)] # G. C. Greubel, Aug 09 2019
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Lekraj Beedassy, Oct 23 2003
EXTENSIONS
Corrected and extended by Ray Chandler, Oct 24 2003
STATUS
approved