OFFSET
2,7
MAPLE
seq(seq(n mod d, n=2^d .. 2^(d+1)-1), d=1..8); # Robert Israel, Aug 27 2020
MATHEMATICA
Table[Mod[n, Floor @ Log2[n]], {n, 2, 100}] (* Amiram Eldar, Aug 27 2020 *)
PROG
(PARI) a(n) = n % logint(n, 2); \\ Michel Marcus, Aug 27 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Aug 30 2005
EXTENSIONS
Name edited by Michel Marcus, Aug 27 2020
STATUS
approved