|
|
A349636
|
|
Primes that remain prime when a single "1" digit is inserted between any two adjacent digits.
|
|
1
|
|
|
13, 31, 37, 67, 79, 103, 109, 151, 163, 181, 193, 211, 241, 367, 457, 547, 571, 601, 613, 631, 709, 787, 811, 1117, 1213, 1831, 2017, 2683, 3019, 3319, 3391, 3511, 3517, 3607, 4519, 4999, 6007, 6121, 6151, 6379, 6673, 6871, 6991, 8293, 11119, 11317, 11467
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
EXAMPLE
|
37 and 317 are prime; 2683 is prime, as are 21683, 26183, and 26813.
|
|
MATHEMATICA
|
Select[Prime@Range[5, 1500], (p=#; And@@PrimeQ[FromDigits/@(Insert[IntegerDigits@p, 1, #]&/@Range[2, IntegerLength@p])])&] (* Giorgos Kalogeropoulos, Nov 23 2021 *)
|
|
PROG
|
(Python)
from sympy import isprime, primerange
def ok(p):
if p < 10: return False
s = str(p)
return all(isprime(int(s[:i] + "1" + s[i:])) for i in range(1, len(s)))
def aupto(limit): return [p for p in primerange(1, limit+1) if ok(p)]
|
|
CROSSREFS
|
The terms of A069246 > 10 are a subsequence.
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|