A070858 Smallest prime == 1 mod L, where L = LCM of 1 to n.
2, 3, 7, 13, 61, 61, 421, 2521, 2521, 2521, 55441, 55441, 4324321, 4324321, 4324321, 4324321, 85765681, 85765681, 232792561, 232792561, 232792561, 232792561, 10708457761, 10708457761, 26771144401, 26771144401, 401567166001, 401567166001, 18632716502401, 18632716502401
Offset: 1
Keywords
Links
- Amiram Eldar, Table of n, a(n) for n = 1..1000 (terms 1..200 from R. J. Mathar)
Programs
-
Maple
A070858 := proc(n) local l,p; l := ilcm(seq(i,i=1..n)) ; for p from 1 by l do if isprime(p) then return p; end if; end do: end proc; # R. J. Mathar, Jun 25 2013
-
Mathematica
a[n_] := Module[{m = 1, lcm = LCM @@ Range[n]}, While[!PrimeQ[m], m += lcm]; m]; Array[a, 30] (* Amiram Eldar, Mar 15 2025 *)
-
PARI
a(n)=my(L=lcm(vector(n,i,i)),k=1);while(!ispseudoprime(k+=L),); k \\ Charles R Greathouse IV, Jun 25 2013
Extensions
More terms from Sascha Kurz, Feb 02 2003
Comments