A234649 Difference between the first members of the widest and the narrowest prime pair having an arithmetic mean of n.
2, 2, 4, 2, 6, 4, 6, 6, 10, 8, 12, 0, 14, 14, 10, 14, 14, 16, 18, 16, 16, 12, 22, 16, 20, 24, 24, 26, 26, 28, 26, 32, 30, 26, 36, 16, 36, 36, 28, 36, 36, 18, 44, 38, 40, 44, 42, 40, 50, 48, 40, 42, 52, 30, 42, 46, 42, 56, 56, 58, 48, 60, 64, 56, 66, 60, 48, 60, 70, 68, 68, 54, 68, 74, 60, 56
Offset: 8
Keywords
Examples
The prime pairs with an arithmetic mean of 18 are (17,19), (13,23), (7,29), and (5,31), so a(18) = 17-5 = 31-19 = 12. The only pair with mean of 19 is (7,31) so a(19) = 0.
Links
- Ralf Stephan, Table of n, a(n) for n = 8..100000
Crossrefs
Cf. A045917.
Programs
-
PARI
a(n)=mi=0;ma=0;forprime(p=3,n-1,if(isprime(2*n-p),if(!mi,mi=2*n-p);ma=2*n-p));if(!ma,-1,mi-ma)
Comments