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.
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, 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, 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
Offset: 1
Keywords
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
Programs
-
Maple
f:= proc(n) local V,q,r; V:= Array(0..n-1); q:= 4; do q:= nextprime(q); r:= q mod n; if V[r] = 0 then V[r]:= q else return V[r] fi od end proc: map(f, [$1..100]); # Robert Israel, Jul 24 2018
-
Mathematica
(See the program at A204908.)
-
Python
from sympy import nextprime def a(n): V, q = [0 for _ in range(n)], 4 while True: q = nextprime(q) r = q%n if V[r] == 0: V[r] = q else: return int(V[r]) print([a(n) for n in range(1, 94)]) # Michael S. Branicky, Jun 25 2024 after Robert Israel
Extensions
More terms from Robert G. Wilson v, Jul 24 2018
Comments