Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #34 Feb 16 2023 05:29:06
%S 0,0,0,0,1,0,1,0,1,0,0,1,0,0,1,0,0,1,0,0,0,0,1,1,0,0,0,0,0,3,0,0,0,0,
%T 0,1,1,0,0,0,0,1,0,0,1,0,1,0,0,0,1,0,1,0,0,0,2,0,1,1,0,0,0,0,0,1,1,0,
%U 0,0,0,0,1,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,0,0,0,1,0,0,1,0,0,1,0,0,3,0
%N Number of partitions of 4*n into four odd primes (p_1, p_2, p_3, p_4) (p_1 < p_2 <= p_3 < p_4 and p_1 + p_4 = p_2 + p_3 = 2*n) such that (p_1, p_2) and (p_3, p_4) are consecutive pairs of prime numbers with the same difference, d = p_2 - p_1 = p_4 - p_3, and (p_1, p_3), (p_2, p_4) are also consecutive pairs of prime numbers with the same difference, D = p_3 - p_1 = p_4 - p_2.
%C Two pairs of primes, (q, r) and (s, t), are consecutive pairs of primes with the same difference d = r - q = t - s if there exists no other pair of primes (u, v) having the same difference d and lying between the pairs (q, r) and (s, t).
%e a(57)=2 because there are two such partitions of 228: {43,47,67,71}, {43,53,61,71}.
%e In the first partition (i.e., p_1 = 43, p_2 = 47, p_3 = 67, p_4 = 71), (43,47) and (67,71) are prime pairs with difference 4 (since p_2 - p_1 = p_4 - p_3 = 4), and they are consecutive among such pairs (i.e., there does not exist any intervening pair of primes with difference 4). It is also true that (43,67) and (47,71) are prime pairs with difference 24 (since p_3 - p_1 = p_4 - p_2 = 24), and they are consecutive among such pairs (i.e., no intervening pair of primes with difference 24 exists).
%e Similarly, in the second partition (i.e., p_1 = 43, p_2 = 53, p_3 = 61, p_4 = 71), (43,53) and (61,71) are consecutive pairs of prime numbers with difference 10: p_2 - p_1 = p_4 - p_3 = 10, and (43,61) and (53,71) are consecutive pairs of prime numbers with difference 18: p_3 - p_1 = p_4 - p_2 = 18.
%o (PARI) chk(s, t, d)={forprime(p=s, t, if(isprime(p+d), return(0))); 1}
%o a(n) = {my(s=0); forprime(p=3, n, if(isprime(2*n-p), forprime(q=p+1, n, if(isprime(2*n-q) && chk(p+1, 2*n-q-1, q-p) && chk(p+1,q-1,2*n-q-p), s++)))); s} \\ _Andrew Howroyd_, Feb 03 2023
%Y Cf. A001359, A006512, A023200, A046132, A023201, A046117.
%K nonn,easy
%O 1,30
%A _Naohiro Nomoto_, Jan 21 2023