login
Primes that are the concatenation of x, 1 and x for some x.
3

%I #14 Jan 07 2026 08:39:39

%S 313,919,17117,21121,27127,29129,39139,41141,47147,51151,59159,71171,

%T 81181,87187,89189,1131113,1171117,1191119,1311131,1371137,1411141,

%U 1591159,1611161,1771177,1891189,2011201,2391239,2631263,2871287,2911291,2991299,3331333,3591359,3711371,3771377,3891389,3931393

%N Primes that are the concatenation of x, 1 and x for some x.

%C Primes of the form (10^(d+1)+1) * x + 10^d for some x where 10^(d-1) <= x < 10^d.

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

%e a(3) = 17117 is a term because it is prime and is the concatenation of 17, 1 and 17.

%p R:= NULL:

%p for d from 1 to 3 do

%p for x from 10^(d-1) to 10^d-1 do

%p y:= x * (1 + 10^(d+1))+10^d;

%p if isprime(y) then

%p R:= R,y;

%p fi

%p od od:

%p R;

%o (Python)

%o from sympy import isprime

%o from itertools import count, islice

%o def b(n): return 10**len(str(n))*(10*n+1) + n # A392225

%o def agen(): # generator of terms

%o yield from (filter(isprime, (b(n) for n in count(1) if n%10 in {1, 3, 7, 9})))

%o print(list(islice(agen(), 37))) # _Michael S. Branicky_, Jan 04 2026

%Y Primes in A392225. Cf. A392226, A392239.

%K nonn,base

%O 1,1

%A _Robert Israel_, Jan 03 2026