|
|
A140532
|
|
Number of primes with n distinct decimal digits, none of which are 0.
|
|
1
|
|
|
4, 20, 83, 395, 1610, 5045, 12850, 23082, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
a(9) is zero because 1+2+...+9 = 45 which is divisible by 3, making any number with 9 distinct digits also divisible by 3. - Wei Zhou, Oct 02 2011
The maximal distinct-digit prime without 0's is 98765431. Thus, a(n) = 0 for n >= 9. - Michael S. Branicky, Apr 20 2021
|
|
LINKS
|
|
|
EXAMPLE
|
a(1) = #{2,3,5,7} = 4.
a(2) = #{13,17,19,23,...,97} = 20. Note that the prime 11 is omitted because its decimal digits are not distinct.
|
|
MATHEMATICA
|
Length /@ Table[Select[FromDigits /@ Permutations[Range@9, {i}], PrimeQ], {i, 9}] (* Wei Zhou, Oct 02 2011 *)
|
|
PROG
|
(Python)
from itertools import permutations
from sympy import isprime, primerange
def distinct_digs(n): s = str(n); return len(s) == len(set(s))
def a(n):
if n >= 9: return 0
return sum(isprime(int("".join(p))) for p in permutations("123456789", n))
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
Norman Morton (mathtutorer(AT)yahoo.com), Jul 03 2008
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|