|
|
A053095
|
|
Number of primes having exactly the same digits as appear in first n primes.
|
|
3
|
|
|
|
OFFSET
|
1,4
|
|
COMMENTS
|
|
|
LINKS
|
|
|
EXAMPLE
|
a(4)=8 because the first three prime n, concatenated, are 2+3+5+7 or 2357. There are 8 prime arrangements: 2357 2753 3257 3527 5237 5273 7253 7523.
|
|
PROG
|
(Python)
from sympy import isprime, prime
from sympy.utilities.iterables import multiset_permutations
return sum(1 for d in multiset_permutations(''.join(str(prime(m+1)) for m in range(n))) if isprime(int(''.join(d)))) # Chai Wah Wu, Mar 17 2019
|
|
CROSSREFS
|
|
|
KEYWORD
|
base,nonn,more
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|