%I #6 May 21 2019 18:39:07
%S 2,2,3,7,7,19,29,43,43,47,71,83,101,113,193,197,229,241,271,283,293,
%T 311,311,347,383,439,457,463,491,491,499,523,587,619,643,683,733,797,
%U 827,827,857,863,919,991,1021,1031,1091,1151,1187,1289,1367,1367,1549,1567
%N Primes of form (p(n)-r(n)), where A141468(n)=r(n)=n-th nonprime and p(n)=n-th prime.
%H Michael De Vlieger, <a href="/A141559/b141559.txt">Table of n, a(n) for n = 1..10000</a>
%H Mohammad Javaheri, Nikolai A. Krylov, <a href="https://arxiv.org/abs/1904.04227">Permutations with a distinct divisor property</a>, arXiv:1904.04227 [math.GR], 2019.
%e If n=1, then p(1)-r(1)=2-0=2=a(1).
%e If n=2, then p(2)-r(2)=3-1=2=a(2).
%e If n=3, then p(3)-r(3)=5-4=1 (nonprime).
%e If n=4, then p(4)-r(4)=7-6=1 (nonprime).
%e If n=5, then p(5)-r(5)=11-8=3=a(3).
%e If n=6, then p(6)-r(6)=13-9=4 (composite).
%e If n=7, then p(7)-r(7)=17-10=7=a(4).
%e If n=8, then p(8)-r(8)=19-12=7=a(5).
%e If n=9, then p(9)-r(9)=23-14=9 (composite).
%e If n=10, then=p(10)-r(10)=29-15=14 (composite).
%e If n=11, then p(11)-r(11)=31-16=15 (composite).
%e If n=12, then p(12)-r(12)=37--18=19=a(6).
%e If n=13, then p(13)-r(13)=41-20=21 (composite).
%e If n=14, then p(14)-r(14)=43-21=22 (composite).
%e If n=15, then p(15)-r(15)=47-22=25 (composite).
%e If n=16, then p(16)-r(16)=53-24=29=a(7), etc.
%t Block[{nn = 2000, p, r}, p = Prime@ Range@ PrimePi@ nn; r = Complement[Range[0, nn], p]; Select[Array[p[[#]] - r[[#]] &, Min[Length /@ {p, r}]], PrimeQ]] (* _Michael De Vlieger_, May 21 2019 *)
%Y Cf. A000040, A141468.
%K nonn
%O 1,1
%A _Juri-Stepan Gerasimov_, Aug 14 2008
%E Edited and extended by _Ray Chandler_, Aug 19 2008