login
Least prime p such that p-2 and 6n-p and either 6n+2-p or 6n+4-p is also prime, or 0 if no such prime exists.
4

%I #7 Jan 11 2016 04:24:58

%S 0,0,5,5,5,13,7,5,5,13,19,7,5,7,5,19,0,5,5,5,13,19,5,31,7,13,7,13,5,

%T 73,31,7,13,5,7,13,19,31,5,5,13,7,13,19,73,31,7,5,7,13,19,109,5,5,13,

%U 19,109,31,109,5,13,19,61,31,5,43,199,5,61,103,73,7,13,7,5,19,109,5,5,13,19,139,5,151,5,199,0,61,7,13,19,199,31,139,43,109,7,13,19

%N Least prime p such that p-2 and 6n-p and either 6n+2-p or 6n+4-p is also prime, or 0 if no such prime exists.

%C If a(n) > 0, then the triple {6n-2, 6n, 6n+2} of consecutive even numbers allows a "simultaneous Goldbach decomposition" using only 4 different primes, 6n-2 = p-2 + 6n-p ; 6n = p + 6n-p ; 6n+2 = p + 6n+2-p = p-2 + 6n+4-p.

%C See A266952 for the version which does not allow the second decomposition of the last member. See A266948 for a variant which does not require 6n+2-p to be prime.

%C Up to 10^5, the only indices for which a(n)=0 are {0, 1, 16, 86, 131, 151, 186, 191, 211, 226, 541, 701}. (Only 2 and 67 require the alternative primality of 6n+4-p and have thus A266952(n)=0.) I conjecture that this list is finite, and probably complete. Is it a coincidence that all odd numbers in this list are primes?

%o (PARI) A266953(n)=my(GP(n, p=2)=forprime(p=p,n+1,isprime(n*2-p)&&return(p))); for(p=1,3*n,isprime(-2+p=GP(3*n, p))+!p&&(!p||isprime(6*n+2-p)||isprime(6*n+4-p))&&return(p))

%K nonn

%O 0,3

%A _M. F. Hasler_, Jan 06 2016