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.

Showing 1-5 of 5 results.

A056577 Difference between 3^n and highest power of 2 less than or equal to 3^n.

Original entry on oeis.org

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

Views

Author

Henry Bottomley, Jun 29 2000

Keywords

Comments

a(n) = A227048(n,1). - Reinhard Zumkeller, Jun 30 2013

Examples

			a(3)=11 because 3^3 = 27 and 27 - 16 = 11.
		

Crossrefs

Programs

Formula

a(n) = 3^n - 2^floor(log_2(3^n)) = A000244(n) - 2^A056576(n).

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

Original entry on oeis.org

0, 1, 7, 5, 47, 13, 295, 1909, 1631, 13085, 6487, 84997, 517135, 502829, 3605639, 2428309, 24062143, 5077565, 149450423, 985222181, 808182895, 6719515981, 2978678759, 43295774645, 267326277407, 252223018333, 1856180682775
Offset: 0

Views

Author

Jens Voß, Jul 02 2001

Keywords

Crossrefs

Programs

  • Mathematica
    Table[2^Ceiling@ Log2@ # - # &[3^n], {n, 0, 26}]  (* Michael De Vlieger, Sep 30 2017 *)
  • 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

Formula

a(n) = 2^(ceiling(log_2(3^n))) - 3^n.

Extensions

More terms from Marc LeBrun, Jul 11 2001

A321671 Primes of the form 2^j - 3^k, for j >= 0, k >= 0.

Original entry on oeis.org

3, 5, 7, 13, 23, 29, 31, 37, 47, 61, 101, 127, 229, 269, 431, 503, 509, 997, 1021, 1319, 2039, 3853, 4093, 7949, 8111, 8191, 14197, 16141, 16381, 32687, 45853, 65293, 130343, 130829, 131063, 131071, 347141, 502829, 524261, 524287, 1028893, 1046389, 1048549
Offset: 1

Views

Author

Jinyuan Wang, Nov 16 2018

Keywords

Comments

The numbers in A007643 are not in this sequence.
For n > 1, a(n) is of the form 8k - 1 or 8k - 3.
In this sequence, only 3 and 7 make both j and k even numbers.
Generally, the way to prove that a number is not in this sequence is to successively take residues modulo 3, 8, 5, and 16 on both sides of the equation 2^j - 3^k = x.

Examples

			7 = 2^3 - 3^0, so 7 is a term.
		

Crossrefs

Cf. A004051 (primes of the form 2^a + 3^b).
Cf. A063005.

Programs

  • PARI
    forprime(p=1,1000,k=0;x=2;y=1;while(k
    				

Formula

Intersection of A000040 and A192110.

Extensions

More terms from Alois P. Heinz, Nov 16 2018

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

Original entry on oeis.org

0, 1, 5, 1, 11, 49, 17, 115, 473, 217, 1163, 139, 2465, 11491, 3299, 26281, 111611, 46075, 269297, 7153, 545747, 2685817, 588665, 5960299, 26269505, 9492289, 62031299, 253202761, 118985033, 625390555, 88519643, 1339300753
Offset: 0

Views

Author

Jens Voß, Jul 02 2001

Keywords

Crossrefs

Programs

  • Mathematica
    dp23[n_]:=Module[{t=2^n},3^Ceiling[Log[3,t]]-t]; Array[dp23,40,0] (* Harvey P. Dale, Nov 20 2015 *)
  • PARI
    for(n=1,50,print1(3^ceil(log(2^n)/log(3))-2^n","))

Formula

a(n) = 3^ceiling(log_3(2^n)) - 2^n.

Extensions

More terms from Ralf Stephan, Mar 21 2003

A328334 Forward difference of difference between 2^n and the next smaller power of 3.

Original entry on oeis.org

1, 0, 4, 2, -2, 32, 10, -34, 256, 26, 1024, 590, -278, 8192, 3262, -6598, 65536, 12974, 262144, 169994, -14306, 2097152, 1005658, -1177330, 16777216, 4856618, -18984578, 134217728, 10155130, 536870912, 298900846, -177039286, 4294967296, 1616365790, -3740837222
Offset: 0

Views

Author

Alois P. Heinz, Oct 12 2019

Keywords

Comments

a(n) is even for n >= 1.

Crossrefs

Cf. A063005.

Programs

  • Maple
    b:= proc(n) option remember; (t-> t-3^ilog[3](t))(2^n) end:
    a:= n-> b(n+1)-b(n):
    seq(a(n), n=0..40);

Formula

a(n) = A063005(n+1) - A063005(n).
Showing 1-5 of 5 results.