OFFSET
1,4
LINKS
N. J. A. Sloane, Table of n, a(n) for n = 1..10000 (corrected by Michel Dekking, uploaded again by Georg Fischer, Jan 31 2019)
F. Michel Dekking, Morphisms, Symbolic Sequences, and Their Standard Forms, Journal of Integer Sequences, Vol. 19 (2016), Article 16.1.1.
Martin Griffiths, The Golden String, Zeckendorf Representations, and the Sum of a Series, Amer. Math. Monthly, 118 (2011), 497-507. See p. 502.
FORMULA
a(n) = n - A003842(n-2) for n >= 2. [Corrected by Georg Fischer, Jan 31 2019]
In particular, a(n) = n-1 or a(n) = n-2. - Charles R Greathouse IV, Aug 26 2022
MATHEMATICA
Table[Floor[GoldenRatio*Floor[n/GoldenRatio]], {n, 1, 100}] (* G. C. Greubel, Oct 23 2018 *)
PROG
(PARI) f=(1+sqrt(5))/2; a(n)=floor(f*floor(n/f))
(Magma) [Floor((1+Sqrt(5))*Floor(2*n/(1+Sqrt(5)))/2): n in [1..100]]; // G. C. Greubel, Oct 23 2018
(Python)
from math import isqrt
def A120613(n): return (m:=(n+isqrt(5*n**2)>>1)-n)+isqrt(5*m**2)>>1 # Chai Wah Wu, Aug 26 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Jun 17 2006
EXTENSIONS
Offset changed by Michel Dekking, Oct 23 2018
STATUS
approved