A074953 Numbers equidistant from consecutive twin prime pairs.
5, 9, 15, 24, 36, 51, 66, 87, 105, 123, 144, 165, 186, 195, 213, 234, 255, 276, 297, 330, 384, 426, 447, 492, 546, 585, 609, 630, 651, 735, 816, 825, 843, 870, 951, 1026, 1041, 1056, 1077, 1122, 1191, 1254, 1284, 1296, 1311, 1374, 1440
Offset: 1
Keywords
Examples
The twin prime pairs are (3,5), (5,7), (11,13), (17,19), etc. a(n) is equidistant from the higher prime in the n-th pair and the lower prime in the (n+1)th pair. E.g., a(2) is the mean of 7 and 11, which is 9.
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
t = Select[ Prime@ Range@ 250, PrimeQ[# + 2] &]; Most@ t + Differences[t]/2 + 1 (* Robert G. Wilson v, Jul 26 2015 *) Mean/@Partition[Rest[Flatten[Select[Partition[Prime[Range[250]],2,1],#[[2]]-#[[1]]==2&]]],2] (* Harvey P. Dale, Mar 01 2025 *)
-
PARI
lista(nn) = {forprime (p=2, nn, q = nextprime(p+1); if (q==p+2, forprime (pp=q, nn, if (nextprime(pp+1) == pp+2, print1((q+pp)/2, ", "); break;););););} \\ Michel Marcus, Jul 26 2015