OFFSET
1,1
COMMENTS
Smallest k such that prime(n+1) divides k*prime(n) - 1, n>1.
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..1000
FORMULA
a(n) + A077005(n) = prime(n+1). - Emmanuel Vantieghem, Aug 12 2018
EXAMPLE
a(4) = 8 as prime(5) = 11 divides 8*7 -1, where 7 = prime(4).
a(9) = 24, for a(9)*prime(9) = 24*23 = (-5)*(-6) [mod 29] = 1 [mod prime(10)].
a(14) = 35, for a(14)*prime(14) = 35*43 = (-12)*(-4) [mod 47] = 1 [mod prime(15)].
MAPLE
seq( (1/ithprime(n) mod ithprime(n+1)), n = 1..65); # G. C. Greubel, Aug 09 2019
MATHEMATICA
Table[PowerMod[Prime[n], -1, Prime[n+1]], {n, 65}] (* G. C. Greubel, Aug 09 2019 *)
PROG
(PARI) vector(65, n, lift(Mod(prime(n), prime(n+1))^-1)) \\ Joerg Arndt, Aug 09 2019
(Magma) [InverseMod(NthPrime(n), NthPrime(n+1)): n in [1..65]]; // G. C. Greubel, Aug 09 2019
(Sage) [nth_prime(n).inverse_mod(nth_prime(n+1)) for n in (1..65)] # G. C. Greubel, Aug 09 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Lekraj Beedassy, Apr 23 2002
EXTENSIONS
More terms from Rick L. Shepherd, May 03 2002
STATUS
approved