login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A161388 (Odd) binary palindromes n such that 2*n + 1 is a prime. 2
1, 3, 5, 9, 15, 21, 33, 51, 63, 65, 99, 119, 153, 165, 189, 219, 231, 273, 341, 443, 455, 495, 561, 585, 645, 765, 771, 891, 975, 1365, 1421, 1533, 1539, 1755, 1911, 2049, 2553, 2661, 2709, 2829, 2925, 3075, 3171, 3339, 3435, 3483, 3579, 4095, 4433, 4529 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

LINKS

Chai Wah Wu, Table of n, a(n) for n = 1..8639

FORMULA

a(n) = (A161387(n) - 1)/2.

EXAMPLE

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.

MATHEMATICA

(Select[Prime@Range[2, 1500], (id=IntegerDigits[(#-1)/2, 2]) == Reverse[id]&]-1)/2 (* Ray Chandler, Jun 09 2009*)

fQ[n_] := Block[{id = IntegerDigits[n, 2]}, id == Reverse@ id]; Select[ Range@ 4592, fQ@# && PrimeQ[2 # + 1] &] (* Robert G. Wilson v, Jun 09 2009 *)

PROG

(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

(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

CROSSREFS

Cf. A161387.

Sequence in context: A045602 A029470 A182185 * A229552 A029518 A061954

Adjacent sequences:  A161385 A161386 A161387 * A161389 A161390 A161391

KEYWORD

base,nonn

AUTHOR

Leroy Quet, Jun 08 2009

EXTENSIONS

Extended by Hagen von Eitzen, Ray Chandler, Klaus Brockhaus and Robert G. Wilson v, Jun 09 2009

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified February 15 22:28 EST 2019. Contains 320138 sequences. (Running on oeis4.)