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 A063004 #11 Apr 16 2023 15:55:41 %S A063004 0,1,5,1,11,49,17,115,473,217,1163,139,2465,11491,3299,26281,111611, %T A063004 46075,269297,7153,545747,2685817,588665,5960299,26269505,9492289, %U A063004 62031299,253202761,118985033,625390555,88519643,1339300753 %N A063004 Difference between 2^n and the next larger or equal power of 3. %F A063004 a(n) = 3^ceiling(log_3(2^n)) - 2^n. %t A063004 dp23[n_]:=Module[{t=2^n},3^Ceiling[Log[3,t]]-t]; Array[dp23,40,0] (* _Harvey P. Dale_, Nov 20 2015 *) %o A063004 (PARI) for(n=1,50,print1(3^ceil(log(2^n)/log(3))-2^n",")) %Y A063004 Cf. A056577, A063003, A063005. %K A063004 easy,nonn %O A063004 0,3 %A A063004 _Jens Voß_, Jul 02 2001 %E A063004 More terms from _Ralf Stephan_, Mar 21 2003