login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A128092
a(n) = largest multiple of n which is <= 2^n.
3
2, 4, 6, 16, 30, 60, 126, 256, 504, 1020, 2046, 4092, 8190, 16380, 32760, 65536, 131070, 262134, 524286, 1048560, 2097144, 4194300, 8388606, 16777200, 33554425, 67108860, 134217702, 268435440, 536870910, 1073741820, 2147483646
OFFSET
1,1
FORMULA
a(n) = n*floor(2^n/n) = n*A000799(n).
a(n) = 2^n - (2^n mod n). - Chai Wah Wu, Aug 24 2023
MAPLE
a:=n->n*floor(2^n/n): seq(a(n), n=1..37); # Emeric Deutsch, Feb 16 2007
MATHEMATICA
f[n_] := n*Floor[2^n/n]; Array[f, 33] (* Ray Chandler, Feb 19 2007 *)
PROG
(Python)
def A128092(n): return (m:=1<<n)-(m%n) # Chai Wah Wu, Aug 24 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, Feb 14 2007
EXTENSIONS
Extended by Emeric Deutsch and Ray Chandler, Feb 19 2007
STATUS
approved