OFFSET
1,1
COMMENTS
Conjecture: the sequence is infinite.
The sequence of Fibonacci numbers with the same number of 1's and 0's in their binary representation begins: 2, 14930352, 267914296, ... = A259407.
LINKS
David Radcliffe, Table of n, a(n) for n = 1..10000 (terms 1..400 from T. D. Noe).
EXAMPLE
Fibonacci(36) = 14930352 = 111000111101000110110000_2, twelve 1's and twelve 0's, therefore 36 is in the sequence.
MATHEMATICA
fQ[n_] := Module[{f = IntegerDigits[Fibonacci[n], 2]}, Count[f, 0] == Count[f, 1]]; Select[Range[3000], fQ] (* T. D. Noe, Mar 08 2013 *)
Position[Fibonacci[Range[2500]], _?(DigitCount[#, 2, 1]==DigitCount[#, 2, 0]&)]//Flatten (* Harvey P. Dale, Aug 17 2025 *)
PROG
(Python)
def count10(x):
c0, c1, m = 0, 0, 1
while m<=x:
if x&m:
c1+=1
else:
c0+=1
m+=m
return c0-c1
prpr, prev = 0, 1
TOP = 3000
for i in range(1, TOP):
if count10(prev)==0:
print(i, end=", ")
prpr, prev = prev, prpr+prev
(Python)
from sympy import fibonacci
print([n for n in range(3000) if (f := bin(fibonacci(n))[2:]).count('0') == f.count('1')]) # David Radcliffe, May 31 2025
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Alex Ratushnyak, Mar 08 2013
STATUS
approved
