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.

A381704 Fibonacci numbers having a Fibonacci number of 1's in their binary representation.

This page as a plain text file.
%I A381704 #20 Mar 13 2025 12:38:44
%S A381704 0,1,2,3,5,8,13,21,34,55,144,233,987,4181,6765,17711,832040,3524578,
%T A381704 1836311903,2971215073,225851433717,259695496911122585,
%U A381704 3928413764606871165730,26925748508234281076009,9969216677189303386214405760200,638817435613190341905763972389505493
%N A381704 Fibonacci numbers having a Fibonacci number of 1's in their binary representation.
%H A381704 Robert Israel, <a href="/A381704/b381704.txt">Table of n, a(n) for n = 1..49</a>
%e A381704 F(10) = (55)_10 = (110111)_2 has five 1's in binary, 5 is a Fibonacci number, thus 55 is a term.
%e A381704 F(12) = (144)_10 = (10010000)_2 has two 1's in binary, 2 is a Fibonacci number, thus 144 is a term.
%p A381704 isfib:= n -> issqr(5*n^2+4) or issqr(5*n^2-4):
%p A381704 select(n -> isfib(convert(convert(n,base,2),`+`)), map(combinat:-fibonacci,[0,$2..1000])); # _Robert Israel_, Mar 13 2025
%t A381704 With[{f = Fibonacci[Range[0, 200]]}, DeleteDuplicates[Select[f, MemberQ[f, DigitCount[#, 2, 1]] &]]] (* _Amiram Eldar_, Mar 04 2025 *)
%o A381704 (PARI) isfib(n) = my(k=n^2); k+=(k+1)<<2; issquare(k) || (n>0 && issquare(k-8)); \\ A010056
%o A381704 lista(nn) = for (n=2, nn, my(f = fibonacci(n)); if (isfib(hammingweight(f)), print1(f, ", "));); \\ _Michel Marcus_, Mar 04 2025
%Y A381704 Cf. A000045, A004685, A010056, A382053.
%K A381704 nonn,base
%O A381704 1,3
%A A381704 _Ctibor O. Zizka_, Mar 04 2025
%E A381704 a(1) = 0 inserted by _Robert Israel_, Mar 13 2025