|
| |
|
|
A046810
|
|
Number of anagrams of n that are primes.
|
|
13
| |
|
|
0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 2, 1, 0, 1, 2, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 2, 1, 0, 1, 1, 0, 2, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 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, 1, 0, 1, 1, 0, 1, 2, 0
(list; graph; refs; listen; history; internal format)
|
|
|
|
OFFSET
| 1,13
|
|
|
COMMENTS
| An anagram of a k-digit number is one of the k! permutations of the digits that does not begin with 0.
|
|
|
LINKS
| Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
|
|
|
EXAMPLE
| 107 has 2 prime anagrams: 107 and 701 (but not 017 or 071); so a(107) = 2.
|
|
|
MATHEMATICA
| Table[Count[FromDigits/@Select[Permutations[IntegerDigits[n]], First[#] != 0&], _?(PrimeQ[#]&)], {n, 110}] (* From Harvey P. Dale, Aug 24 2011 *)
|
|
|
PROG
| (Haskell)
import Data.List (permutations, nub)
a046810 n = length $ filter ((== 1) . a010051)
$ map read (nub $ filter ((> '0') . head)
$ permutations $ show n)
-- Reinhard Zumkeller, Aug 14 2011
|
|
|
CROSSREFS
| Cf. A039999, A055098.
Sequence in context: A178665 A170958 A178651 * A039999 A069842 A083056
Adjacent sequences: A046807 A046808 A046809 * A046811 A046812 A046813
|
|
|
KEYWORD
| nonn,easy,base,nice
|
|
|
AUTHOR
| David W. Wilson (davidwwilson(AT)comcast.net)
|
| |
|
|