cp's OEIS Frontend

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.

A141559 Primes of form (p(n)-r(n)), where A141468(n)=r(n)=n-th nonprime and p(n)=n-th prime.

Original entry on oeis.org

2, 2, 3, 7, 7, 19, 29, 43, 43, 47, 71, 83, 101, 113, 193, 197, 229, 241, 271, 283, 293, 311, 311, 347, 383, 439, 457, 463, 491, 491, 499, 523, 587, 619, 643, 683, 733, 797, 827, 827, 857, 863, 919, 991, 1021, 1031, 1091, 1151, 1187, 1289, 1367, 1367, 1549, 1567
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Aug 14 2008

Keywords

Examples

			If n=1, then p(1)-r(1)=2-0=2=a(1).
If n=2, then p(2)-r(2)=3-1=2=a(2).
If n=3, then p(3)-r(3)=5-4=1 (nonprime).
If n=4, then p(4)-r(4)=7-6=1 (nonprime).
If n=5, then p(5)-r(5)=11-8=3=a(3).
If n=6, then p(6)-r(6)=13-9=4 (composite).
If n=7, then p(7)-r(7)=17-10=7=a(4).
If n=8, then p(8)-r(8)=19-12=7=a(5).
If n=9, then p(9)-r(9)=23-14=9 (composite).
If n=10, then=p(10)-r(10)=29-15=14 (composite).
If n=11, then p(11)-r(11)=31-16=15 (composite).
If n=12, then p(12)-r(12)=37--18=19=a(6).
If n=13, then p(13)-r(13)=41-20=21 (composite).
If n=14, then p(14)-r(14)=43-21=22 (composite).
If n=15, then p(15)-r(15)=47-22=25 (composite).
If n=16, then p(16)-r(16)=53-24=29=a(7), etc.
		

Crossrefs

Programs

  • Mathematica
    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 *)

Extensions

Edited and extended by Ray Chandler, Aug 19 2008