OFFSET
1,2
COMMENTS
Differences between successive primes that are palindromic in base 2.
3, 5, 7, 17, 31, 73, 107, 127, 257, 313, 443, 1193, 1453, 1571, 1619, 1787, 1831, 1879, ...
MATHEMATICA
f[n_]:=FromDigits[RealDigits[n, 2][[1]]]==FromDigits[Reverse[RealDigits[n, 2][[1]]]]; a=3; lst={}; Do[p=Prime[n]; If[f[p], AppendTo[lst, p-a]; a=p], {n, 2, 8!, 1}]; lst
Join[{0}, Differences[Select[Prime[Range[5000]], IntegerDigits[#, 2]== Reverse[ IntegerDigits[ #, 2]]&]]] (* Harvey P. Dale, Aug 17 2024 *)
CROSSREFS
KEYWORD
nonn,less,base
AUTHOR
Vladimir Joseph Stephan Orlovsky, Aug 10 2009
EXTENSIONS
Definition corrected by Charles R Greathouse IV, Oct 08 2009
STATUS
approved