login
A155689
a(n) = Sum_{k >= 1} floor(n * sqrt(2) / 2^k).
1
0, 1, 3, 3, 4, 7, 7, 8, 10, 11, 11, 15, 16, 16, 18, 19, 22, 22, 23, 25, 25, 26, 31, 31, 32, 34, 35, 35, 38, 39, 39, 41, 42, 46, 46, 47, 49, 49, 50, 53, 53, 54, 56, 57, 57, 63, 64, 64, 66, 67, 70, 70, 71, 73, 73, 74, 78, 79, 79, 81, 82, 82, 85, 86, 86, 88, 89, 94, 94, 95, 97, 97
OFFSET
1,3
COMMENTS
a(n) = A020965(n) - A005187(n).
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
Sequence in context: A319526 A258835 A007448 * A051263 A058674 A349252
KEYWORD
nonn
AUTHOR
Jon E. Schoenfield, Jan 24 2009
STATUS
approved