A222590 Greatest prime representable as the arithmetic mean of two other primes in n different ways, or 0 if no such prime exists.
3, 19, 31, 61, 79, 83, 199, 181, 229, 271, 277, 313, 293, 439, 389, 401, 499, 619, 601, 709, 859, 643, 787, 811, 743, 823, 1039, 1009, 1321, 1021, 1279, 1213, 1249, 1489, 1483, 1301, 1609, 1621, 1459, 1753, 1559, 1877, 2011, 2029, 1741, 1901, 2087, 2239, 2207
Offset: 0
Keywords
Examples
There are only two primes which are not the arithmetic mean of two other primes and they are 2 and 3. Therefore a(0)=3. There are only three primes which are the arithmetic mean of two other primes in just one way. They are 5 = (3+7)/2, 7 = (3+11)/2, and 19 = (7+31)/2. Therefore a(1)=19. There are only three primes which are the arithmetic mean of two other primes in just two ways. They are 11 = (3+19)/2 = (5+17)/2, 13 = (3+23)/2 = (7+19)/2, and 31 = (3+59)/2 = (19+43)/2. Therefore a(2)=31, etc.
Links
Programs
-
Mathematica
f[n_] := Block[{c = 0, k = 2, p = Prime@ n}, While[k + 1 < p, If[PrimeQ[p - k] && PrimeQ[p + k], c++ ]; k += 2]; c]; t = Table[0, {1000}]; Do[a = f@ n; If[a < 1001, t[[a + 1]] = Prime@ n; Print[{a, Prime@ n}]], {n, 5000}]; Take[t, 50]
Comments