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 A046942 #40 Feb 16 2025 08:32:39 %S A046942 1,2,3,4,5,8114118,535252535,4025062605204 %N A046942 Numbers k such that k and prime(k) are both palindromes. %C A046942 Previous name: Indices of primes appearing in A046941. %C A046942 Also, intersection of A002113 and A075807. - _Ivan Neretin_, Jun 02 2016 %H A046942 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PalindromicPrime.html">Palindromic Prime</a>. %t A046942 NextPalindrome[n_] := Block[ {l = Floor[ Log[10, n] + 1], idn = IntegerDigits[n]}, If[ Union[ idn] == {9}, Return[n + 2], If[l < 2, Return[n + 1], If[ FromDigits[ Reverse[ Take[ idn, Ceiling[l/2]]]] FromDigits[ Take[ idn, -Ceiling[l/2]]], FromDigits[ Join[ Take[ idn, Ceiling[l/2]], Reverse[ Take[ idn, Floor[l/2]]] ]], idfhn = FromDigits[ Take[ idn, Ceiling[l/2]]] + 1; idp = FromDigits[ Join[ IntegerDigits[ idfhn], Drop[ Reverse[ IntegerDigits[ idfhn]], Mod[l, 2]]]] ]]]]; %t A046942 p = 0; Do[p = NextPalindrome[p]; While[ !PrimeQ[p], p = NextPalindrome[ p]]; q = IntegerDigits[ PrimePi[ p]]; If[Reverse[q] == q, Print[{p, FromDigits[q]}]], {n, 10^4}] (* _Robert G. Wilson v_, Feb 03 2005 *) %t A046942 ParallelDo[If [PalindromeQ @ i && PalindromeQ @ Prime @i, Print @i], {i, 6*10^8}] (* _Mikk Heidemaa_, May 24 2024 *) %Y A046942 Equals pi(A046941). %Y A046942 Cf. A046941, A103357, A103358, A103402, A103403. %K A046942 nice,nonn,base,more %O A046942 1,2 %A A046942 _Carlos Rivera_ %E A046942 a(7) from _Giovanni Resta_, May 14 2003 %E A046942 New name and offset by _Ivan Neretin_, Jun 02 2016 %E A046942 a(8) from _Giovanni Resta_, Aug 10 2019