cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

This page as a plain text file.
%I A214852 #35 Aug 17 2025 13:55:25
%S A214852 3,36,42,59,116,156,168,211,237,246,280,335,355,399,404,416,433,442,
%T A214852 569,580,652,698,761,770,865,897,940,989,1041,1049,1101,1144,1214,
%U A214852 1286,1335,1352,1369,1395,1698,1726,1810,1928,1940,1951,2055,2159,2326,2332
%N A214852 Indices of Fibonacci numbers with the same number of 1's and 0's in their binary representation.
%C A214852 Conjecture: the sequence is infinite.
%C A214852 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 A214852 David Radcliffe, <a href="/A214852/b214852.txt">Table of n, a(n) for n = 1..10000</a> (terms 1..400 from T. D. Noe).
%e A214852 Fibonacci(36) = 14930352 = 111000111101000110110000_2, twelve 1's and twelve 0's, therefore 36 is in the sequence.
%t A214852 fQ[n_] := Module[{f = IntegerDigits[Fibonacci[n], 2]}, Count[f, 0] == Count[f, 1]]; Select[Range[3000], fQ] (* _T. D. Noe_, Mar 08 2013 *)
%t A214852 Position[Fibonacci[Range[2500]],_?(DigitCount[#,2,1]==DigitCount[#,2,0]&)]//Flatten (* _Harvey P. Dale_, Aug 17 2025 *)
%o A214852 (Python)
%o A214852 def count10(x):
%o A214852     c0, c1, m = 0, 0, 1
%o A214852     while m<=x:
%o A214852       if x&m:
%o A214852         c1+=1
%o A214852       else:
%o A214852         c0+=1
%o A214852       m+=m
%o A214852     return c0-c1
%o A214852 prpr, prev = 0,1
%o A214852 TOP = 3000
%o A214852 for i in range(1,TOP):
%o A214852     if count10(prev)==0:
%o A214852         print(i, end=", ")
%o A214852     prpr, prev = prev, prpr+prev
%o A214852 (Python)
%o A214852 from sympy import fibonacci
%o A214852 print([n for n in range(3000) if (f := bin(fibonacci(n))[2:]).count('0') == f.count('1')]) # _David Radcliffe_, May 31 2025
%Y A214852 Cf. A000045, A004685, A259407.
%K A214852 nonn,base
%O A214852 1,1
%A A214852 _Alex Ratushnyak_, Mar 08 2013