A343027 Numbers whose concatenation of prime factors in increasing order is a prime number.
2, 3, 5, 6, 7, 11, 12, 13, 17, 18, 19, 21, 22, 23, 28, 29, 31, 33, 37, 39, 41, 43, 46, 47, 51, 52, 53, 54, 58, 59, 61, 63, 66, 67, 70, 71, 73, 79, 82, 83, 84, 89, 93, 97, 98, 101, 103, 107, 109, 111, 113, 115, 117, 127, 131, 133, 137, 139, 141, 142, 148, 149
Offset: 1
Examples
c(1) = 1 not prime -> 1 is not a term. c(2) = 2 prime -> 2 is a term. c(3) = 3 prime -> 3 is a term. c(4) = 22 not prime -> 4 is not a term. c(5) = 5 prime -> 5 is a term. c(6) = 23 prime -> 6 is a term.
Links
- Michael S. Branicky, Table of n, a(n) for n = 1..10000
Programs
-
Maple
q:= n-> isprime(parse(cat(sort(map(i-> i[1]$i[2], ifactors(n)[2]))[]))): select(q, [$2..222])[]; # Alois P. Heinz, Mar 27 2024
-
Mathematica
m[{p_, e_}] := Table[p, {e}]; c[w_] := FromDigits[Join @@ IntegerDigits@ w]; Select[ Range@ 150, PrimeQ@ c@ Flatten[m /@ FactorInteger[#]] &] (* Giovanni Resta, Apr 23 2021 *)
-
Python
from sympy import * def b(n): f=factorint(n) l=sorted(f) return 1 if n==1 else int("".join(str(i)*f[i] for i in l)) # print([b(n) for n in range(1, 101)]) for n in range(1,200): if isprime(b(n)): print (n)