OFFSET
1,1
EXAMPLE
21 = 3^1 * 7^1 has prime factors 3,7, which are also prime factors of the corresponding decimal encoding 3171 = 3^1 * 7^1 * 151^1.
MATHEMATICA
(*f gives the decimal encoding of the prime factorization of n*) f[n_] := FromDigits[Flatten[IntegerDigits[FactorInteger[n]]]]; (*g gives the list of prime factors of n*) g[n_] := Module[{a, l, t}, a = FactorInteger[n]; l = Length[a]; Table[a[[i]][[1]], {i, 1, l}]];
(*main routine*) j[n] := Module[{l1 = g[n], l2 = g[f[n]]}, (Intersection[l1, l2] == l1)]; Select[Range[2, 10^5], j[ # ] &]
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Joseph L. Pe, Feb 04 2002
STATUS
approved