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.

Showing 1-3 of 3 results.

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

Original entry on oeis.org

113719, 131797, 139177, 139397, 193937, 313979, 317179, 317399, 331937, 371719, 739391, 779173, 793711, 793931, 797131, 917173, 971713, 971933, 979313, 997391, 1111793, 3333971, 7777139, 9999317, 13973731, 31791913, 79319197, 97137379
Offset: 1

Views

Author

Rick L. Shepherd, Jun 02 2005

Keywords

Comments

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.

Examples

			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:
(1,3) and (7,9): 113719 ==> 331937 (prime),
(1,7) and (3,9): 113719 ==> 779173 (prime),
(1,9) and (3,7): 113719 ==> 997391 (prime).
		

Crossrefs

Cf. A108387, A108388 (transmutable primes), A108389 (transmutable primes with four distinct digits), A107845 (transposable-digit primes), A003459 (absolute primes).

Programs

  • Maple
    N:= 100: # to get a(1) to a(N)
    R:= NULL: count:= 0:
    S[1] := [0=1,1=3,2=7,3=9]:
    S[2] := [0=3,1=1,2=9,3=7]:
    S[3] := [0=7,1=9,2=1,3=3]:
    S[4] := [0=9,1=7,2=3,3=1]:
    g:= L -> add(L[i]*10^(i-1),i=1..nops(L)):
    for d from 6 while count < N do
    for n from 4^d to 2*4^d-1 while count < N do
      L:= convert(n,base,4)[1..-2];
      if nops(convert(L,set)) < 4 then next fi;
      if andmap(isprime,[seq(g(subs(S[i],L)),i=1..4)]) then
        R:= R, g(subs(S[1],L)); count:= count+1;
      fi
    od od:
    R; # Robert Israel, Jul 27 2020

Extensions

Offset changed by Robert Israel, Jul 27 2020

A108389 Transmutable primes with four distinct digits.

Original entry on oeis.org

133999337137, 139779933779, 173139331177, 173399913979, 177793993177, 179993739971, 391331737931, 771319973999, 917377131371, 933971311913, 997331911711, 1191777377177, 9311933973733, 9979333919939, 19979113377173, 31997131171111, 37137197179931, 37337319113911
Offset: 1

Views

Author

Rick L. Shepherd, Jun 02 2005

Keywords

Comments

This sequence is a subsequence of A108386 and of A108388. See the latter for the definition of transmutable primes and many more comments. Are any terms here doubly-transmutable also; i.e., terms of A108387? Palindromic too? Terms also of some other sequences cross-referenced below? a(7)=771319973999 is also a reversible prime (emirp). a(12)=9311933973733 also has the property that simultaneously removing all its 1's (93933973733), all its 3s (9119977) and all its 9s (3113373733) result in primes (but removing all 7s gives 93119339333=43*47*59*83*97^2, so a(12) is not also a term of A057876). Any additional terms have 14 or more digits.

Examples

			a(0)=133999337137 is the smallest transmutable prime with four distinct digits (1,3,7,9):
exchanging all 1's and 3's: 133999337137 ==> 311999117317 (prime),
exchanging all 1's and 7's: 133999337137 ==> 733999331731 (prime),
exchanging all 1's and 9's: 133999337137 ==> 933111337937 (prime),
exchanging all 3's and 7's: 133999337137 ==> 177999773173 (prime),
exchanging all 3's and 9's: 133999337137 ==> 199333997197 (prime) and
exchanging all 7's and 9's: 133999337137 ==> 133777339139 (prime).
No smaller prime with four distinct digits transmutes into six other primes.
		

Crossrefs

Cf. A108386 (Primes p such that p's set of distinct digits is {1, 3, 7, 9}), A108388 (transmutable primes), A083983 (transmutable primes with two distinct digits), A108387 (doubly-transmutable primes), A006567 (reversible primes), A002385 (palindromic primes), A068652 (every cyclic permutation is prime), A107845 (transposable-digit primes), A003459 (absolute primes), A057876 (droppable-digit primes).

Extensions

a(14) and beyond from Michael S. Branicky, Dec 15 2023

A298643 Array A(n, k) read by antidiagonals downwards: k-th base-n non-repunit prime p such that all numbers resulting from switching any two adjacent digits in the base-n representation of p are prime, where k runs over the positive integers, i.e., the offset of k is 1.

Original entry on oeis.org

11, 191, 2, 223, 5, 2, 227, 7, 3, 2, 2111, 17, 7, 3, 2, 3847, 31, 13, 7, 3, 2, 229631, 41, 23, 11, 5, 3, 2, 246271, 53, 29, 13, 11, 5, 3, 2, 262111, 157, 47, 17, 31, 11, 5, 3, 2, 786431, 229, 53, 19, 47, 13, 7, 5, 3, 2, 1046527, 239, 101, 23, 71, 17, 13, 7, 5
Offset: 2

Views

Author

Felix Fröhlich, Jan 24 2018

Keywords

Comments

Conjecture: All rows of the array are infinite.
If the above conjecture is false, then this should have keyword "tabf" rather than "tabl".
Row n is a supersequence of the base-n non-repunit absolute primes. For example, row 10 (A107845) is a supersequence of the decimal non-repunit absolute primes (A129338).

Examples

			The base-3 representation of 251 is 100022. Base-3 numbers that can be obtained by switching any two adjacent base-3 digits are 10022 and 100202. These two numbers are 89 and 263, respectively, when converted to decimal, and both 89 and 263 are prime. Since 251 is the 12th number with this property in base 3, A(3, 12) = 251.
Array starts
11, 191, 223, 227, 2111, 3847, 229631, 246271, 262111, 786431, 1046527, 1047551
2,    5,   7,  17,   31,   41,     53,    157,    229,    239,     241,     251
2,    3,   7,  13,   23,   29,     47,     53,    101,    127,     149,     151
2,    3,   7,  11,   13,   17,     19,     23,     43,    131,     281,     311
2,    3,   5,  11,   31,   47,     71,     83,    103,    107,     151,     191
2,    3,   5,  11,   13,   17,     19,     23,     29,     37,      41,      43
2,    3,   5,   7,   13,   29,     31,     41,     43,     47,      59,      61
2,    3,   5,   7,   11,   13,     17,     19,     23,     37,      43,      47
2,    3,   5,   7,   13,   17,     31,     37,     71,     73,      79,      97
2,    3,   5,   7,   13,   17,     19,     23,     29,     31,      37,      43
2,    3,   5,   7,   11,   17,     61,     67,     71,     89,     137,     163
		

Crossrefs

Cf. A107845 (row 10), A129338.

Programs

  • PARI
    switchdigits(v, pos) = my(vt=v[pos]); v[pos]=v[pos+1]; v[pos+1]=vt; v
    decimal(v, base) = my(w=[]); for(k=0, #v-1, w=concat(w, v[#v-k]*base^k)); sum(i=1, #w, w[i])
    is(p, base) = my(db=digits(p, base)); if(vecmin(db)==1 && vecmax(db)==1, return(0)); for(k=1, #db-1, my(x=decimal(switchdigits(db, k), base)); if(!ispseudoprime(x), return(0))); 1
    array(n, k) = for(x=2, n+1, my(i=0); forprime(p=1, , if(is(p, x), print1(p, ", "); i++); if(i==k, print(""); break)))
    array(6, 10) \\ print initial 6 rows and 10 columns of array
Showing 1-3 of 3 results.