OFFSET
1,4
COMMENTS
That is, it is the number of twin prime candidates for which each half of the pair is composite, where one of those composites has prime(n) for its lowest prime factor and the other composite has a prime less than prime(n) for its lowest prime factor.
LINKS
Dennis Martin, Table of n, a(n) for n = 1..100
FORMULA
a(1) = a(2) = 0; for n >= 3, a(n) = t(n-1) - e'(n), where t(n) is A005867(n) and e'(n) is A121406(n). [corrected by Michel Marcus, Dec 12 2025]
EXAMPLE
The prime factors prime(1) = 2 and prime(2) = 3 cannot eliminate any twin prime candidates, therefore a(1) = a(2) = a(3) = 0.
For the prime factor prime(4) = 7, there will be 8 composites having prime(4) for their lowest prime factor within every interval of prime(4)# = 210 starting after 7. For instance, the composites {49, 77, 91, 119, 133, 161, 203, 217} are adjacent to and eliminate the twin prime candidates centered at {48, 78, 90, 120, 132, 162, 204, 216}. However, 2 of those 8 are already eliminated by prime(3), those being the candidates centered at 204 and 216, since 205 and 215 obviously are composites having 5 for their lowest prime factor. Therefore a(4) = 2 because there are 2 double eliminations by 7 and by a prime less than 7 within each interval of prime(4)# = 210.
For prime(5) = 11, there are 48 composites that have 11 for their lowest prime factor over any interval of prime(5)# = 2310 starting after 11. Those 48 composites are all adjacent to a twin prime candidate center post, but 12 of those candidates are eliminated by prime(3) (the ones corresponding to the centers 144, 186, 474, 516, 804, 1134, 1176, 1506, 1794, 1836, 2124 and 2166) and 6 are eliminated by prime(4) (those corresponding to the candidate centered at 120, 342, 582, 1728, 1968 and 2190). Therefore a(5) = 12 + 6 = 18.
PROG
(PARI) t(n) = prod(k=1, n, prime(k)-1); \\ A005867
e(n) = if (n<=2, 0, if (n==3, 2, (prime(n-1)-2)*e(n-1))); \\ A121406
a(n) = if (n<3, 0, t(n-1) - e(n)); \\ Michel Marcus, Dec 12 2025
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Dennis R. Martin (dennis.martin(AT)dptechnology.com), Jul 28 2006
STATUS
approved
