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.
%I A346399 #57 Jul 27 2024 23:49:04 %S A346399 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, %T A346399 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, %U A346399 2,0,1,2,1,0,0,2,0,0,1,0,4,0,1,0,0,2,0 %N A346399 a(n) is the number of symmetrically distributed consecutive primes centered at n (including n itself if n is prime). %C A346399 a(n) is the number of consecutive primes in Goldbach pairs of 2n centered at n. %C A346399 a(n) is odd if n is prime; otherwise, a(n) is even. %C A346399 n is prime if a(n) = 1 and n is composite if a(n) = 0. %C A346399 a(n) = 14 is not seen until n = 8021811 (with none higher through 4*10^7). - _Bill McEachen_, Jul 26 2024 %H A346399 Jason Yuen, <a href="/A346399/b346399.txt">Table of n, a(n) for n = 1..10000</a> %e A346399 a(1) = 0 because no prime is <= 1. %e A346399 a(2) = 1 because no prime is < 2 and {2} is the only symmetrically distributed prime centered at 2. %e A346399 a(30) = 10 because there are 10 symmetrically distributed consecutive primes, {13, 17, 19, 23, 29, 31, 37, 41, 43, 47}, centered at 30. %o A346399 (Python) %o A346399 from sympy import isprime %o A346399 for n in range(1, 100): %o A346399 d = 1 if n%2 == 0 else 2 %o A346399 ct = 1 if isprime(n) else 0 %o A346399 while n - d > 2: %o A346399 k = isprime(n+d) + isprime(n-d) %o A346399 if k == 2: ct += 2 %o A346399 elif k == 1: break %o A346399 d += 2 %o A346399 print(ct) %Y A346399 Cf. A045917, A050237, A060863, A122821. %K A346399 nonn %O A346399 1,4 %A A346399 _Ya-Ping Lu_, Sep 18 2021