%I #12 Dec 04 2017 21:22:31
%S 5,7,1,13,15,19,21,17,31,25,39,43,45,41,55,61,63,69,65,75,73,85,91,99,
%T 103,97,109,111,115,121,133,139,141,151,145,159,165,161,175,181,183,
%U 185,195,199,193,213,217,229,231,235,233,243,253,259,257,271,265,279,283
%N If n-th prime is 8m+1, then a(n) = 8m+3. If n-th prime is 8m+3, then a(n) = 8m+5. If n-th prime is 8m+5, then a(n) = 8m+7. If n-th prime is 8m+7, then a(n) = 8m+1.
%C a(n) is asymptotically equal to prime(n). There are infinitely many a(n) > a(n) and infinitely many a(n+1) < a(n). There are arbitrarily large gaps between a(n) and a(n+1) for sufficiently large n. If Goldbach's conjecture is true, this sequence contains infinitely many primes. Conjecture: for any whole number k, there exists at least one a(n) with exactly k prime factors (for k = 3, for instance, 8*20 + 3 = 163 which is prime and the sequence includes 8*20 + 5 = 3 x 5 x 11).
%H Harvey P. Dale, <a href="/A108763/b108763.txt">Table of n, a(n) for n = 2..1000</a>
%F a(n) = 8*quotient(n-th prime, 8) + mod(2 + n-th prime, 8) = 2 + n-th prime unless mod(n-th prime, 8) = 7 then -6 + n-th prime.
%e Prime(1) = 2, which is not of the form 8m+1, 8m+3, 8m+5, nor 8m+7, hence this sequence starts with a(2) = 5 because prime(2) = 8*0 + 3, so 8*0+5 = 5.
%e Prime(11) = 31 = 8*3 + 7, so a(11) = 8*3 + 1 = 25 = 5^2, which happens not to be a prime.
%t Table[p = Prime[n]; If[ Mod[p, 8] == 7, p - 6, p + 2], {n, 2, 61}] (* _Robert G. Wilson v_, Jun 24 2005 *)
%t Table[If[Mod[n,8]==7,n-6,n+2],{n,Prime[Range[2,100]]}](* _Harvey P. Dale_, Dec 04 2017 *)
%Y Cf. A107323, A108245.
%K easy,nonn
%O 2,1
%A _Jonathan Vos Post_, Jun 19 2005
%E Edited, corrected and extended by _Robert G. Wilson v_, Jun 24 2005