OFFSET
1,1
COMMENTS
Conjecture: a(n) < prime(n)^2 for every n.
If this conjecture is true, then no terms are repeated.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..10000
MAPLE
a:= proc(n) local q, p; p:= ithprime(n); q:= p;
do if irem(q-2, p)=0 then break fi;
q:= nextprime(q);
od; q
end:
seq(a(n), n=1..55); # Alois P. Heinz, May 03 2021
PROG
(PARI) a(n) = {p = prime(n); q = p; while (Mod(q, p) != 2, q = nextprime(q+1)); q; } \\ Michel Marcus, Dec 18 2016
(Python)
from itertools import dropwhile, count
from sympy import isprime, prime
def A279756(n): return next(dropwhile(lambda x:not isprime(x), count(2 if (p:=prime(n))==2 else p+2, p))) # Chai Wah Wu, Jan 04 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Thomas Ordowski and Altug Alkan, Dec 18 2016
STATUS
approved