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”).

Numbers k such that 2^k, 2^(k+1) and 2^(k+2) have the same number of terms in their Zeckendorf representation (A007895).
1

%I #8 Jul 26 2024 08:57:35

%S 5,6,1931,4127,26584

%N Numbers k such that 2^k, 2^(k+1) and 2^(k+2) have the same number of terms in their Zeckendorf representation (A007895).

%C Numbers k such that A020908(k) = A020908(k+1) = A020908(k+2).

%C The corresponding values of A020908(k) are 3, 3, 763, 1660, 10596, ... .

%C a(6) > 10^5, if it exists.

%e 5 is a term since A020908(5) = A020908(6) = A020908(7) = 3.

%e 763 is a term since A020908(1931) = A020908(1932) = A020908(1933) = 763.

%t z[n_] := Length[DeleteCases[NestWhileList[# - Fibonacci[Floor[Log[Sqrt[5]*# + 3/2]/Log[GoldenRatio]]] &, n, # > 1 &], 0]]; (* _Alonso del Arte_ at A007895 *)

%t s[n_] := s[n] = z[2^n]; Select[Range[0, 4200], s[#] == s[# + 1] == s[# + 2] &]

%o (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

%o 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);}

%Y Cf. A007895, A020908, A353987.

%Y Subsequence of A374960.

%K nonn,base,hard,more

%O 1,1

%A _Amiram Eldar_, Jul 25 2024