login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Indices of Fibonacci numbers with the same number of 1's and 0's in their binary representation.
3

%I #26 Jan 22 2022 18:20:28

%S 3,36,42,59,116,156,168,211,237,246,280,335,355,399,404,416,433,442,

%T 569,580,652,698,761,770,865,897,940,989,1041,1049,1101,1144,1214,

%U 1286,1335,1352,1369,1395,1698,1726,1810,1928,1940,1951,2055,2159,2326,2332

%N Indices of Fibonacci numbers with the same number of 1's and 0's in their binary representation.

%C Conjecture: the sequence is infinite.

%C The sequence of Fibonacci numbers with the same number of 1's and 0's in their binary representation begins: 2, 14930352, 267914296, ... = A259407.

%H T. D. Noe, <a href="/A214852/b214852.txt">Table of n, a(n) for n = 1..400</a>

%e Fibonacci(36) = 14930352 = 111000111101000110110000_2, twelve 1's and twelve 0's, therefore 36 is in the sequence.

%t fQ[n_] := Module[{f = IntegerDigits[Fibonacci[n], 2]}, Count[f, 0] == Count[f, 1]]; Select[Range[3000], fQ] (* _T. D. Noe_, Mar 08 2013 *)

%o (Python)

%o def count10(x):

%o c0, c1, m = 0, 0, 1

%o while m<=x:

%o if x&m:

%o c1+=1

%o else:

%o c0+=1

%o m+=m

%o return c0-c1

%o prpr, prev = 0,1

%o TOP = 1<<16

%o for i in range(1,TOP):

%o if count10(prev)==0:

%o print i,

%o prpr, prev = prev, prpr+prev

%Y Cf. A000045, A004685, A259407.

%K nonn,base

%O 1,1

%A _Alex Ratushnyak_, Mar 08 2013