OFFSET
1,3
COMMENTS
Motivated by existing sequences defined in an analog way for other digits to be inserted, e.g., A164329 for the digit 0, cf. cross-references.
For single-digit terms, the condition is voidly satisfied: nothing can be inserted.
See also A050712 where 2 is inserted between each pair of adjacent digits. - R. J. Mathar, Feb 28 2020
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..10000
EXAMPLE
123 is in the sequence because it yields a prime when a '2' is inserted after the first or after the second digit, which yields the prime 1223 in both cases. The term itself does not need to be prime.
MAPLE
filter:= proc(n) local j, t;
for j from 1 to ilog10(n) do
if not isprime(10*n-9*(n mod 10^j)+2*10^j) then return false fi
od;
true
end proc:
select(filter, [$0..10000]); # Robert Israel, Jun 01 2018
PROG
(PARI) is(n, p=2, L=logint(n+!n, 10)+1, d, P)=!for(k=1, L-1, isprime((d=divrem(n, P=10^(L-k)))[2]+(10*d[1]+p)*P)||return)
CROSSREFS
Cf. A164329 (prime when 0 is inserted anywhere), A216169 (subset of composite terms), A215417 (subset of primes), A159236 (0 is inserted between all digits).
Cf. A068679 (1 is prefixed, appended or inserted anywhere), A069246 (primes among these), A068673 (1 is prefixed, or appended), A304246 (1 is inserted anywhere).
Cf. A069832 (7 is prefixed, appended or inserted anywhere), A215420 (primes among these), A068677 (7 is prefixed or appended).
Cf. A158232 (13 is prefixed or appended).
KEYWORD
nonn,base
AUTHOR
M. F. Hasler, Jun 01 2018
STATUS
approved