OFFSET
1,2
LINKS
Jon E. Schoenfield, Table of n, a(n) for n = 1..1000
C. Kimberling, Problem 10520, Amer. Math. Mon. 103 (1996) p. 347.
FORMULA
a(n) = kn + O(log n) where k = 2 + sqrt(2) = 3.414213562.... - Charles R Greathouse IV, Feb 27 2017
MATHEMATICA
Table[Sum[Floor[n * Sqrt[2] ^ (1-k)], {k, 1, n+1}], {n, 1, 60}] (* Indranil Ghosh, Feb 27 2017 *)
PROG
(PARI) a(n) = sum(k=1, n+1, floor(n * sqrt(2) ^ (1-k))); \\ Indranil Ghosh, Feb 27 2017
(PARI) a(n)=sum(k=0, logint(n^2, 2), sqrtint(n^2\2^k)) \\ Charles R Greathouse IV, Feb 27 2017
(Magma) [(&+[Floor(n*Sqrt(2)^(1-k)): k in [1..1000]]): n in [1..60]]; // G. C. Greubel, May 31 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
More terms from Jon E. Schoenfield, Jan 24 2009
STATUS
approved