login
Primes p such that changing, in p, all 1's to 2's we get semiprimes and changing all 1's to 3's we get triprimes.
1

%I #44 Dec 17 2023 11:13:12

%S 61,199,313,421,619,661,1033,1163,1217,1283,1301,1361,1567,1613,1721,

%T 1723,1759,1987,2179,2341,2617,3011,3163,3217,4211,4519,4621,5107,

%U 7417,8117,8123,8317,8521,9199,9319,9721,9817,10037,10093,10099,10139,10163,10211,10243,10567,10589,10601,10687,10781,10837,10957

%N Primes p such that changing, in p, all 1's to 2's we get semiprimes and changing all 1's to 3's we get triprimes.

%H Harvey P. Dale, <a href="/A357780/b357780.txt">Table of n, a(n) for n = 1..1000</a>

%e 1217 (prime), 2227 = 17*131 (semiprime), 3237 = 3*13*83 (triprime).

%t s = {}; p = 2; Do[ p = NextPrime[p]; id = IntegerDigits[p]; id2 = id3 = id;

%t Do[If[id[[k]] == 1, id2[[k]] = 2; id3[[k]] = 3],{k, Length[id]}]; fd2 = FromDigits[id2]; fd3 = FromDigits[id3]; If[2 == PrimeOmega[fd2] && 3 == PrimeOmega[fd3], AppendTo[s, p]], {2000}]; s

%t Select[Prime[Range[1500]],PrimeOmega[FromDigits[IntegerDigits[#]/.(1->2)]]==2&&PrimeOmega[ FromDigits[IntegerDigits[#]/.(1->3)]]==3&] (* _Harvey P. Dale_, Dec 17 2023 *)

%Y Cf. A000040, A001358, A014612.

%K nonn,base

%O 1,1

%A _Zak Seidov_, Oct 14 2022