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.

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.

This page as a plain text file.
%I A298643 #5 Nov 09 2018 18:30:11
%S A298643 11,191,2,223,5,2,227,7,3,2,2111,17,7,3,2,3847,31,13,7,3,2,229631,41,
%T A298643 23,11,5,3,2,246271,53,29,13,11,5,3,2,262111,157,47,17,31,11,5,3,2,
%U A298643 786431,229,53,19,47,13,7,5,3,2,1046527,239,101,23,71,17,13,7,5
%N 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.
%C A298643 Conjecture: All rows of the array are infinite.
%C A298643 If the above conjecture is false, then this should have keyword "tabf" rather than "tabl".
%C A298643 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).
%e A298643 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.
%e A298643 Array starts
%e A298643 11, 191, 223, 227, 2111, 3847, 229631, 246271, 262111, 786431, 1046527, 1047551
%e A298643 2,    5,   7,  17,   31,   41,     53,    157,    229,    239,     241,     251
%e A298643 2,    3,   7,  13,   23,   29,     47,     53,    101,    127,     149,     151
%e A298643 2,    3,   7,  11,   13,   17,     19,     23,     43,    131,     281,     311
%e A298643 2,    3,   5,  11,   31,   47,     71,     83,    103,    107,     151,     191
%e A298643 2,    3,   5,  11,   13,   17,     19,     23,     29,     37,      41,      43
%e A298643 2,    3,   5,   7,   13,   29,     31,     41,     43,     47,      59,      61
%e A298643 2,    3,   5,   7,   11,   13,     17,     19,     23,     37,      43,      47
%e A298643 2,    3,   5,   7,   13,   17,     31,     37,     71,     73,      79,      97
%e A298643 2,    3,   5,   7,   13,   17,     19,     23,     29,     31,      37,      43
%e A298643 2,    3,   5,   7,   11,   17,     61,     67,     71,     89,     137,     163
%o A298643 (PARI) switchdigits(v, pos) = my(vt=v[pos]); v[pos]=v[pos+1]; v[pos+1]=vt; v
%o A298643 decimal(v, base) = my(w=[]); for(k=0, #v-1, w=concat(w, v[#v-k]*base^k)); sum(i=1, #w, w[i])
%o A298643 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
%o A298643 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)))
%o A298643 array(6, 10) \\ print initial 6 rows and 10 columns of array
%Y A298643 Cf. A107845 (row 10), A129338.
%K A298643 nonn,tabl,base
%O A298643 2,1
%A A298643 _Felix Fröhlich_, Jan 24 2018