OFFSET
1,1
COMMENTS
Each connected component of G has at least two elements.
Is the sequence bounded?
EXAMPLE
The first terms, alongside the corresponding components, are:
n a(n) n-th component
-- ---- --------------
1 4 {2, 3, 5, 7}
2 2 {11, 13}
3 3 {17, 19, 23}
4 2 {29, 31}
5 7 {37, 41, 43, 47, 53, 59, 61}
6 3 {67, 71, 73}
7 3 {79, 83, 89}
8 3 {97, 101, 103}
9 3 {107, 109, 113}
10 2 {127, 131}
PROG
(PARI) d(p) = for (k=1, oo, if (p-k>0 && isprime(p-k), return (k), isprime(p+k), return (k)))
v=1; p=2; forprime (q=p+1, oo, if (d(p)==q-p || d(q)==q-p, v++, print1 (v", "); if (n++==87, break); v = 1); p=q)
CROSSREFS
KEYWORD
nonn
AUTHOR
Rémy Sigrist, Jun 02 2019
STATUS
approved