OFFSET
1,2
COMMENTS
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
Umberto Cerruti, Il Teorema Cinese dei Resti (in Italian), 2015. The sequence is on page 21.
Eric Weisstein's World of Mathematics, Modular Inverse
MAPLE
with(numtheory): P:=proc(q) local a, n; a:=[];
for n from 1 to q do a:=[op(a), n]; if isprime(n+1) then print(lcm(op(a))^(-1) mod (n+1)); fi;
od; end: P(10^3); # Paolo P. Lava, Feb 16 2015
MATHEMATICA
r[k_] := LCM @@ Range[k]; t[k_] := PowerMod[r[k - 1], -1, k]; Table[t[Prime[n]], {n, 1, 70}]
PROG
(Magma) [Modinv(Lcm([1..p-1]), p): p in PrimesUpTo(400)];
(Sage) [inverse_mod(lcm([1..p-1]), p) for p in primes(400)]
(PARI) a(n) = lift(1/Mod(lcm(vector(prime(n)-1, k, k)), prime(n))); \\ Michel Marcus, Feb 13 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
Bruno Berselli, Feb 13 2015 - proposed by Umberto Cerruti (Department of Mathematics "Giuseppe Peano", University of Turin, Italy)
STATUS
approved