login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

a(n) is the smallest k such that prime(k+i) (mod 6) takes successively the values 5,1,5,1... for i = 0, 1,...,n-1 ending with 1 or 5.
0

%I #8 Jan 27 2015 15:46:56

%S 3,3,3,3,3,3,3,24,24,140,140,140,140,140,140,140,140,140,140,140,140

%N a(n) is the smallest k such that prime(k+i) (mod 6) takes successively the values 5,1,5,1... for i = 0, 1,...,n-1 ending with 1 or 5.

%C If a(22) exists, k > 10^5.

%e a(1)= 3 => prime(3) (mod 6)= 5;

%e a(2)= 3 => prime(3) (mod 6)= 5, prime(4) (mod 6) = 1;

%e a(3)= 3 => prime(3) (mod 6)= 5, prime(4) (mod 6)= 1, prime(5) (mod 6)= 5.

%p with(numtheory):

%p for n from 1 to 35 do :

%p ii:=0:

%p for k from 3 to 10^5 while (ii=0)do :

%p s:=0:

%p for i from 0 to n-1 do:

%p r:=irem(ithprime(k+i),6):

%p if r = irem(5^(i+1),6)

%p then

%p s:=s+1:

%p else

%p fi:

%p od:

%p if s=n and ii=0

%p then

%p printf ( "%d %d \n",n,k):ii:=1:

%p else

%p fi:

%p od:

%p od:

%Y Cf. A039704, A247816, A247967, A247969.

%K nonn,more

%O 1,1

%A _Michel Lagneau_, Sep 28 2014