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.
%I A323396 #18 Feb 22 2019 11:27:00 %S A323396 2,23,2,3,11,2,3,13,17,67,2,3,5,17,23,83,191,479,839,2,3,5,17,19,23, %T A323396 37,2,3,5,7,19,23,29,31,43,47,59,61,139,157,239,251,331,349,379,479, %U A323396 491,1867,2,3,5,7,23,29,47,173,2,3,5,7,23,37,53,73,313,317,373,797,3137,3797,739397 %N A323396 Irregular array read by rows, where T(n, k) is the k-th prime that is both left-truncatable and right-truncatable in base n. %C A323396 The n-th row contains A323390(n) terms. %C A323396 The largest term in the n-th row is given by A323137(n). %H A323396 Daniel Suteu, <a href="/A323396/b323396.txt">Table of n, a(n) for n = 3..6587</a> %H A323396 Wikipedia, <a href="https://en.wikipedia.org/wiki/Truncatable_prime">Truncatable prime</a> %e A323396 Rows for n = 3..7: %e A323396 [2, 23] %e A323396 [2, 3, 11] %e A323396 [2, 3, 13, 17, 67] %e A323396 [2, 3, 5, 17, 23, 83, 191, 479, 839] %e A323396 [2, 3, 5, 17, 19, 23, 37] %o A323396 (PARI) %o A323396 digitsToNum(d, base) = sum(k=1, #d, base^(k-1) * d[k]); %o A323396 isLeftTruncatable(d, base) = my(ok=1); for(k=1, #d, if(!isprime(digitsToNum(d[1..k], base)), ok=0; break)); ok; %o A323396 generateFromPrefix(p, base) = my(seq = [p]); for(n=1, base-1, my(t=concat(n, p)); if(isprime(digitsToNum(t, base)), seq=concat(seq, select(v -> isLeftTruncatable(v, base), generateFromPrefix(t, base))))); seq; %o A323396 bothTruncatablePrimesInBase(base) = my(t=[]); my(P=primes(primepi(base-1))); for(k=1, #P, t=concat(t, generateFromPrefix([P[k]], base))); vector(#t, k, digitsToNum(t[k], base)); %o A323396 row(n) = vecsort(bothTruncatablePrimesInBase(n)); %o A323396 T(n,k) = row(n)[k]; %Y A323396 Cf. A020994, A076586, A076623, A323137, A323390. %K A323396 nonn,base,look,tabf %O A323396 3,1 %A A323396 _Daniel Suteu_ and _Felix Fröhlich_, Jan 13 2019