login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A046472 Primes that are palindromic in bases 2 and 10. 0

%I #25 Apr 10 2021 21:10:47

%S 3,5,7,313,7284717174827,390714505091666190505417093

%N Primes that are palindromic in bases 2 and 10.

%H P. De Geest, <a href="http://www.worldofnumbers.com/palpri.htm">World!Of Palindromic Primes</a>

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

%t Select[Prime[Range[10!]], IntegerDigits[#]==Reverse[IntegerDigits[#]] && IntegerDigits[#,2]==Reverse[IntegerDigits[#,2]]&] (* _Vladimir Joseph Stephan Orlovsky_, Dec 30 2010 *)

%t 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]

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

%K nonn,hard,base

%O 1,1

%A _Patrick De Geest_, Aug 15 1998

%E a(6) (from A007632) added by _T. D. Noe_, Dec 31 2010

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 08:27 EDT 2024. Contains 371964 sequences. (Running on oeis4.)