%I #23 Dec 02 2023 19:57:47
%S 2,3,7,5,11,13,29,17,19,31,23,37,53,43,61,97,103,73,191,41,127,67,47,
%T 193,101,79,109,113,59,151,311,257,199,137,71,181,149,229,157,241,83,
%U 211,173,89,271,139,283,337,197,251,307,313,107,163,331,281
%N a(n) = the smallest value of the form n*k + 1, k = positive integer, that is coprime to all the previous terms of this sequence.
%C Are there any composites in this sequence? If not, is this sequence a permutation of the primes?
%C This sequence is a permutation of the primes. See links. - _Alain Rousseau_, Oct 25 2023
%H Michael De Vlieger, <a href="/A139317/b139317.txt">Table of n, a(n) for n = 1..1000</a> (first 100 terms from Andrew V. Sutherland)
%H les-mathematiques.net, <a href="https://les-mathematiques.net/vanilla/index.php?p=/discussion/2335461/les-suites-a139317-a132948">Les suites A139317 & A132948</a>
%H Andrew V. Sutherland, <a href="/A139317/a139317.txt">Comments on A139317 and A139319</a>
%e For a(7) we check: 7*1 +1= 8, which is not coprime to a(1)=2. 7*2 +1= 15, which is not coprime to either a(2)=3 or to a(4)=5. 7*3 +1 = 22, which is not coprime to either a(1)=2 or to a(5)=11. But 7*4+1 = 29, which is coprime to terms a(1) through a(6). So a(7) = 29.
%t Fold[Append[#1, SelectFirst[#2 Range@ 120 + 1, Function[k, CoprimeQ @@ Append[#1, k]]]] &, {2}, Range[2, 56]] (* _Michael De Vlieger_, Oct 22 2017 *)
%Y Cf. A139318, A139319.
%K nonn
%O 1,1
%A _Leroy Quet_, Apr 13 2008
|