

A304246


Numbers that yield a prime whenever a '1' is inserted between any two digits.


3



0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 13, 21, 31, 33, 37, 49, 63, 67, 69, 79, 81, 91, 99, 103, 109, 117, 123, 151, 163, 181, 193, 211, 213, 231, 241, 279, 309, 319, 363, 367, 391, 411, 427, 429, 453, 457, 459, 501, 513, 519, 547, 571, 601, 613, 621, 631, 697, 703, 709, 721, 729, 777, 787, 801, 811, 817, 879, 903, 951, 981, 987
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,3


COMMENTS

The singledigit terms voidly satisfy the condition: no '1' can be inserted anywhere, so all possible insertions yield a prime.
Motivated by sequence A164329 which is the analog for inserting 0.
Compare to A068673 where 1 is prefixed or appended, and to A068679 where 1 is prefixed, appended or inserted anywhere  which is therefore the intersection between this sequence and A068673.


LINKS



EXAMPLE

21 is in the sequence, because if '1' is inserted between "any" pair consecutive digits (the only possibility being to insert it between the first and second digit, which yields 211), the result is always prime. The definition does not require the term itself to be prime.
103 is in the sequence because inserting 1 between the first and second, or between the second and third digit, would yield 1103 or 1013, respectively, which are both prime.


MAPLE

filter:= proc(n) local j, t;
for j from 1 to ilog10(n) do
if not isprime(10*n9*(n mod 10^j)+10^j) then return false fi
od;
true
end proc:


PROG

(PARI) is(n)=!for(k=1, logint(n+!n, 10), isprime(10*nn%10^k*9+10^k)return)
(Magma) [0] cat [k:k in [1..1000] forall{i:i in [1..#Intseq(k)1] IsPrime(Seqint(Reverse(v[1..i] cat [1] cat v[i+1..#v]))) where v is Reverse(Intseq(k)) }]; // Marius A. Burtea, Feb 09 2020


CROSSREFS

Cf. A164329 (prime when 0 is inserted anywhere), A216169 (subset of composite terms), A215417 (subset of primes), A159236 (prime when 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).
Cf. A158594 (3 is prefixed, appended or inserted anywhere), A215419 (primes among these).
Cf. A069832 (7 is prefixed, appended or inserted anywhere), A215420 (primes among these), A068677 (7 is prefixed or appended).
Cf. A069833 (9 is prefixed, appended or inserted anywhere), A215421 (primes among these).
Cf. A158232 (13 is prefixed or appended).
Cf. A304243 (2 is prefixed or prime(k+2) is inserted after the kth digit), A304244 (prime(k) is inserted after the kth digit), A304245 (prime(k+1) is inserted after the kth digit, k > 1, or '2' after the first digit).


KEYWORD

nonn,base


AUTHOR



STATUS

approved



