Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A039999
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
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

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified November 27 22:38 EST 2009. Contains 167602 sequences.


AT&T Labs Research