login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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))
print([a(n) for n in range(1, 30)]) # Michael S. Branicky, Apr 20 2021
CROSSREFS
Sequence in context: A320934 A344063 A055296 * A217482 A099898 A003489
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

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 28 17:25 EDT 2024. Contains 371254 sequences. (Running on oeis4.)