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.

A046472 Primes that are palindromic in bases 2 and 10.

Original entry on oeis.org

3, 5, 7, 313, 7284717174827, 390714505091666190505417093
Offset: 1

Views

Author

Patrick De Geest, Aug 15 1998

Keywords

Examples

			313_10 = 100111001_2. - _Jon E. Schoenfield_, Apr 10 2021
		

Crossrefs

Cf. A002385 (palindromic primes), A007632 (palindromes in bases 2 and 10).

Programs

  • Mathematica
    Select[Prime[Range[10!]], IntegerDigits[#]==Reverse[IntegerDigits[#]] && IntegerDigits[#,2]==Reverse[IntegerDigits[#,2]]&] (* Vladimir Joseph Stephan Orlovsky, Dec 30 2010 *)
    p = Sort[Reap[Do[d=IntegerDigits[n]; p1=FromDigits[Join[Most[d], Reverse[d]]]; p2=FromDigits[Join[d, Reverse[d]]]; If[IntegerDigits[p1, 2] == Reverse[IntegerDigits[p1, 2]], Sow[p1]]; If[IntegerDigits[p2, 2] == Reverse[IntegerDigits[p2, 2]], Sow[p2]], {n, 0, 9999999}]][[2, 1]]]; Select[p, PrimeQ]

Extensions

a(6) (from A007632) added by T. D. Noe, Dec 31 2010