OFFSET
0,3
COMMENTS
a(2n+2) - a(2n) = A339824(n), since a(2n+2) - a(2n) = a(2n+2) + a(2n+1) - a(2n+1) - a(2n) = floor((2n+2)r) - floor((2n+1)r). - Michel Dekking, Feb 23 2021
LINKS
Paolo Xausa, Table of n, a(n) for n = 0..10000
FORMULA
a(n) = floor(n*r)-floor((n-1)*r)+floor((n-2)*r)-...+d*floor(r), where d=(-1)^(n+1) and r = (1+sqrt(5))/2.
a(n) + a(n-1) = floor(n*r). - Michel Dekking, Feb 23 2021
MATHEMATICA
nxt[{n_, a_}]:={n+1, Floor[GoldenRatio(n+1)]-a}; Transpose[NestList[nxt, {0, 0}, 80]][[2]] (* Harvey P. Dale, Dec 08 2015 *)
Block[{n = 0}, NestList[Floor[++n*GoldenRatio] - # &, 0, 100]] (* Paolo Xausa, May 12 2024 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Clark Kimberling, Apr 04 2007
STATUS
approved