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 A161388 #20 Sep 08 2022 08:45:45 %S A161388 1,3,5,9,15,21,33,51,63,65,99,119,153,165,189,219,231,273,341,443,455, %T A161388 495,561,585,645,765,771,891,975,1365,1421,1533,1539,1755,1911,2049, %U A161388 2553,2661,2709,2829,2925,3075,3171,3339,3435,3483,3579,4095,4433,4529 %N A161388 (Odd) binary palindromes n such that 2*n + 1 is a prime. %H A161388 Chai Wah Wu, <a href="/A161388/b161388.txt">Table of n, a(n) for n = 1..8639</a> %F A161388 a(n) = (A161387(n) - 1)/2. %e A161388 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, 33 is in this sequence. %t A161388 (Select[Prime@Range[2,1500],(id=IntegerDigits[(#-1)/2,2]) == Reverse[id]&]-1)/2 (* _Ray Chandler_, Jun 09 2009*) %t A161388 fQ[n_] := Block[{id = IntegerDigits[n, 2]}, id == Reverse@ id]; Select[ Range@ 4592, fQ@# && PrimeQ[2 # + 1] &] (* _Robert G. Wilson v_, Jun 09 2009 *) %o A161388 (PARI) forprime(p=3,100000,t=binary((p-1)/2);if(t==vector(#t,x,t[ #t+1-x]),print1((p-1)/2,","))) \\ _Hagen von Eitzen_, Jun 10 2009 %o A161388 (Magma) [ n: p in PrimesInInterval(3, 9100) | s eq Reverse(s) where s is Intseq(n, 2) where n is (p-1) div 2]; // _Klaus Brockhaus_, Jun 09 2009 %Y A161388 Cf. A161387. %K A161388 base,nonn %O A161388 1,2 %A A161388 _Leroy Quet_, Jun 08 2009 %E A161388 Extended by _Hagen von Eitzen_, _Ray Chandler_, _Klaus Brockhaus_ and _Robert G. Wilson v_, Jun 09 2009