OFFSET
1,2
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..1000
FORMULA
a(n) = 2^(floor(log_2(n)) - (n - Sum_{k=1,..,n}[floor(n/2^k)]) + 2) - 1. - G. C. Greubel, Oct 18 2016
MAPLE
GS(6, 3, 200); [see A135416].
MATHEMATICA
Table[2^(Floor[Log[2, n]] - (n - Sum[Floor[n/2^k], {k, 1, n}]) + 2) - 1, {n, 1, 25}] (* G. C. Greubel, Oct 18 2016 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, based on a message from Guy Steele and Don Knuth, Mar 01 2008
STATUS
approved