|
Search: id:A039999
|
|
|
| A039999 |
|
Number of permutations of digits of n which denote primes. |
|
+0 14
|
|
| 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 2, 1, 0, 1, 2, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 2, 1, 0, 1, 1, 0, 2, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 2, 0, 2, 1, 0, 1, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 2, 1, 0, 0, 2, 0, 3, 2, 0
(list; graph; listen)
|
|
|
OFFSET
|
1,13
|
|
|
COMMENT
|
Consider all k! permutations of digits of a k-digit number n, discard initial zeros, count distinct primes.
|
|
LINKS
|
T. D. Noe, Table of n, a(n) for n=1..10000
C. Hilliard, PARI program.
|
|
EXAMPLE
|
a(20)=1, since from {02, 20} we get {2,20} and only 2 is prime. From 107 we get 4 primes: (0)17, (0)71, 107 and 701; so a(107) = 4.
|
|
PROGRAM
|
(PARI) for(x=1, 400, print1(permprime(x), ", ")) /* for definition of function permprime cf. link */ [From Cino Hilliard (hillcino368(AT)hotmail.com), Jun 07 2009]
(MAGMA) [ #[ s: s in Seqset([ Seqint([m(p[i]):i in [1..#x] ], 10): p in Permutations(Seqset(x)) ]) | IsPrime(s) ] where m is map< x->y | [<x[i], y[i]>:i in [1..#x] ] > where x is [1..#y] where y is Intseq(n, 10): n in [1..120] ]; [From Klaus Brockhaus, Jun 15 2009]
|
|
CROSSREFS
|
Cf. A046810.
Sequence in context: A063933 A085860 A046810 this_sequence A069842 A083056 A061896
Adjacent sequences: A039996 A039997 A039998 this_sequence A040000 A040001 A040002
|
|
KEYWORD
|
nonn,base,nice,easy
|
|
AUTHOR
|
Dave Wilson
|
|
EXTENSIONS
|
Contribution of C. Hilliard edited by Klaus Brockhaus (klaus-brockhaus(AT)t-online.de), Jun 15 2009
|
|
|
Search completed in 0.002 seconds
|