This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A056577 #15 Sep 30 2017 23:55:12 %S A056577 0,1,1,11,17,115,217,139,2465,3299,26281,46075,7153,545747,588665, %T A056577 5960299,9492289,62031299,118985033,88519643,1339300753,1870418611, %U A056577 14201190425,25423702091,7551629537 %N A056577 Difference between 3^n and highest power of 2 less than or equal to 3^n. %C A056577 a(n) = A227048(n,1). - _Reinhard Zumkeller_, Jun 30 2013 %H A056577 Reinhard Zumkeller, <a href="/A056577/b056577.txt">Table of n, a(n) for n = 0..1000</a> %F A056577 a(n) = 3^n - 2^floor(log_2(3^n)) = A000244(n) - 2^A056576(n). %e A056577 a(3)=11 because 3^3 = 27 and 27 - 16 = 11. %t A056577 Table[# - 2^Floor@ Log2@ # &[3^n], {n, 0, 24}] (* _Michael De Vlieger_, Sep 30 2017 *) %o A056577 (Haskell) %o A056577 a056577 = head . a227048_row -- _Reinhard Zumkeller_, Jun 30 2013 %Y A056577 Cf. A000244, A056576, A063005, A227048. %K A056577 nonn %O A056577 0,4 %A A056577 _Henry Bottomley_, Jun 29 2000