The code Monitor[Table[With[{lcm = (LCM @@ Range[kk])}, n = 1; While[Max[GCD[lcm, lcm 2 n/# + 1] & /@ Range[kk]] > 1, n++]; 2 n], {kk, 2, 300}], kk] seems to work well. Big slowdown starting at 273. multiples to 300 are 2, 2, 4, 6, 6, 18, 12, 4, 4, 8, 8, 6, 8, 8, 4, 12, 12, 18, 30, 30, 30, 30, 30, 6, 6, 2, 2, 16, 16, 10, 12, 12, 12, 14, 14, 42, 56, 56, 56, 42, 42, 112, 112, 112, 112, 126, 126, 18, 32, 32, 32, 12, 12, 12, 12, 12, 12, 120, 120, 6, 6, 6, 18, 18, 18, 54, 54, 54, 54, 192, 192, 240, 240, 240, 240, 240, 240, 240, 240, 80, 80, 124, 124, 124, 124, 124, 124, 630, 630, 666, 666, 666, 666, 666, 666, 48, 308, 308, 330, 220, 990, 820, 1540, 1540, 1540, 1100, 1100, 1100, 1100, 1100, 1100, 880, 880, 880, 880, 4510, 4510, 4510, 4510, 540, 690, 690, 690, 138, 138, 490, 468, 468, 468, 16, 16, 16, 16, 16, 16, 84, 84, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 1594, 1594, 1170, 1170, 1170, 1170, 1170, 1170, 130, 130, 130, 130, 130, 3120, 858, 858, 858, 858, 7644, 7644, 588, 588, 588, 588, 102, 102, 102, 102, 102, 102, 528, 528, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 828, 828, 48, 48, 48, 114, 210, 210, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 486, 486, 486, 486, 486, 486, 2628, 2628, 2628, 2628, 2628, 2628, 1590, 1590, 1590, 1590, 1302, 1302, 714, 714, 714, 714, 4050, 4050, 4050, 4050, 4050, 4050, 786, 786, 3276, 3276, 1092, 1092, 1092, 1092, 1092, 1092, 1092, 7854, 1904, 1904, 1938, 1938, 1938, 3612, 9830, 9830, 9830, 9830, 9830, 9830, 11764, 11764, 11764, 11764, 11764, 13150, 16436, 16436, 36978, 49266, 49266, 49266, 49266, 49266, 28560, 28560, 28560, 28560, 17374, 17374, 14280, 14280, 24276, 24276, 39100, 39100, 2300, 2300, 2300, 2300, 1746, 4116, 4116, 4116, 4116, 4116, 4116, 4116 --Ed Pegg Jr On Wed, Jan 2, 2019 at 12:18 PM Ed Pegg Jr <ed@mathpuzzle.com> wrote:
At reddit, someone posted that 2017, 2018, 2019 are a prime, 2 times a prime, and 3 times a prime.
13, 14, 15 is the first example.
https://oeis.org/A074200 and https://oeis.org/A093553 are relevant sequences.
In general, we want a number k such that (k+n)/n produces an integer and hopefully a prime for numbers 1 to n.
https://oeis.org/A003418 , LCM@@Range[n] gives the smallest values where (k+n)/n is an integer.
What if we want the smallest prime factor of (k+n)/n to be bigger than n? Then we need k to be some multiple of the LCM.
For n=5 to 40, these multiples seem to be 6, 6, 18, 12, 4, 4, 8, 8, 6, 8, 8, 4, 12, 12, 18, 30, 30, 30, 30, 30, 6, 6, 2, 2, 16, 16, 10, 12, 12, 12, 14, 14, 42, 56, 56, 56
If the multiples are always even, the sequence 41 to 66 continues 42, 42, 112, 112, 112, 112, 126, 126, 18, 32, 32, 32, 12, 12, 12, 12, 12, 12, 120, 120, 6, 6, 6, 18, 18, 18 but I don't know if that's true.
Terms for 26 and 27 are both 2. LCM @@ Range[27] is 80313433200.
2 A003418[27]/n + 1 for n for 1 to 27 has smallest prime factors 29, 31, 41, 43, 71, 101, 113
A multiple of 16 is needed for terms 131 to 136.
--Ed Pegg Jr