login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

a(n) is the least prime == prime(i-1) (mod prime(i)) for 2 <= i <= n.
1

%I #14 Mar 26 2022 14:33:34

%S 2,23,173,2273,2273,1473743,25978223,113275433,10152454583,

%T 10152454583,27286379112263,4509412212537503,58057458593326463,

%U 3420327120832524173,178049025375964084613,23055638276363375485073,1049809665258712924748453,110949022999023044736072443,7819962464608765026553459733

%N a(n) is the least prime == prime(i-1) (mod prime(i)) for 2 <= i <= n.

%C All the terms > 2 end with 3, because these primes p are == 3 (mod 5) and cannot end with 8. - _Bernard Schott_, Mar 25 2022

%H Robert Israel, <a href="/A352355/b352355.txt">Table of n, a(n) for n = 2..349</a>

%e a(3) = 23 because 23 is the least prime p with p == 2 (mod 3) and p == 3 (mod 5).

%p R:= NULL:

%p m:= 1: P:= [2]: p:= 2: t:= 1:

%p for n from 2 to 20 do

%p q:= p; p:= nextprime(p);

%p P:= [op(P),p];

%p t:= chrem([t,q],[m,p]);

%p m:= m*p;

%p for x from t by m do if isprime(x) then break fi od:

%p R:= R,x;

%p od:

%p R;

%Y Cf. A030431.

%K nonn

%O 2,1

%A _J. M. Bergot_ and _Robert Israel_, Mar 12 2022