A350246 a(n) is the minimum positive integer k such that the concatenation of k, a(n-1), a(n-2), ..., a(2), and a(1) is the lesser of a pair of twin primes (i.e., a term of A001359), with a(1) = 11.
11, 3, 18, 15, 42, 189, 306, 369, 6, 1176, 93, 963, 2202, 750, 408, 498, 267, 1875, 240, 2751, 798, 1929, 3402, 6162, 6195, 4953, 5004, 8130, 18591, 20019, 4461, 1851, 46866, 29232, 7206, 24807, 4644, 23307, 48528, 21594, 28236, 4353, 28212, 3003, 22611, 50760
Offset: 1
Examples
11, 311, 18311, 1518311, and 421518311 are terms of A001359.
Links
- Chai Wah Wu, Table of n, a(n) for n = 1..100
- José Antonio Hervás Contreras, ¿Nueva propiedad de los primos gemelos?
Crossrefs
Cf. A001359.
Programs
-
Maple
terms := proc(n) local i, j, p, q, L, M: i, L, M := 0, [11], [11]: while numelems(L) < n do i, j := i+1, 0: while 1 > 0 do j, p := j+1, M[numelems(M)]: q := parse(cat(j, p)): if isprime(q) and isprime(q+2) then L, M := [op(L), j], [op(M), q]: break: fi: od: od: L: end:
-
Python
from itertools import count, islice from sympy import isprime def A350246_gen(): # generator of terms yield 11 s = '11' while True: for k in count(3,3): t = str(k) m = int(t+s) if isprime(m) and isprime(m+2): yield k break s = t+s A350246_list = list(islice(A350246_gen(),20)) # Chai Wah Wu, Jan 12 2022
Comments