OFFSET
1,1
COMMENTS
If prime(m), prime(m+1) form a twin prime pair then a(m) = prime(m+1).
EXAMPLE
a(5) = 13 as 13-2 =11, a(8) = 41 as 41-3 = 38 = 2*19.
PROG
(PARI) r=Set(); forprime(n=2, 10^5, s=r; forprime(k=n, 10^5, if(setsearch(s, k%n), print1(" ", k); break, s=setunion(s, [k%n]))); r=setunion(r, [n])) (Alekseyev)
CROSSREFS
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Sep 20 2003
EXTENSIONS
More terms from Max Alekseyev, Feb 14 2005
STATUS
approved