OFFSET
1,1
COMMENTS
Only digits 1,3,7 and 9 can be used for terms with more than 1 digit.
EXAMPLE
179 is a term as 179, 197 & 971 are all prime.
MATHEMATICA
fQ[n_] := Block[{a = c = IntegerDigits[n], b = {}, l = Floor[ Log[10, n] + 1]}, Do[ a = c; {a[[ -1]], a[[i]]} = {a[[i]], a [[ -1]]}; AppendTo[b, FromDigits[a]], {i, 1, l}]; Union[ PrimeQ[b]] == {True}]; Select[Prime[ Range[10000]], fQ[ # ] &] (* Ed Pegg Jr, Jan 15 2004 *)
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Amarnath Murthy, Dec 29 2003
EXTENSIONS
Edited, corrected and extended by Robert G. Wilson v, Jan 15 2004
STATUS
approved