OFFSET
1,1
COMMENTS
There are no 4-digits terms in the sequence, since the first 4 decimals of Pi add up to 9, so they cannot form a prime. - Michel Marcus, Jan 07 2014
LINKS
Giovanni Resta, Table of n, a(n) for n = 1..10000
EXAMPLE
14153 can be rearranged to give 3[.]1415.
MATHEMATICA
Select[Union @@ (FromDigits /@ Permutations@ First@ RealDigits[Pi, 10, #] & /@ Range@ 8), PrimeQ] (* Giovanni Resta, Jan 07 2014 *)
PROG
(PARI) terms() = {v = [3, 1, 4, 1, 5, 9]; w = []; for (nb = 1, #v, for (i=0, nb!-1, perm = numtoperm(nb, i); val = sum(k=0, nb-1, v[perm[k+1]]*10^k); if (isprime(val), w = concat(w, val)); ); ); w = vecsort(w, , 8); for (i=1, #w, print1(w[i], ", ")); } \\ Michel Marcus, Jan 07 2014
CROSSREFS
KEYWORD
nonn,base
AUTHOR
G. L. Honaker, Jr., Mar 14 2000
EXTENSIONS
More terms from Enoch Haga, Date: Mar 14, 2000
STATUS
approved