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”).
%I #53 Sep 08 2022 08:45:26
%S 0,1,1,3,4,4,6,6,8,9,9,11,12,12,14,14,16,17,17,19,19,21,22,22,24,25,
%T 25,27,27,29,30,30,32,33,33,35,35,37,38,38,40,40,42,43,43,45,46,46,48,
%U 48,50,51,51,53,53,55,56,56,58,59,59,61,61,63,64,64,66,67,67,69,69,71,72
%N a(n) = floor(phi*floor(n/phi)) where phi=(1+sqrt(5))/2.
%H N. J. A. Sloane, <a href="/A120613/b120613.txt">Table of n, a(n) for n = 1..10000</a> (corrected by Michel Dekking, uploaded again by _Georg Fischer_, Jan 31 2019)
%H F. Michel Dekking, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL19/Dekking/dekk4.html">Morphisms, Symbolic Sequences, and Their Standard Forms</a>, Journal of Integer Sequences, Vol. 19 (2016), Article 16.1.1.
%H Martin Griffiths, <a href="http://www.jstor.org/stable/10.4169/amer.math.monthly.118.06.497">The Golden String, Zeckendorf Representations, and the Sum of a Series</a>, Amer. Math. Monthly, 118 (2011), 497-507. See p. 502.
%F a(n) = n - A003842(n-2) for n >= 2. [Corrected by _Georg Fischer_, Jan 31 2019]
%F In particular, a(n) = n-1 or a(n) = n-2. - _Charles R Greathouse IV_, Aug 26 2022
%t Table[Floor[GoldenRatio*Floor[n/GoldenRatio]], {n,1,100}] (* _G. C. Greubel_, Oct 23 2018 *)
%o (PARI) f=(1+sqrt(5))/2;a(n)=floor(f*floor(n/f))
%o (Magma) [Floor((1+Sqrt(5))*Floor(2*n/(1+Sqrt(5)))/2): n in [1..100]]; // _G. C. Greubel_, Oct 23 2018
%o (Python)
%o from math import isqrt
%o def A120613(n): return (m:=(n+isqrt(5*n**2)>>1)-n)+isqrt(5*m**2)>>1 # _Chai Wah Wu_, Aug 26 2022
%Y Cf. A001622, A120614 (first differences), A120615 (partial sums), A003842.
%K nonn
%O 1,4
%A _Benoit Cloitre_, Jun 17 2006
%E Offset changed by _Michel Dekking_, Oct 23 2018