OFFSET
1,3
LINKS
Jon E. Schoenfield, Table of n, a(n) for n=1..1000
MAPLE
a:=n->add(floor(n*sqrt(2)/2^k), k=1..2*n+2); seq(a(n), n=1..80); # Muniru A Asiru, Sep 28 2018
MATHEMATICA
Table[Sum[Floor[n*Sqrt[2]/2^k], {k, 1, 2*n + 2}], {n, 1, 100}] (* G. C. Greubel, Sep 28 2018 *)
PROG
(PARI) for(n=1, 100, print1(sum(k=1, 2*n+2, floor(n*sqrt(2)/2^k)), ", ")) \\ G. C. Greubel, Sep 28 2018
(Magma) [(&+[Floor(n*Sqrt(2)/2^k): k in [1..2*(n+1)]]): n in [1..100]]; // G. C. Greubel, Sep 28 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Jon E. Schoenfield, Jan 24 2009
STATUS
approved