login
A056577
Difference between 3^n and highest power of 2 less than or equal to 3^n.
10
0, 1, 1, 11, 17, 115, 217, 139, 2465, 3299, 26281, 46075, 7153, 545747, 588665, 5960299, 9492289, 62031299, 118985033, 88519643, 1339300753, 1870418611, 14201190425, 25423702091, 7551629537
OFFSET
0,4
COMMENTS
a(n) = A227048(n,1). - Reinhard Zumkeller, Jun 30 2013
LINKS
FORMULA
a(n) = 3^n - 2^floor(log_2(3^n)) = A000244(n) - 2^A056576(n).
EXAMPLE
a(3)=11 because 3^3 = 27 and 27 - 16 = 11.
MATHEMATICA
Table[# - 2^Floor@ Log2@ # &[3^n], {n, 0, 24}] (* Michael De Vlieger, Sep 30 2017 *)
PROG
(Haskell)
a056577 = head . a227048_row -- Reinhard Zumkeller, Jun 30 2013
CROSSREFS
KEYWORD
nonn
AUTHOR
Henry Bottomley, Jun 29 2000
STATUS
approved