login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A204232 Numbers whose binary reversal is prime. 3
3, 5, 6, 7, 10, 11, 12, 13, 14, 17, 20, 22, 23, 24, 25, 26, 28, 29, 31, 34, 37, 40, 41, 43, 44, 46, 47, 48, 50, 52, 53, 55, 56, 58, 61, 62, 67, 68, 71, 73, 74, 77, 80, 82, 83, 86, 88, 91, 92, 94, 96, 97, 100, 101, 104, 106, 107, 110, 112, 113, 115, 116, 121 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

Base-2 analog of A095179.

If k is a term, then 2*k is a term too. - Michel Marcus, Apr 19 2020

LINKS

Michel Marcus, Table of n, a(n) for n = 1..1000

EXAMPLE

3, 5 and 7 are in the sequence because their binary reversal, equal to themselves, is prime.

a(3)=6 is in the sequence, because 6=110[2] (written in base 2), whose reversal 011[2]=3 is prime.

a(5)=11 is in the sequence, because 11=1011[2] (written in base 2), whose reversal 1101[2]=13 is prime.

MATHEMATICA

Select[Range[170], PrimeQ[FromDigits[Reverse[IntegerDigits[#, 2]], 2]] &] (* Alonso del Arte, Jan 13 2012 *)

PROG

(PARI) for(n=1, 1e2, isprime((t=binary(n))*vector(#t, i, 1<<i)~\2) & print1(n", "))

(Python)

from sympy import isprime

def ok(n): return isprime(int(bin(n)[2:][::-1], 2))

print(list(filter(ok, range(1, 122)))) # Michael S. Branicky, Sep 06 2021

CROSSREFS

Cf. A030101, A095179.

Positions of 2's in A227864.

Sequence in context: A232682 A335657 A038550 * A028730 A028747 A136806

Adjacent sequences:  A204229 A204230 A204231 * A204233 A204234 A204235

KEYWORD

nonn,base,easy,changed

AUTHOR

M. F. Hasler, Jan 13 2012

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 September 18 05:40 EDT 2021. Contains 347509 sequences. (Running on oeis4.)