login
a(n) is the least prime p such that p + A014574(n) is prime.
1

%I #9 Apr 27 2021 02:42:55

%S 3,5,5,5,7,5,7,7,5,5,11,7,11,5,13,5,11,7,11,5,5,11,7,5,19,7,7,13,5,13,

%T 11,5,11,5,5,11,7,11,7,5,11,7,5,7,5,7,5,7,5,5,5,7,29,11,11,13,5,11,17,

%U 23,5,11,5,11,17,7,11,5,5,23,7,7,7,17,5,5,7,11,7,17,29,11,17,13,5,13,7,13

%N a(n) is the least prime p such that p + A014574(n) is prime.

%C a(n) >= 5 for n >= 2, since A014574(n) == 0 (mod 6).

%C a(n) = 5 if and only if A001359(n) is in A022004.

%H Robert Israel, <a href="/A343691/b343691.txt">Table of n, a(n) for n = 1..10000</a>

%e a(5) = 7 because A014574(5) = 30 and 7 is the least prime p such that 30+p is prime.

%p P:= {seq(ithprime(i),i=1..10^4)}:

%p A014574:= sort(convert(map(`+`,P,1) intersect map(`-`,P,1),list)):

%p f:= proc(n) local p,t;

%p p:= 2;

%p do

%p p:= nextprime(p);

%p if isprime(p+A014574[n]) then return p fi

%p od

%p end proc:

%p map(f, [$1..nops(A014574)]);

%Y Cf. A001359, A014574, A022004.

%K nonn

%O 1,1

%A _J. M. Bergot_ and _Robert Israel_, Apr 26 2021