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.

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

This page as a plain text file.
%I A367086 #41 Nov 18 2023 13:12:34
%S A367086 1,4,8,12,16,20,23,27,31,35,39,43,46,50,54,58,62,65,69,73,77,81,85,88,
%T A367086 92,96,100,104,107,111,115,119,123,127,130,134,138,142,146,149,153,
%U A367086 157,161,165,169,172,176,180,184,188,191,195,199,203,207,211,214,218,222,226,230,233,237,241
%N A367086 Exponents k > 0 such that the interval [4^(k-1), 4^k] contains two powers of 3.
%C A367086 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.
%C A367086 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.
%C A367086 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].
%C A367086 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.
%F A367086 a(n) = A235127( A367083( A367084(n)+2 )), where A235127 is the 4-valuation.
%F A367086 a(n) = 1 + floor(n/log_3(4/3)) = 1 + floor(n/(log_3(4) - 1)).
%e A367086 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).)
%e A367086 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.
%e A367086 .
%e A367086     Numbers of the forms
%e A367086          3^r      4^s
%e A367086       ------   ------
%e A367086          ...
%e A367086     |              16
%e A367086     |     27 __________    the interval
%e A367086     |              64  |    [4^3, 4^4]
%e A367086     \____ 81           |   includes two
%e A367086     /    243           |   powers of 3,
%e A367086   2 |        ____ 256 _|  so 4 is a term
%e A367086   n |    729             of this sequence
%e A367086   d |            1024
%e A367086     |   2187
%e A367086   g |            4096
%e A367086   r |   6561 __________    the interval
%e A367086   p |           16384  |    [4^7, 4^8]
%e A367086     \_ 19683           |   includes two
%e A367086     /  59049           |   powers of 3,
%e A367086     |        __ 65536 _|  so 8 is a term
%e A367086     | 177147             of this sequence
%e A367086     |          262144
%e A367086     | 531441
%e A367086                   ...
%o A367086 (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)}
%o A367086 (Python)
%o A367086 from itertools import islice
%o A367086 def A367086_gen(): # generator of terms
%o A367086     a, b, c, i = 1, 4, -1, 1
%o A367086     while True:
%o A367086         while (a:=a*3)<b:
%o A367086             c += 1
%o A367086             yield i
%o A367086         b <<= 2
%o A367086         i += 1
%o A367086         c += 2
%o A367086 A367086_list = list(islice(A367086_gen(),30)) # _Chai Wah Wu_, Nov 18 2023
%Y A367086 Cf. A367085, A367083, A367084, A327621.
%Y A367086 Cf. A000244 (powers of 3), A000302 (powers of 4).
%K A367086 nonn
%O A367086 0,2
%A A367086 _M. F. Hasler_, Nov 03 2023