%I #18 Aug 24 2023 07:29:26
%S 1,2,5,14,209,1364,714,62985,367080,728364,64822394,1306238010,
%T 11182598504,715041747420,51913478860880,454746157008780,
%U 9314160363311804,560934821217378530,261062105979210899,696537082207206753590,54097844397380813592485,286495021083846822067820,80126789479717708423427654
%N Smallest m such that the n-th odd prime is the smallest number coprime to m and m+1.
%C A053670(a(n)) = A065091(n) and A053670(m) <> A065091(n) for m < a(n).
%H David A. Corneth, <a href="/A179675/b179675.txt">Table of n, a(n) for n = 1..42</a>
%e n=4: a(4) = 14, A065091(4) = A053670(14) = 11,
%e a(4) = 14 = 2*7, a(4)+1 = 15 = 3*5;
%e n=5: a(5) = 209, A065091(5) = A053670(209) = 13,
%e a(5) = 209 = 11*19, a(5)+1 = 210 = 2*3*5*7;
%e n=6: a(6) = 1364, A065091(6) = A053670(1364) = 17,
%e a(6) = 1364 = 2*2*11*31, a(6)+1 = 1365 = 3*5*7*13.
%e a(6) is not 714 even though 714 * 715 is divisible by the first 6 primes. It is disqualified as it is also a multiple of prime(6+1) = 17. - _David A. Corneth_, Aug 16 2023
%t With[{s = Table[k = 1; While[! CoprimeQ[n, n + 1, Set[p, Prime@ k]], k++]; p, {n, 10^6}]}, Flatten@ Table[FirstPosition[s, Prime@ n], {n, 2, PrimePi@ Max@ s}]] (* _Michael De Vlieger_, Aug 01 2017 *)
%o (PARI) a(n) = {my(res = oo, pr = primes(n+1), mp = pr[#pr], mpm1 = mp - 1); v = vector(n, i, [-1, 0]); forvec(x = v, c = lift(chinese(vector(n, i, Mod(x[i], pr[i])))); if(0 < c && c < res, if(c % mp != 0 && c % mp != mpm1, res = c))); res} \\ _David A. Corneth_, Aug 16 2023
%Y Cf. A053670, A065091.
%K nonn
%O 1,2
%A _Reinhard Zumkeller_, Jul 23 2010; corrected Jul 27 2010
%E a(11)-a(19) from _Donovan Johnson_, Jul 30 2010
%E More terms from _David A. Corneth_, Aug 16 2023