This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A204911 #17 Jun 25 2024 11:24:51 %S A204911 5,5,5,7,7,5,5,5,5,7,7,5,5,5,7,7,7,5,5,11,5,7,7,5,11,5,5,13,13,7,5,5, %T A204911 5,7,13,5,5,5,5,7,7,5,11,17,7,7,7,5,5,11,5,7,7,5,17,5,13,13,13,7,5,5, %U A204911 5,7,7,5,5,5,11,13,7,7,5,5,7,7,13,5,5,17,5,7,7,5,11,11,5,13,13,7,11,5,5 %N A204911 The prime q>=5 such that n divides p-q, where p>q is the least prime for which such a prime q exists. %C A204911 For a guide to related sequences, see A204892. %H A204911 Robert Israel, <a href="/A204911/b204911.txt">Table of n, a(n) for n = 1..10000</a> %p A204911 f:= proc(n) local V,q,r; %p A204911 V:= Array(0..n-1); q:= 4; %p A204911 do %p A204911 q:= nextprime(q); %p A204911 r:= q mod n; %p A204911 if V[r] = 0 then V[r]:= q %p A204911 else return V[r] %p A204911 fi %p A204911 od %p A204911 end proc: %p A204911 map(f, [$1..100]); # _Robert Israel_, Jul 24 2018 %t A204911 (See the program at A204908.) %o A204911 (Python) %o A204911 from sympy import nextprime %o A204911 def a(n): %o A204911 V, q = [0 for _ in range(n)], 4 %o A204911 while True: %o A204911 q = nextprime(q) %o A204911 r = q%n %o A204911 if V[r] == 0: V[r] = q %o A204911 else: return int(V[r]) %o A204911 print([a(n) for n in range(1, 94)]) # _Michael S. Branicky_, Jun 25 2024 after _Robert Israel_ %Y A204911 Cf. A204908, A204900, A204892. %K A204911 nonn %O A204911 1,1 %A A204911 _Clark Kimberling_, Jan 20 2012 %E A204911 More terms from _Robert G. Wilson v_, Jul 24 2018