OFFSET
0,2
COMMENTS
The sequence mostly alternates between powers of 3 (odd terms) and powers of 4 (even terms), but after either 3 or 4 powers of 4, separated by powers of 3, there occur two consecutive powers of 3 in a row.
Sequence A367084 lists the indices n of odd terms immediately followed by another odd term. We can split the sequence of terms > 1 in groups of 7 or 9 consecutive terms (a(A367084(n)+1 .. A367084(n+1)) such that each group starts and ends with an odd term. The sequence of the group lengths will be 7, 9, 9, 9, 9, 7, 9, 9, 9, 9, 9, 7, etc. There will always be 4 or 5 consecutive 9's separated by a single 7. The run lengths of the 9's are (4, 5, 4, 5, 4, 5, 4, ...) but this pattern is also slightly irregular, with two consecutive 5's occurring after every 24 (very rarely fewer) elements.
We think these patterns are important for the study of Erdős's conjecture of a positive density of Sum(Pow({3,4})) mentioned in A327621.
MATHEMATICA
With[{max=2*10^10}, Union[3^Range[0, Log[3, max]], 4^Range[0, Log[4, max]]]] (* Paul F. Marrero Romero, Nov 14 2023 *)
PROG
(PARI) upto(N)={my(p(b)=[b^k|k<-[0..logint(N, b)]]); setunion(p(3), p(4))}
(Python)
from itertools import islice
def A367083_gen(): # generator of terms
yield 1
a, b = 1, 4
while True:
while (a:=a*3)<b:
yield a
yield from (b, a)
b <<= 2
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
M. F. Hasler, Nov 03 2023
STATUS
approved