|
|
A221158
|
|
Fibonacci numbers with two 1's in the binary representation.
|
|
3
|
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
Fibonacci numbers of the form 2^a + 2^b, a>b.
Elkies (2014) proved that there are no other terms.
|
|
LINKS
|
|
|
EXAMPLE
|
144 = 128 + 16 = 2^7 + 2^4, thus it is in the sequence.
|
|
MATHEMATICA
|
Select[Fibonacci[Range[1000]], DigitCount[#, 2, 1] == 2 &] (* Alonso del Arte, Feb 21 2013 *)
|
|
PROG
|
(Python)
prev = 0
curr = 1
for n in range(3000000):
c = 0 # count 1's
p = 1
while p<=prev:
c += ((prev & p) > 0)
if c>2:
break
p += p
if n&1023==0:
print '.',
if c==2:
print prev,
prev, curr = curr, prev+curr
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,full,fini
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|