login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A308261 For any integer n, let d(n) be the smallest k > 0 such that at least one of n-k or n+k is a prime number; we build an undirected graph G on top of the prime numbers as follows: two consecutive prime numbers p and q are connected iff at least one of d(p) or d(q) equals q-p; a(n) is the number of terms in the n-th connected component of G (ordered by least element). 1
4, 2, 3, 2, 7, 3, 3, 3, 3, 2, 2, 8, 2, 7, 2, 5, 4, 4, 2, 4, 5, 3, 2, 2, 3, 4, 3, 3, 2, 2, 5, 8, 7, 4, 2, 5, 3, 2, 2, 2, 2, 3, 4, 4, 3, 5, 4, 2, 2, 2, 3, 2, 3, 6, 3, 2, 2, 4, 6, 2, 3, 2, 4, 3, 4, 2, 5, 4, 3, 7, 4, 2, 2, 2, 3, 4, 4, 4, 2, 5, 4, 2, 2, 5, 3, 3, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Each connected component of G has at least two elements.
Is the sequence bounded?
LINKS
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
Sequence in context: A238352 A291357 A079636 * A019614 A051528 A073244
KEYWORD
nonn
AUTHOR
Rémy Sigrist, Jun 02 2019
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 28 09:04 EDT 2024. Contains 371240 sequences. (Running on oeis4.)