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-1 of 1 results.

A367086 Exponents k > 0 such that the interval [4^(k-1), 4^k] contains two powers of 3.

Original entry on oeis.org

1, 4, 8, 12, 16, 20, 23, 27, 31, 35, 39, 43, 46, 50, 54, 58, 62, 65, 69, 73, 77, 81, 85, 88, 92, 96, 100, 104, 107, 111, 115, 119, 123, 127, 130, 134, 138, 142, 146, 149, 153, 157, 161, 165, 169, 172, 176, 180, 184, 188, 191, 195, 199, 203, 207, 211, 214, 218, 222, 226, 230, 233, 237, 241
Offset: 0

Views

Author

M. F. Hasler, Nov 03 2023

Keywords

Comments

This is a list or set of numbers but at the same time a function of n related to other sequences A367083 - A367085 that all use the same index n starting at offset 0, which explains why this sequence also starts at offset 0.
The list of powers of 3 and powers of 4 by increasing size is A367083 = (1; 3^1, 4^1, 3^2, 4^2, 3^3, 4^3, 3^4; 3^5, 4^4, 3^6, 4^5, 3^7, 4^6, 3^8, 4^7, 3^9; 3^10, ...). That list can be split into groups (3^r, 4^s, ..., 3^r') of either 4+3 = 7 or 5+4 = 9 terms which start and end with a power of three. Otherwise said, the end of one group and the start of the next group are two consecutive powers of 3 that lie between two consecutive powers of 4.
This sequence lists the exponent of the first power of 4 in each group: these are exactly the exponents k of powers of 4 such that there are two powers of 3 in the interval [4^(k-1), 4^k].
The first differences, D = (3, 4, 4, 4, 4, 3, 4, 4, 4, 4, 4, 3, 4, 4, 4, 4, 3, 4, 4, 4, 4, 4, 3, ...) are directly related to those of A367084 and A367085, viz, D(n) = (A367084(n+1)-A367084(n)-1)/2 = A367085(n+1)-A367085(n)-1. The run lengths of the '4's are (4, 5, 4, 5, ...) with two consecutive '5's every 24 +- 1 terms.

Examples

			The smallest power 4^s such that the interval [4^(s-1), 4^s] contains two powers of 3 is 4^1, i.e., s = 1, where [4^0, 4^1] contains 3^0 and 3^1. Hence a(0) = 1. (This is also the exponent of the smallest power of 4 in the first group of the form (3^r, 4^s, ..., 3^r') in A367083, namely: (3^1, 4^1, 3^2, 4^2, 3^3, 4^3, 3^4).)
The next larger power of 4 with this property is 4^4, hence a(1) = 4, where [4^3, 4^4] contains 3^4 and 3^5. This is also the least exponent of a power of 4 in the second group (3^5, 4^4, 3^6, 4^5, ..., 3^9), which is marked on the left in the table below.
.
    Numbers of the forms
         3^r      4^s
      ------   ------
         ...
    |              16
    |     27 __________    the interval
    |              64  |    [4^3, 4^4]
    \____ 81           |   includes two
    /    243           |   powers of 3,
  2 |        ____ 256 _|  so 4 is a term
  n |    729             of this sequence
  d |            1024
    |   2187
  g |            4096
  r |   6561 __________    the interval
  p |           16384  |    [4^7, 4^8]
    \_ 19683           |   includes two
    /  59049           |   powers of 3,
    |        __ 65536 _|  so 8 is a term
    | 177147             of this sequence
    |          262144
    | 531441
                  ...
		

Crossrefs

Cf. A000244 (powers of 3), A000302 (powers of 4).

Programs

  • PARI
    A367086_upto(N)={my(r=1, s=1, L3=log(3), L4=log(4), A=List(s)); until(r>=N, listput(A, s-=1+r-r+=((r+4)*L3 > (s+3)*L4)+4)); Vec(A)}
    
  • Python
    from itertools import islice
    def A367086_gen(): # generator of terms
        a, b, c, i = 1, 4, -1, 1
        while True:
            while (a:=a*3)A367086_list = list(islice(A367086_gen(),30)) # Chai Wah Wu, Nov 18 2023

Formula

a(n) = A235127( A367083( A367084(n)+2 )), where A235127 is the 4-valuation.
a(n) = 1 + floor(n/log_3(4/3)) = 1 + floor(n/(log_3(4) - 1)).
Showing 1-1 of 1 results.