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.
%I A161387 #19 Sep 08 2022 08:45:45 %S A161387 3,7,11,19,31,43,67,103,127,131,199,239,307,331,379,439,463,547,683, %T A161387 887,911,991,1123,1171,1291,1531,1543,1783,1951,2731,2843,3067,3079, %U A161387 3511,3823,4099,5107,5323,5419,5659,5851,6151,6343,6679,6871,6967,7159,8191 %N A161387 Primes p such that (p-1)/2 is an (odd) binary palindrome. %H A161387 Amiram Eldar, <a href="/A161387/b161387.txt">Table of n, a(n) for n = 1..10000</a> %F A161387 a(n) = 2*A161388(n) + 1. %e A161387 67 in binary is 1000011. All binary digits but the rightmost 1 form a palindrome (100001), so therefore (67-1)/2 = 33 is a palindrome. Since 67 is a prime, it is in this sequence. %t A161387 Select[Prime@Range[2,1500],(id=IntegerDigits[(#-1)/2,2])==Reverse[id]&] (* _Ray Chandler_, Jun 09 2009 *) %t A161387 fQ[n_] := Block[{id = IntegerDigits[(n - 1)/2, 2]}, id == Reverse@id]; Select[ Prime@ Range[2, 1100], fQ@# &] (* _Robert G. Wilson v_, Jun 09 2009 *) %o A161387 (Magma) [ p: p in PrimesInInterval(3, 8200) | s eq Reverse(s) where s is Intseq((p-1) div 2, 2) ]; // _Klaus Brockhaus_, Jun 09 2009 %o A161387 (PARI) forprime(p=3,100000,t=binary((p-1)/2);if(t==vector(#t,x,t[ #t+1-x]),print1(p,","))) \\ _Hagen von Eitzen_, Jun 10 2009 %Y A161387 Cf. A161388. %Y A161387 Terms include A000668. - _Robert G. Wilson v_, Jun 09 2009 %K A161387 base,nonn %O A161387 1,1 %A A161387 _Leroy Quet_, Jun 08 2009 %E A161387 Extended by _Hagen von Eitzen_, _Ray Chandler_, _Klaus Brockhaus_ and _Robert G. Wilson v_, Jun 09 2009