OFFSET
1,2
LINKS
Muniru A Asiru, Table of n, a(n) for n = 1..500
C. Kimberling, Problem 10520, Amer. Math. Mon. 103 (1996) p. 347.
MAPLE
a:=n->add(floor(n*((1+sqrt(5))/2)^(1-k)), k=1..n): seq(a(n), n=1..61); # Muniru A Asiru, Oct 09 2018
MATHEMATICA
a[n_] := Sum[ Floor[ n*GoldenRatio^(1 - k)], {k, 1, Ceiling[1 - Log[1/n] / ArcCsch[2]]}]; Table[a[n], {n, 1, 30}] (* Jean-François Alcover, Sep 18 2013 *)
PROG
(PARI) a(n) = my(res = 0, s, gratio = (1 + sqrt(5)) / 2); for(k = 1, oo, s = floor(n*gratio^(1-k)); if(s==0, return(res), res+=s)) \\ David A. Corneth, Oct 09 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved