OFFSET
1,4
COMMENTS
The maximum possible value of a(n) is n-1. - Michael B. Porter, Jan 29 2012
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..1000
FORMULA
a(n)+A019587(n)=n.
EXAMPLE
r = 1.618, 2r = 3.236, 3r = 4.854, and 4r = 6.472, where r=(1+sqrt(5))/2. The fractional part of 4r is 0.472, which is less than the fractional parts of two of {r, 2r, 3r}, so a(4) = 2. - Michael B. Porter, Jan 29 2012
MAPLE
Digits := 100;
A194733 := proc(n::posint)
local a, k, phi, kfrac, nfrac ;
phi := (1+sqrt(5))/2 ;
a :=0 ;
nfrac := n*phi-floor(n*phi) ;
for k from 1 to n-1 do
kfrac := k*phi-floor(k*phi) ;
if evalf(kfrac-nfrac) > 0 then
a := a+1 ;
end if;
end do:
a ;
end proc:
seq(A194733(n), n=1..100) ; # R. J. Mathar, Aug 13 2021
MATHEMATICA
PROG
(Haskell)
a194733 n = length $ filter (nTau <) $
map (snd . properFraction . (* tau) . fromInteger) [1..n]
where (_, nTau) = properFraction (tau * fromInteger n)
tau = (1 + sqrt 5) / 2
-- Reinhard Zumkeller, Jan 28 2012
CROSSREFS
KEYWORD
nonn
AUTHOR
Clark Kimberling, Sep 02 2011
STATUS
approved