Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #10 Sep 01 2022 22:11:03
%S 0,0,0,0,0,0,0,0,1,2,2,2,3,4,4,5,7,7,7,7,7,8,9,9,11,12,13,14,14,15,16,
%T 19,19,20,21,22,24,25,27,28,28,29,31,32,34,35,35,38,41,42,44,45,46,47,
%U 50,51,52,53,53,55,59,62,63,64,65,67,69,69,71
%N Number of prime quadruples p < q < r < s in arithmetic progression with all members less than or equal to prime(n).
%H Benjamin Green and Terence Tao, <a href="https://arxiv.org/abs/math/0606088">Linear equations in primes</a>, arXiv:math/0606088 [math.NT], 2006-2008; Annals of Mathematics Second Series, Vol. 171, No. 3 (May, 2010), pp. 1753-1850.
%H Ben J. Green and Terence C. Tao, <a href="https://arxiv.org/abs/math/0404188">The primes contain arbitrarily long arithmetic progressions</a>, Annals of Math. 167 (2008), pp. 481-547.
%F a(n) ~ Cp^2/log^4 p ~ Cn^2/log^2 n where p is the n-th prime and C = A351909.
%o (PARI) a(n, qlim=prime(n))=my(s); forprime(q=23,qlim, forprimestep(p=q%6, q-18, 6, isprime((2*p+q)/3) && isprime((2*q+p)/3) && s++)); s
%o (PARI) b(q)=my(s); forprimestep(p=q%6, q-18, 6, isprime((2*p+q)/3) && isprime((2*q+p)/3) && s++); s
%o first(n)=my(v=vector(n),s,i); forprime(p=2,prime(n), v[i++]=s+=b(p)); v
%Y Partial sums of A351907.
%Y Cf. A351909.
%K nonn
%O 1,10
%A _Charles R Greathouse IV_, Feb 25 2022