A374961 Numbers k such that 2^k, 2^(k+1) and 2^(k+2) have the same number of terms in their Zeckendorf representation (A007895).
5, 6, 1931, 4127, 26584
Offset: 1
Examples
5 is a term since A020908(5) = A020908(6) = A020908(7) = 3. 763 is a term since A020908(1931) = A020908(1932) = A020908(1933) = 763.
Programs
-
Mathematica
z[n_] := Length[DeleteCases[NestWhileList[# - Fibonacci[Floor[Log[Sqrt[5]*# + 3/2]/Log[GoldenRatio]]] &, n, # > 1 &], 0]]; (* Alonso del Arte at A007895 *) s[n_] := s[n] = z[2^n]; Select[Range[0, 4200], s[#] == s[# + 1] == s[# + 2] &]
-
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 lista(kmax) = {my(z1 = A007895(1), z2 = A007895(2), z3); for(k = 2, kmax, z3 = A007895(2^k); if(z1 == z2 && z2 == z3, print1(k-2 , ", ")); z1 = z2; z2 = z3);}
Comments