login
A129229
a(n) = floor(n*r)-a(n-1), where r is the golden mean, (1+sqrt(5))/2.
4
0, 1, 2, 2, 4, 4, 5, 6, 6, 8, 8, 9, 10, 11, 11, 13, 12, 15, 14, 16, 16, 17, 18, 19, 19, 21, 21, 22, 23, 23, 25, 25, 26, 27, 28, 28, 30, 29, 32, 31, 33, 33, 34, 35, 36, 36, 38, 38, 39, 40, 40, 42, 42, 43, 44, 44, 46, 46, 47, 48, 49, 49, 51, 50, 53, 52, 54, 54, 56, 55, 58, 56, 60, 58
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
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