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.

A222566 a(1)=2; for n>0, a(n+1) is the least prime p>a(n) such that 2*(a(n)+1)-p is prime.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 41, 43, 47, 53, 61, 71, 73, 89, 97, 107, 109, 113, 127, 149, 151, 167, 173, 181, 191, 193, 197, 199, 227, 229, 233, 239, 241, 251, 263, 271, 281, 283, 311, 313, 317, 353, 359, 367, 383, 389, 397, 443, 449, 457, 467, 479, 499, 509, 521, 523, 557, 569, 571, 587, 599, 601, 617, 619, 641, 643, 647, 653, 661, 677, 683, 691, 701, 727, 773, 787, 857, 859, 863, 907, 929, 941, 947, 967, 983, 991, 1013, 1019, 1021, 1031, 1033, 1049, 1051, 1091, 1093
Offset: 1

Views

Author

Zhi-Wei Sun, Feb 25 2013

Keywords

Comments

For a prime p define g(p) as the least prime q>p such that 2*(p+1)-q is prime. Construct a simple (undirected) graph G as follows: The vertex set of G is the set of all primes, and for the vertices p and q>p there is an edge connecting p and q if and only if g(p)=q. Clearly G contains no cycle.
Conjecture: The graph G constructed above is connected and hence it is a tree!

Examples

			a(2)=3 since 2(2+1)=3+3, and a(3)=5 since 2(3+1)=5+3.
		

Crossrefs

Programs

  • Mathematica
    k=1
    n=1
    Do[If[m==1,Print[n," ",2]];If[m==k,n=n+1;Do[If[PrimeQ[2(Prime[m]+1)-Prime[j]]==True,k=j;Print[n," ",Prime[j]];Goto[aa]],{j,m+1,PrimePi[2Prime[m]]}]];
    Label[aa];Continue,{m,1,1000}]