A374962 Numbers k such that the number of terms in the Zeckendorf representation of 2^k equals the binary weight of Fibonacci(k).
1, 3, 4, 7, 8, 13, 14, 20, 26, 50, 55, 58, 90, 140, 270, 314, 603
Offset: 1
Examples
n | k = a(n) | 2^k | A014417(2^k) | F(k) | A007088(F(k)) | Number of 1's --+----------+-----+--------------+------+---------------+-------------- 1 | 1 | 2 | 10 | 1 | 1 | 1 2 | 3 | 8 | 10000 | 2 | 10 | 1 3 | 4 | 16 | 100100 | 3 | 11 | 2 4 | 7 | 128 | 1010001000 | 13 | 1101 | 3 5 | 8 | 256 | 100001000010 | 21 | 10101 | 3
Links
- Lucas A. Brown, Python program.
Programs
-
Mathematica
z[n_] := Length[DeleteCases[NestWhileList[# - Fibonacci[Floor[Log[Sqrt[5]*# + 3/2]/Log[GoldenRatio]]] &, n, # > 1 &], 0]]; (* Alonso del Arte at A007895 *) Select[Range[700], z[2^#] == DigitCount[Fibonacci[#], 2, 1] &]
-
PARI
A007895(n)=if(n<4, n>0, my(k=2, s, t); while(fibonacci(k++)<=n, ); while(k && n, t=fibonacci(k); if(t<=n, n-=t; s++); k--); s); \\ Charles R Greathouse IV at A007895 is(k) = A007895(2^k) == hammingweight(fibonacci(k));
Comments