A385481 Primes whose decimal expansion consists of the concatenation of ij, iijj, iiijjj,..., and m i’s followed by m j’s, i != j, where 1<= i, j <= 9 and m > 0.
13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 31331133311133331111, 37337733377733337777, 43443344433344443333, 49449944499944449999
Offset: 1
Examples
for i = 3, j = 1 and m = 4, by concatenating 31, 3311, 333111, 33331111 the prime 31331133311133331111 is obtained.
Links
- Gonzalo Martínez, Table of n, a(n) for n = 1..25
Programs
-
Python
from gmpy2 import is_prime, mpz from itertools import count, islice, product def agen(): yield from (p for m in count(1) for i in "123456789" for j in "1379" if i != j and is_prime(p:=int(mpz("".join(i*k+j*k for k in range(1, m+1)))))) print(list(islice(agen(), 24))) # Michael S. Branicky, Jun 30 2025
Comments