login
Even integers n such that n-3 is prime.
5

%I #30 Sep 08 2022 08:46:20

%S 6,8,10,14,16,20,22,26,32,34,40,44,46,50,56,62,64,70,74,76,82,86,92,

%T 100,104,106,110,112,116,130,134,140,142,152,154,160,166,170,176,182,

%U 184,194,196,200,202,214,226,230,232,236,242,244,254,260,266,272,274,280

%N Even integers n such that n-3 is prime.

%C Subsequence of A005843, same as A113935 with first term (5) excluded, since it is odd, not even. Index in A056240 of terms in A288313 (except for first two terms 2,4 of latter).

%C The terms in this sequence, combined with those in A297925 and A298366 form a partition of A005843(n); n>=3 (nonnegative numbers>=6). This is because any even integer n>=6 satisfies either(i) n-3 is prime, (ii) n-5 prime but n-3 composite, or (iii) n-5 and n-3 both composite.

%C a(n) is the smallest even number e > prime(n+1) such that e has a Goldbach partition containing prime(n+1). - _Felix Fröhlich_, Aug 18 2019

%H Muniru A Asiru, <a href="/A298252/b298252.txt">Table of n, a(n) for n = 1..5000</a>

%F a(n) = A113935(n+1), n>=1.

%F A056240(a(n)) = A288313(n+2).

%F a(n) = prime(n + 1) + 3 = A113935(n + 1). - _David A. Corneth_, Mar 23 2018

%e a(1)=6 because 6-3=3; prime, and no smaller even number has this property; also a(1)=A113935(2)=6. a(2)=8 because 8-3=5 is prime; also A113935(3)=8.

%e 12 is not in the sequence because 12-3 = 9, composite.

%p N:=200

%p for n from 6 to N by 2 do

%p if isprime(n-3) then print(n);

%p end if

%p end do

%t Select[2 Range@125, PrimeQ[# - 3] &] (* _Robert G. Wilson v_, Jan 15 2018 *)

%t Select[Prime[Range[100]]+3,EvenQ] (* _Harvey P. Dale_, Mar 07 2022 *)

%o (PARI) a(n) = prime(n + 1) + 3 \\ _David A. Corneth_, Mar 23 2018

%o (GAP) Filtered([1..300],n->IsEvenInt(n) and IsPrime(n-3)); # _Muniru A Asiru_, Mar 23 2018

%o (Magma) [NthPrime(n+1) +3: n in [1..70]]; // _G. C. Greubel_, May 21 2019

%o (Sage) [nth_prime(n+1) +3 for n in (1..70)] # _G. C. Greubel_, May 21 2019

%Y Cf. A005843, A056240, A113935, A288313.

%K nonn,easy,less

%O 1,1

%A _David James Sycamore_, Jan 15 2018