OFFSET
1,1
LINKS
EXAMPLE
The prime 127 has inventory number 111217 (one "1", one "2", one "7"), which is also prime. Hence 127 belongs to the sequence.
MATHEMATICA
g[n_] := Module[{seen, r, d, l, i, t}, seen = {}; r = {}; d = IntegerDigits[n]; l = Length[d]; For[i = 1, i <= l, i++, t = d[[i]]; If[ ! MemberQ[seen, t], r = Join[r, IntegerDigits[Count[d, t]]]; r = Join[r, {t}]; seen = Append[seen, t]]]; FromDigits[r]]; s = {}; For[j = 1, j <= 10^3, j++, temp = Prime[j]; If[PrimeQ[g[temp]], s = Append[s, temp]]]; s
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Joseph L. Pe, Jan 15 2003
STATUS
approved