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.

A099744 Palindromes n such that 10n01 is a prime.

Original entry on oeis.org

3, 5, 6, 222, 282, 353, 434, 555, 626, 656, 747, 828, 858, 929, 939, 10301, 10601, 11411, 11711, 12821, 12921, 13431, 13731, 14141, 14241, 14741, 15951, 16161, 17171, 17771, 18381, 18981, 19191, 19491, 19991, 20402, 20702, 22022, 22322
Offset: 1

Views

Author

N. J. A. Sloane, Nov 19 2004

Keywords

Crossrefs

Programs

  • Maple
    read transforms; pal:=[]; for n from 0 to 8000 do if digrev(n) = n then pal:=[op(pal),n]; fi; od:
    t0:=[]; u0:=[]; for n from 1 to nops(pal) do m:=pal[n]; p0:="10"; p1:="01"; t1:=cat(p0,m,p1); t1:=convert(t1,decimal,10); if isprime(t1) then t0:=[op(t0),m]; u0:=[op(u0),t1]; fi; od: t0; # u0 gives A099746.
  • Mathematica
    p = Select[ Range[ 22322], # == FromDigits[ Reverse[ IntegerDigits[ # ]]] &]; Select[p, PrimeQ[ FromDigits[ Join[{1, 0}, IntegerDigits[ # ], {0, 1}]]] &] (* Robert G. Wilson v, Nov 20 2004 *)
    Select[Range[23000],PalindromeQ[#]&&PrimeQ[FromDigits[Join[{1,0},IntegerDigits[ #],{0,1}]]]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Mar 26 2021 *)

Extensions

More terms from Robert G. Wilson v, Nov 19 2004