A254939 a(n) = (A099795(n)^-1 mod p)*A099795(n), where p = prime(n).
1, 4, 36, 120, 2520, 277200, 5045040, 183783600, 4655851200, 80313433200, 32607253879200, 2743667504978400, 58772246027695200, 5038384364010597600, 56517528952814529600, 34089489546705963770400, 7391221142626702144764000
Offset: 1
Keywords
Examples
5045040 is the seventh term of the sequence because the modular inverse of A099795(7) mod A000040(7) is 7 and 7*A099795(7) = 7*720720 = 5045040.
Links
- Umberto Cerruti, Il Teorema Cinese dei Resti (in Italian), 2015. The sequence is on page 21.
- Eric Weisstein's World of Mathematics, Modular Inverse.
Programs
-
Magma
[Modinv(Lcm([1..p-1]),p)*Lcm([1..p-1]): p in PrimesUpTo(60)];
-
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))*(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]; u[k_] := PowerMod[r[k - 1], -1, k] r[k - 1]; Table[u[Prime[n]], {n, 1, 20}]
-
PARI
a099795(n) = lcm(vector(prime(n)-1, k, k)); a(n) = {my(m = a099795(n)); m*lift(1/Mod(m, prime(n)));} \\ Michel Marcus, Feb 13 2015
Comments