login
a(n) is the least prime p such that there is at least one prime <= p in each congruence class mod prime(n).
3

%I #9 Jan 20 2021 17:57:11

%S 3,7,19,29,43,103,103,191,137,317,311,439,379,463,967,607,709,1061,

%T 1013,829,1021,1319,1201,1493,1499,2143,1973,2459,2333,2203,3697,3089,

%U 3923,2909,3449,4517,3539,4451,3923,4801,4007,4799,4793,3727,5651,4349,5591,4793,6581,8059,6043,9769,5507,6997

%N a(n) is the least prime p such that there is at least one prime <= p in each congruence class mod prime(n).

%C a(n) is the maximum of row n of A340753.

%H Robert Israel, <a href="/A340752/b340752.txt">Table of n, a(n) for n = 1..2000</a>

%e a(3) = 19 because with prime(3)=5, the first primes in each congruence class are 5 == 0 (mod 5), 11 == 1 (mod 5), 2 == 2 (mod 5), 3 == 3 (mod 5), and 19 == 4 (mod 5), and the maximum of these is 19.

%p g:= proc(p) local S,q;

%p S:= {$0..p-1};

%p q:= 1;

%p while S <> {} do

%p q:= nextprime(q);

%p S:= S minus {q mod p};

%p od;

%p q

%p end proc:

%p seq(g(ithprime(i)),i=1..100);

%Y Cf. A340753.

%K nonn

%O 1,1

%A _Robert Israel_, Jan 19 2021