%I #23 Aug 02 2024 16:56:04
%S 6,6,4,2,6,2,4,6,4,2,4,2,6,2,4,6,2,4,4,2,4,2,2,4,6,6,4,2,2,2,2,2,4,4,
%T 2,6,2,2,2,6,2,4,2,4,4,2,4,2,6,2,2,2,6,6,2,2,2,2,4,2,2,2,2,4,6,4,2,6,
%U 2,2,2,4,2,4,2,4,2,6,2,4,6,2,2,2,4,2,2,2,2,2,4,6,4,2,2,2,2,2,4,2,4,2,2,2,6
%N First differences of A071904 (Odd composite numbers).
%C Are all terms <=6?
%C This is A067970 without its first term. [From _R. J. Mathar_, Aug 17 2009]
%C Yes, all terms are at most 6. For a value of 8, we have to have p, p+2, p+4 all prime, and this is possible only for p=3. As a result, 1 would have to be an odd composite number, which it is not. Therefore all terms are <=6. [From _J. Lowell_, Aug 17 2009]
%o (Python)
%o from sympy import primepi, isprime
%o def A164510(n):
%o m, k = n, primepi(n+1) + n + (n+1>>1)
%o while m != k:
%o m, k = k, primepi(k) + n + (k>>1)
%o for d in range(2, 7, 2):
%o if not isprime(m+d):
%o return d # _Chai Wah Wu_, Aug 02 2024
%Y A071904
%K nonn
%O 1,1
%A _Zak Seidov_, Aug 14 2009