cp's OEIS Frontend

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.

A063003 Difference between 3^n and the next larger or equal power of 2.

This page as a plain text file.
%I A063003 #15 Apr 16 2023 15:55:53
%S A063003 0,1,7,5,47,13,295,1909,1631,13085,6487,84997,517135,502829,3605639,
%T A063003 2428309,24062143,5077565,149450423,985222181,808182895,6719515981,
%U A063003 2978678759,43295774645,267326277407,252223018333,1856180682775
%N A063003 Difference between 3^n and the next larger or equal power of 2.
%H A063003 Harry J. Smith, <a href="/A063003/b063003.txt">Table of n, a(n) for n = 0..200</a>
%F A063003 a(n) = 2^(ceiling(log_2(3^n))) - 3^n.
%t A063003 Table[2^Ceiling@ Log2@ # - # &[3^n], {n, 0, 26}]  (* _Michael De Vlieger_, Sep 30 2017 *)
%o A063003 (PARI) { default(realprecision, 50); t=1/log(2); for (n=0, 200, write("b063003.txt", n, " ", 2^ceil(t*log(3^n)) - 3^n) ) } \\ _Harry J. Smith_, Aug 15 2009
%Y A063003 Cf. A056577, A063004, A063005.
%K A063003 easy,nonn
%O A063003 0,3
%A A063003 _Jens Voß_, Jul 02 2001
%E A063003 More terms from _Marc LeBrun_, Jul 11 2001