OFFSET
3,1
COMMENTS
This sequence is different from A002374 from the 23rd term on.
EXAMPLE
For the 3rd even number 6, 6=3+3;
For the 4th number 8, increasing the first prime in 6=3+3 by 2, we get 8=5+3, 5 and 3 are both primes, choose the smaller one, the second term of this sequence is 3, which makes 8=3+5;
...
For the 23rd even number 46, increasing the first prime in 44=13+31 by 2, we get 46=15+31. 15 is not prime, keep increasing: 46=17+29. Both 17 and 29 are primes, so the 23rd term of this sequence is 17, as of 46=17+29;
...
For 28th even number 56, increasing the first prime in 54=23+31 by 2, we get 56=25+31. 25 is not prime, keep increasing, 56 = 27+29 = 29+27 = 31+25 = 33+23 = 35+21 = 37+19. Both 37 and 19 are primes, and 19 is smaller. So the 28th term of this sequence is 19, as of 56=19+37.
MATHEMATICA
e = 4; p1 = 1; p2 = 3; a = Table[e = e + 2; If[p1 < p2, p1 = p1 + 2, p2 = p2 + 2];
While[! (PrimeQ[p1] && PrimeQ[p2]), p1 = p1 + 2; p2 = p2 - 2];
If[p1 > p2, p1 = p2; p2 = e - p1]; p1, {i, 1, 67}]
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Lei Zhou, Oct 11 2019
STATUS
approved