The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A359272 Array read by downward antidiagonals: for m >= 3 and n >= 1, T(m,n) is the first prime that starts a string of exactly n consecutive primes that are congruent (mod m). 0

%I #33 Dec 31 2022 02:32:12

%S 2,23,2,47,7,2,251,89,139,2,1889,199,1627,23,2,1741,883,18839,47,113,

%T 2,19471,12401,123229,251,5939,89,2,118801,463,776257,1889,158867,

%U 1823,523,2,498259,36551,3873011,1741,894287,20809,15823,139,2,148531,11593,23884639,19471,6996307,73133,74453,1627,1129,2,406951,183091

%N Array read by downward antidiagonals: for m >= 3 and n >= 1, T(m,n) is the first prime that starts a string of exactly n consecutive primes that are congruent (mod m).

%C T(m,n) is the first prime prime(k) such that prime(k) == prime(j) (mod m) for k <= j <= k+n-1 but not for j = k-1 or k+n.

%C T(m,1) = 2.

%C T(m,k) = T(2*m,k) if k is odd.

%e The array starts with row 3 as follows:

%e 2 23 47 251 1889 1741 19471

%e 2 7 89 199 883 12401 463

%e 2 139 1627 18839 123229 776257 3873011

%e 2 23 47 251 1889 1741 19471

%e 2 113 5939 158867 894287 6996307 9984437

%e 2 89 1823 20809 73133 989647 3250469

%e T(3,4) = 251 because the 4 consecutive primes starting at 251 are 251,257,263,269, which are all congruent mod 3, but the previous prime 241 and the next prime 271 are not congruent to 251 (mod 3).

%p P:= select(isprime,[2,seq(i,i=3..3*10^7,2)]): nP:= nops(P):

%p M:= Matrix(20,20):

%p for m from 3 to 20 do

%p x:= 2; a:= 1; r:= 1;

%p for j from 2 to nP do

%p v:= P[j] mod m;

%p if v <> a then

%p w:= j - r;

%p if M[m,w] = 0 then M[m,w]:= P[r] fi;

%p a:= v; r:= j;

%p fi;

%p od

%p od:

%p M[3..20,1..10];

%K nonn,tabl

%O 3,1

%A _Robert Israel_, Dec 27 2022

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 15 14:34 EDT 2024. Contains 372540 sequences. (Running on oeis4.)