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!)
A346399 a(n) is the number of symmetrically distributed consecutive primes centered at n (including n itself if n is prime). 5
0, 1, 1, 2, 3, 2, 1, 0, 4, 0, 1, 6, 1, 0, 6, 0, 1, 4, 1, 0, 2, 0, 1, 0, 0, 2, 0, 0, 1, 10, 1, 0, 0, 2, 0, 0, 1, 0, 2, 0, 1, 6, 1, 0, 2, 0, 1, 0, 0, 2, 0, 0, 3, 0, 0, 2, 0, 0, 1, 4, 1, 0, 0, 2, 0, 0, 1, 0, 2, 0, 1, 2, 1, 0, 0, 2, 0, 0, 1, 0, 4, 0, 1, 0, 0, 2, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,4
COMMENTS
a(n) is the number of consecutive primes in Goldbach pairs of 2n centered at n.
a(n) is odd if n is prime; otherwise, a(n) is even.
n is prime if a(n) = 1 and n is composite if a(n) = 0.
LINKS
EXAMPLE
a(1) = 0 because no prime is <= 1.
a(2) = 1 because no prime is < 2 and {2} is the only symmetrically distributed prime centered at 2.
a(30) = 10 because there are 10 symmetrically distributed consecutive primes, {13, 17, 19, 23, 29, 31, 37, 41, 43, 47}, centered at 30.
PROG
(Python)
from sympy import isprime
for n in range(1, 100):
d = 1 if n%2 == 0 else 2
ct = 1 if isprime(n) else 0
while n - d > 2:
k = isprime(n+d) + isprime(n-d)
if k == 2: ct += 2
elif k == 1: break
d += 2
print(ct)
CROSSREFS
Sequence in context: A091327 A327758 A110540 * A339071 A358478 A083475
KEYWORD
nonn
AUTHOR
Ya-Ping Lu, Sep 18 2021
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 April 19 23:15 EDT 2024. Contains 371798 sequences. (Running on oeis4.)