Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #30 Nov 28 2024 11:16:40
%S 1,1,1,2,1,1,2,1,1,2,1,2,3,1,1,2,3,1,2,1,1,2,1,2,3,1,2,3,1,1,2,3,1,2,
%T 1,1,2,3,1,2,1,2,3,1,2,3,9,1,2,1,1,2,1,1,2,1,2,3,6,5,6,9,1,2,1,2,3,1,
%U 1,2,3,5,5,1,1,2,3,1,2,3,1,2,1,2,3,1,2
%N From Goldbach conjecture: Consider the pairs (2n-+1, 3), (2n-1, 5), (2n-3, 7), ..., (3, 2n+1) of odd numbers having sum 2n+4; a(n) is the index of the first pair of primes (p, q) on the list.
%C a(n) = A049847(n) for n = 1..46. The values of n such that a(n) is different from A049847(n) are 47, 59, 62, 72, 93, 102, 108, 123, 144, 149, 152, 161, 164, 171, 182, 197, 203, 207, 213, 227, ...
%C The corresponding pairs of primes are (3, 3), (3, 5), (3, 7), (5, 7), (3, 11), (3, 13), (5, 13), (3, 17), ... (A210957).
%H Michel Lagneau, <a href="/A255274/b255274.txt">Table of n, a(n) for n = 1..10000</a>
%H Jon Maiga, <a href="http://sequencedb.net/s/A255274">Computer-generated formulas for A255274</a>, Sequence Machine.
%F a(n) = n + (3-A020482(n+2))/2 = (A020481(n+2)-1)/2 via the Maiga link. - _Bill McEachen_, Jan 02 2022
%e a(13)=3 because 2*13 + 4 = 30 => 13 pairs (27,3), (25,5), (23,7), ..., (3,27) and the pair (23,7) is the third pair having prime elements.
%p nn:=100:for n from 6 by 2 to nn do:ii:=0:it:=1:for p from 3 by 2 to n while(ii=0) do:if type(n-p,prime)=true and type(p,prime)=true then ii:=1: printf(`%d, `,it):else it:=it+1:fi:od:od:
%o (PARI) a(n)=my(m=2*n+4); forprime(q=3, n+2, if(isprime(m-q), return(q\2))) \\ _Charles R Greathouse IV_, Jan 07 2022
%Y Cf. A000040, A002375, A049847, A210957, A020482.
%K nonn
%O 1,4
%A _Michel Lagneau_, Feb 20 2015
%E Edited by _N. J. A. Sloane_, Sep 12 2017