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
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