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.

A108387 Doubly-transmutable primes: primes such that simultaneously exchanging pairwise all occurrences of any two disjoint pairs of distinct digits results in a prime.

This page as a plain text file.
%I A108387 #8 Jul 27 2020 15:51:21
%S A108387 113719,131797,139177,139397,193937,313979,317179,317399,331937,
%T A108387 371719,739391,779173,793711,793931,797131,917173,971713,971933,
%U A108387 979313,997391,1111793,3333971,7777139,9999317,13973731,31791913,79319197,97137379
%N A108387 Doubly-transmutable primes: primes such that simultaneously exchanging pairwise all occurrences of any two disjoint pairs of distinct digits results in a prime.
%C A108387 By my definition of (a nontrivial) transmutable prime, each digit of each term must be capable of being an ending digit of a prime, so this sequence is a subsequence of A108387, primes p such that p's set of distinct digits is {1,3,7,9}. The repunit primes (A004022), which would otherwise trivially be (doubly-)transmutable and primes whose distinct digits are other proper subsets of {1,3,7,9} are excluded here by the two-disjoint-pair condition.
%H A108387 Robert Israel, <a href="/A108387/b108387.txt">Table of n, a(n) for n = 1..1000</a>
%e A108387 a(0) = 113719 as this is the first prime having four distinct digits and such that all three simultaneous pairwise exchanges of all distinct digits as shown below 'transmutate' the original prime into other primes:
%e A108387 (1,3) and (7,9): 113719 ==> 331937 (prime),
%e A108387 (1,7) and (3,9): 113719 ==> 779173 (prime),
%e A108387 (1,9) and (3,7): 113719 ==> 997391 (prime).
%p A108387 N:= 100: # to get a(1) to a(N)
%p A108387 R:= NULL: count:= 0:
%p A108387 S[1] := [0=1,1=3,2=7,3=9]:
%p A108387 S[2] := [0=3,1=1,2=9,3=7]:
%p A108387 S[3] := [0=7,1=9,2=1,3=3]:
%p A108387 S[4] := [0=9,1=7,2=3,3=1]:
%p A108387 g:= L -> add(L[i]*10^(i-1),i=1..nops(L)):
%p A108387 for d from 6 while count < N do
%p A108387 for n from 4^d to 2*4^d-1 while count < N do
%p A108387   L:= convert(n,base,4)[1..-2];
%p A108387   if nops(convert(L,set)) < 4 then next fi;
%p A108387   if andmap(isprime,[seq(g(subs(S[i],L)),i=1..4)]) then
%p A108387     R:= R, g(subs(S[1],L)); count:= count+1;
%p A108387   fi
%p A108387 od od:
%p A108387 R; # _Robert Israel_, Jul 27 2020
%Y A108387 Cf. A108387, A108388 (transmutable primes), A108389 (transmutable primes with four distinct digits), A107845 (transposable-digit primes), A003459 (absolute primes).
%K A108387 base,nonn
%O A108387 1,1
%A A108387 _Rick L. Shepherd_, Jun 02 2005
%E A108387 Offset changed by _Robert Israel_, Jul 27 2020