OFFSET
0,4
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 = sqrt(2).
MATHEMATICA
Block[{n = 0}, NestList[Floor[++n*Sqrt[2]] - # &, 0, 100]] (* Paolo Xausa, May 11 2024 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Clark Kimberling, Apr 04 2007
EXTENSIONS
a(47) corrected by Georg Fischer, May 11 2024
STATUS
approved