OFFSET
1,1
COMMENTS
The sequence is finite with last term a(123) = 7993.
Only distinct permutations are counted. For example, 1117 is not in the sequence because the distinct permutations of its digits are 1117, 1171, 1711, and 7111, of which only 1117 and 1171 are prime. Also, only the first occurrence of a permutation of four digits is included in the sequence. For example, 1031 is not in the sequence because a permutation of its digits gives 1013, which is already in the sequence. - Nathaniel Johnston, Jun 24 2011
Each term has three or four distinct digits. A term may include up to two of any one positive digit and such identical digits may be adjacent. The terms 1237 and 1279 have the most such distinct prime permutations with 11 each. Of all terms with pairs of identical digits, 1123 and 1193 have the most with 8 each. Other noteworthy terms: 2357 (consecutive prime digits) and 4567 (consecutive digits). - Rick L. Shepherd, Feb 17 2013
LINKS
Nathaniel Johnston, Table of n, a(n) for n = 1..123 (full sequence)
MAPLE
A157008:={}: p:=1009: while p<=9999 do nump:=0: per:=combinat[permute](convert(p, base, 10)): for k from 1 to nops(per) do v:=op(convert(per[k], base, 10, 10000)): if(member(v, A157008))then nump:=0:break:fi: nump:=nump+`if`(isprime(v) and v>=1000, 1, 0): od: if(nump>=4)then A157008:=A157008 union {p}: fi: p:=nextprime(p): od: op(sort(convert(A157008, list))); # Nathaniel Johnston, Jun 24 2011
CROSSREFS
KEYWORD
nonn,base,fini,full
AUTHOR
Ki Punches, Feb 20 2009
EXTENSIONS
Definition clarified and several terms corrected by Nathaniel Johnston, Jun 24 2011
STATUS
approved