login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A129231
a(n) = floor(n*r) - a(n-1), where r = sqrt(2) and a(0) = 0.
3
0, 1, 1, 3, 2, 5, 3, 6, 5, 7, 7, 8, 8, 10, 9, 12, 10, 14, 11, 15, 13, 16, 15, 17, 16, 19, 17, 21, 18, 23, 19, 24, 21, 25, 23, 26, 24, 28, 25, 30, 26, 31, 28, 32, 30, 33, 32, 34, 33, 36, 34, 38, 35, 39, 37, 40, 39, 41, 41, 42, 42, 44, 43, 46, 44, 47, 46, 48, 48, 49, 49, 51, 50, 53
OFFSET
0,4
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
Sequence in context: A247815 A057953 A372679 * A166477 A124332 A364900
KEYWORD
nonn
AUTHOR
Clark Kimberling, Apr 04 2007
EXTENSIONS
a(47) corrected by Georg Fischer, May 11 2024
STATUS
approved