login
a(n) = smallest prime p = z + x, where x is the n-th odd composite number not divisible by 5 and z is a multiple of 10.
1

%I #11 Dec 03 2024 15:10:47

%S 19,31,37,43,59,59,61,67,73,79,97,101,97,101,103,109,131,127,139,131,

%T 163,139,163,151,163,157,163,179,181,179,181,197,193,197,199,211,223,

%U 227,229,223,227,229,241,241,257,263,257,269,263,269,271,277,283,349

%N a(n) = smallest prime p = z + x, where x is the n-th odd composite number not divisible by 5 and z is a multiple of 10.

%C Conjecture: for every odd (prime or nonprime) number x>=1 that is not a multiple of 5 there exists a prime p such that p = z + x; where z is a multiple of 10.

%H Harvey P. Dale, <a href="/A125148/b125148.txt">Table of n, a(n) for n = 1..1000</a>

%e The first and second odd composite number not divisible by 5 are 9 and 21, thus 19 = 10 + 9 and 31 = 10 + 21 are the first and second term of the sequence.

%t Module[{nn=300,oddcomps,z},oddcomps=Select[Range[3,nn,2],!PrimeQ[#] && !Divisible[#,5]&];Table[z=10;While[!PrimeQ[z+oddcomps[[n]]],z=z+10];z+oddcomps[[n]],{n,Length[oddcomps]}]] (* _Harvey P. Dale_, Oct 01 2013 *)

%o (PARI) {m=280;for(x=2,m,if(x%2!=0&&x%5!=0&&!isprime(x),z=10;while(z<10^5&&!isprime(a=z+x),z+=10);print1(if(z<10^5,a,0),", ")))} \\ _Klaus Brockhaus_, Jan 24 2007

%K nonn

%O 1,1

%A _Tomas Xordan_, Jan 11 2007

%E Edited by _Klaus Brockhaus_, Jan 24 2007