A227795 For each base, b, beginning with binary, the number of (b-1)-digit primes with one copy of each digit save one.
0, 3, 1, 9, 52, 283, 2113, 16142, 145227, 1359133, 15000161, 172888810, 2217146126
Offset: 2
Examples
In base 3, 10, 12 and 21 are primes: Decimal 3, 5 and 7. In base 4, of the possibilities only 103 is prime: Decimal 19.
Programs
-
PARI
\\ Starts at base 4 and prints in form 'base:count', bases 2 and 3 done by hand. { b=4;while(1, c=0;for(i=1,b!,perm=numtoperm(b,i); if(perm[b-1]!=1, if(gcd(b,perm[1]-1)==1, if(gcd(b-1,perm[b]-1)==1, n=sum(j=1,b-1,(perm[j]-1)*b^(j-1)); if(ispseudoprime(n),c++))))); print1(b":"c"\n");b++) }
Extensions
a(14) added by James G. Merickel, Oct 14 2013
Comments