login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A356443 Primes p such that the concatenation of p and 2*p is the average of a twin prime pair. 1
569, 661, 1249, 1559, 1571, 1949, 1999, 2389, 2441, 2609, 2879, 3761, 3911, 5689, 5701, 5749, 5779, 6389, 6481, 6971, 7559, 7561, 7741, 8191, 8971, 9221, 9391, 9521, 10061, 10111, 10289, 10601, 10949, 11821, 11941, 12071, 12281, 12689, 12721, 12809, 13151, 13469, 13681, 14821, 15569, 16931, 18661 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
EXAMPLE
a(3) = 1249 is a term because 2*1249 = 2498 and 12492498 is the average of the twin prime pair 12492497, 12492499.
MAPLE
filter:= proc(p) local r;
if not isprime(p) then return false fi;
r:= p*10^(1+ilog10(2*p))+2*p;
isprime(r+1) and isprime(r-1)
end proc:
select(filter, [seq(seq(10*i+j, j=[1, 9]), i=1..10000)]);
MATHEMATICA
Select[Prime[Range[2200]], And @@ PrimeQ[FromDigits[Join[IntegerDigits[#], IntegerDigits[2*#]]] + {-1, 1}] &] (* Amiram Eldar, Aug 07 2022 *)
PROG
(Python)
from sympy import isprime
def ok(n):
if not isprime(n): return False
t = int(str(n)+str(2*n))
return isprime(t-1) and isprime(t+1)
print([k for k in range(20000) if ok(k)]) # Michael S. Branicky, Aug 07 2022
CROSSREFS
Cf. A014574.
Sequence in context: A290868 A214140 A192822 * A142818 A103818 A240715
KEYWORD
nonn,base
AUTHOR
J. M. Bergot and Robert Israel, Aug 07 2022
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 19 18:34 EDT 2024. Contains 374410 sequences. (Running on oeis4.)