OFFSET
2,2
COMMENTS
In other words, the Zeckendorf representation of a(n) is obtained from the Zeckendorf representation of n by deleting the least significant bit.
Theorem: The first differences (1,1,0,1,0,1,1,0,...) form the Fibonacci word A005614. (The proof is straightforward.)
The difference sequence agrees with A005614 after the first two terms of A005614. - Clark Kimberling, Dec 29 2020
LINKS
Rémy Sigrist, Table of n, a(n) for n = 2..25000
FORMULA
a(n) = floor((n+2)/tau)-1, where tau = golden ratio. - Clark Kimberling, Dec 29 2020; corrected by Harry Altman, Jun 06 2024
EXAMPLE
n = 19 has Zeckendorf representation [1, 0, 1, 0, 0, 1], dropping last bit we get [1, 0, 1, 0, 0], which is the Zeckendorf representation of 11, so a(19) = 11.
MATHEMATICA
r = (1 + Sqrt[5])/2; t = Table[Floor[(n - 1)/r] + 2, {n, 0, 150}] (* A319433 *)
Differences[t] (* A005614 after the 1st 2 terms *)
(* Clark Kimberling, Dec 29 2020 *)
PROG
(PARI) a(n) = my (f=2, v=0); while (fibonacci(f) < n, f++); while (n > 1, if (n >= fibonacci(f), v += fibonacci(f-1); n -= fibonacci(f); f--); f--); return (v) \\ Rémy Sigrist, Oct 04 2018
CROSSREFS
KEYWORD
nonn,base
AUTHOR
N. J. A. Sloane, Sep 30 2018
EXTENSIONS
More terms from Rémy Sigrist, Oct 04 2018
STATUS
approved