login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A242334 Primes with property that when their binary representation is reversed we obtain a Fibonacci number. 1
2, 3, 5, 11, 59, 151, 317, 5441, 18427, 9033691613, 12756420479903, 1211140566276649, 401010813707734082716979, 74347828543021309956757002467819, 16538021251556158042076145869636347596983087 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
Hiroaki Yamanouchi, Table of n, a(n) for n = 1..21
EXAMPLE
a(1) = 2 because reverse(10b) = 01b = 1 = F(1).
a(6) = 151 because reverse(10010111b) = 11101001b = 233 = F(14).
PROG
(Python)
import math
def is_prime(n):
....if n % 2 == 0 and n > 2:
........return False
....return all(n % i for i in range(3, int(math.sqrt(n)) + 1, 2))
def dec_to_bin(x):
....return (bin(x)[2:])
fib = [1, 1]
for i in range(100):
....fib.append(fib[-1] + fib[-2])
for a in fib[3:]:
....b = dec_to_bin(a)
....c = b[::-1]
....d = int(c, 2)
....if is_prime(d) and c[0] != '0':
........print(d, c, b, a)
# David Consiglio, Jr., May 16 2014
CROSSREFS
Sequence in context: A114895 A083685 A243755 * A087524 A088053 A050444
KEYWORD
nonn,base
AUTHOR
Gil Broussard, May 15 2014
EXTENSIONS
a(10)-a(12) by David Consiglio, Jr., May 16 2014
a(13)-a(15) from Hiroaki Yamanouchi, Aug 24 2014
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 17 21:22 EDT 2024. Contains 371767 sequences. (Running on oeis4.)