OFFSET
1,1
EXAMPLE
5333 produces five primes when an even digit is inserted (5030303, 5232323, 5434343, 5636363, 5838383) and five composites when an odd digit is inserted (5131313, 5333333, 5535353, 5737373, 5939393).
MATHEMATICA
a[n_, k_]:=Union[Boole/@PrimeQ[Table[FromDigits[Riffle[IntegerDigits[n], i]], {i, k+2*Range[0, 4]}]]]; t={}; Do[p=Prime[i]; x=a[p, 1]; y=a[p, 0]; If[x=={0}&&y=={1}||x=={1}&&y=={0}, AppendTo[t, p]], {i, 100, 190000}]; t (* Jayanta Basu, Jun 01 2013 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Patrick De Geest, Oct 15 1999
EXTENSIONS
Offset changed to 1 by Jon E. Schoenfield, Oct 17 2019
Name clarified by Tanya Khovanova, Jul 06 2021
STATUS
approved