cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A227795 For each base, b, beginning with binary, the number of (b-1)-digit primes with one copy of each digit save one.

This page as a plain text file.
%I A227795 #19 Sep 27 2015 10:29:39
%S A227795 0,3,1,9,52,283,2113,16142,145227,1359133,15000161,172888810,
%T A227795 2217146126
%N A227795 For each base, b, beginning with binary, the number of (b-1)-digit primes with one copy of each digit save one.
%C A227795 Note that only decimal 2, 11 and 19 are representable in some base using a copy of each digit in that base (base 2 for the first and base 3 for the others), as a number written in base b with a single copy of each digit is congruent to either 0 or (b-1)/2 modulo b-1.
%e A227795 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.
%o A227795 (PARI) \\ Starts at base 4 and prints in form 'base:count', bases 2 and 3 done by hand.
%o A227795 {
%o A227795 b=4;while(1,
%o A227795 c=0;for(i=1,b!,perm=numtoperm(b,i);
%o A227795 if(perm[b-1]!=1,
%o A227795 if(gcd(b,perm[1]-1)==1,
%o A227795 if(gcd(b-1,perm[b]-1)==1,
%o A227795 n=sum(j=1,b-1,(perm[j]-1)*b^(j-1));
%o A227795 if(ispseudoprime(n),c++)))));
%o A227795 print1(b":"c"\n");b++)
%o A227795 }
%Y A227795 Cf. A073643, A116670.
%K A227795 nonn,base,less
%O A227795 2,2
%A A227795 _James G. Merickel_, Sep 23 2013
%E A227795 a(14) added by _James G. Merickel_, Oct 14 2013