|
|
A052493
|
|
Primes whose digits can be rearranged to give the initial terms of the decimal expansion of Pi.
|
|
1
|
|
|
3, 13, 31, 431, 13451, 14153, 15413, 31541, 34511, 35141, 41351, 41513, 43151, 45131, 51341, 51413, 51431, 53411, 54311, 114593, 134591, 134951, 141359, 141539, 143159, 143519, 145139, 145193, 145391, 145931, 149153, 149351, 149531
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
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
|
|
|
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
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|