%I #12 Aug 31 2022 09:07:27
%S 569,661,1249,1559,1571,1949,1999,2389,2441,2609,2879,3761,3911,5689,
%T 5701,5749,5779,6389,6481,6971,7559,7561,7741,8191,8971,9221,9391,
%U 9521,10061,10111,10289,10601,10949,11821,11941,12071,12281,12689,12721,12809,13151,13469,13681,14821,15569,16931,18661
%N Primes p such that the concatenation of p and 2*p is the average of a twin prime pair.
%H Robert Israel, <a href="/A356443/b356443.txt">Table of n, a(n) for n = 1..10000</a>
%e a(3) = 1249 is a term because 2*1249 = 2498 and 12492498 is the average of the twin prime pair 12492497, 12492499.
%p filter:= proc(p) local r;
%p if not isprime(p) then return false fi;
%p r:= p*10^(1+ilog10(2*p))+2*p;
%p isprime(r+1) and isprime(r-1)
%p end proc:
%p select(filter, [seq(seq(10*i+j, j=[1,9]),i=1..10000)]);
%t Select[Prime[Range[2200]], And @@ PrimeQ[FromDigits[Join[IntegerDigits[#], IntegerDigits[2*#]]] + {-1, 1}] &] (* _Amiram Eldar_, Aug 07 2022 *)
%o (Python)
%o from sympy import isprime
%o def ok(n):
%o if not isprime(n): return False
%o t = int(str(n)+str(2*n))
%o return isprime(t-1) and isprime(t+1)
%o print([k for k in range(20000) if ok(k)]) # _Michael S. Branicky_, Aug 07 2022
%Y Cf. A014574.
%K nonn,base
%O 1,1
%A _J. M. Bergot_ and _Robert Israel_, Aug 07 2022