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 A134971 #38 Jan 16 2023 14:49:11 %S A134971 101,313,727,757,919,929,3023,3203,7027,7057,7127,7207,7237,7247,7307, %T A134971 7417,7457,7507,7517,7537,7547,7607,9029,9049,9059,9109,9209,9239, %U A134971 9319,9349,9419,9439,9479,9539,9619,9629,9649,9679,9689,9719,9739,9749,9769,9829 %N A134971 Canyon primes. %C A134971 Intersection of prime numbers and Canyon numbers ("Canyon primes"). This sequence is finite because A134970 is. There are 9237 Canyon primes (compare to 116505 Canyon numbers total). The largest Canyon prime (and last element of this sequence) is a(9237) = 98765432101456789. %H A134971 Kellen Myers, <a href="/A134971/b134971.txt">Table of n, a(n) for n = 1..9237</a> %F A134971 A000040 INTERSECT A134970. %e A134971 Illustration of 751367 as a Canyon prime: %e A134971 . . . . . . %e A134971 . . . . . . %e A134971 7 . . . . 7 %e A134971 . . . . 6 . %e A134971 . 5 . . . . %e A134971 . . . . . . %e A134971 . . . 3 . . %e A134971 . . . . . . %e A134971 . . 1 . . . %e A134971 . . . . . . %t A134971 S = {}; c = 1; %t A134971 For[n = 1, n <= 9, n++, %t A134971 L = 2 n - 1; %t A134971 d = Join[Reverse[Range[1, n - 1]], Range[0, n - 1]]; %t A134971 If[Mod[n, 2] != 0 && n != 5, %t A134971 For[j = 1, j < 2^L, j++, %t A134971 Dig = d[[Map[#[[1]] &, Position[IntegerDigits[j, 2, L], 1]]]]; %t A134971 min = Min[Dig]; %t A134971 If[Length[Position[Dig, min]] == 1, %t A134971 p = FromDigits[Join[{n}, Dig, {n}]]; %t A134971 If[PrimeQ[p], S = Append[S, p]]; %t A134971 ]; %t A134971 ]; %t A134971 ]; %t A134971 ]; (* _Kellen Myers_, Jan 18 2011 *) %o A134971 (Python) %o A134971 from sympy import isprime %o A134971 from itertools import chain, combinations as combs %o A134971 ups = list(chain.from_iterable(combs(range(10), r) for r in range(2, 11))) %o A134971 s = set(L[::-1] + R[1:] for L in ups for R in ups if L[0] == R[0]) %o A134971 afull = sorted(filter(isprime, (int("".join(map(str, t))) for t in s if t[0] == t[-1]))) %o A134971 print(afull[:44]) # _Michael S. Branicky_, Jan 16 2023 %Y A134971 Cf. A000040, A134951, Primes in A134970. %K A134971 nonn,base,fini,full %O A134971 1,1 %A A134971 _Omar E. Pol_, Nov 25 2007 %E A134971 All terms past 3203, more comments, etc. by _Kellen Myers_, Jan 18 2011