

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 distinctdigit prime without 0's is 98765431. Thus, a(n) = 0 for n >= 9.  Michael S. Branicky, Apr 20 2021


LINKS

Table of n, a(n) for n=1..81.


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))
print([a(n) for n in range(1, 30)]) # Michael S. Branicky, Apr 20 2021


CROSSREFS

Cf. A112371, A073532.
Sequence in context: A320934 A344063 A055296 * A217482 A099898 A003489
Adjacent sequences: A140529 A140530 A140531 * A140533 A140534 A140535


KEYWORD

nonn,base


AUTHOR

Norman Morton (mathtutorer(AT)yahoo.com), Jul 03 2008


EXTENSIONS

Corrected by Charles R Greathouse IV, Aug 02 2010


STATUS

approved



