%I #11 Apr 20 2017 15:22:19
%S 7,1,1,1,1,5,1,1,1,5,1,1,17,1,5,1,1,5,5,1,7,5,5,5,1,1,13,7,5,1,11,1,1,
%T 5,1,17,19,17,19,5,25,5,1,7,5,13,11,5,1,5,5,7,1,1,19,1,1,17,5,7,29,1,
%U 5,1,5,7,7,17,1,7,7,1,7,49,5,13,13,25,5,5,23
%N a(n) is the smallest positive integer that makes a(n)*A007694(n)-1 a prime number, while a(n) and A007694(n) are coprimes.
%C All terms are elements of A007310, which are free of prime factor 2 and 3, since if a(n) has a factor of 2, 2*A007694(n) is also an element of A007694. Ditto for a(n) is divisible by 3 cases.
%C a(1) is not defined since any odd number greater than 3 minus 1 is an even nonprime number.
%H Lei Zhou, <a href="/A285483/b285483.txt">Table of n, a(n) for n = 2..10001</a>
%e For n = 2, A007694(2) = 2, testing k*2-1 for k in set {1, 5, 7, 11, 13, 17, 19... }, we find that 7*2 - 1 = 13 is the first prime number found. So a(2) = 7;
%e In the similar way, 1*A007694(3) - 1 = 1*4 - 1 = 3 is the first prime number found for n = 3, so a(3) = 1.
%e For n = 7, A007694(7) = 16, 5*16 - 1 = 89 is the smallest prime found, so a(7) = 5.
%t b = 2; a = {b}; sm = {}; r = a; While[Length[sm] < 81, f = 0;
%t While[f++; (fc = FactorInteger[f];
%t MemberQ[{2, 3}, fc[[1, 1]]]) || (! PrimeQ[f*a[[Length[a]]] - 1])];
%t AppendTo[sm, f]; c = r*2; d = r*3; e = Sort[Union[c, d]]; i = 1;
%t While[e[[i]] <= a[[Length[a]]], i++]; AppendTo[a, e[[i]]];
%t AppendTo[r, e[[i]]];
%t While[(3*r[[1]]) < r[[Length[r]]], r = Delete[r, 1]]]; sm
%Y Cf. A003586, A007310, A007694.
%K nonn,easy
%O 2,1
%A _Lei Zhou_, Apr 19 2017
|