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.

A056145 Palindromic primes in bases 2 and 8.

This page as a plain text file.
%I A056145 #7 Sep 23 2017 13:45:32
%S A056145 3,5,7,73,28807,31727,262657,295433,1311749,1385621,1478189,1540157,
%T A056145 1543741,1549501,1551037,1865159,1932247,2031599,2067007,2085247,
%U A056145 2087807,83914757,84663941,85742021,85808581,88779413,89420117,89466197,89924053,90169301,94971053,94983341
%N A056145 Palindromic primes in bases 2 and 8.
%t A056145 Do[ If[ PrimeQ[ n ], t=RealDigits[ n, 8 ][ [ 1 ] ]; If[ FromDigits[ t ]==FromDigits[ Reverse[ t ] ], s=RealDigits[ n, 2 ][ [ 1 ] ]; If[ FromDigits[ s ]==FromDigits[ Reverse[ s ] ], Print[ n ] ] ] ], {n, 1, 10^8} ]
%t A056145 Select[Prime[Range[155000]],PalindromeQ[IntegerDigits[#,2]] && PalindromeQ[ IntegerDigits[ #,8]]&] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, Sep 23 2017 *)
%Y A056145 Cf. A016041 and A029976.
%K A056145 nonn,base
%O A056145 1,1
%A A056145 _Robert G. Wilson v_, Jul 29 2000
%E A056145 More terms from _Harvey P. Dale_, Sep 23 2017