%I #25 Nov 15 2023 01:17:36
%S 1,3,4,9,16,27,64,81,243,256,729,1024,2187,4096,6561,16384,19683,
%T 59049,65536,177147,262144,531441,1048576,1594323,4194304,4782969,
%U 14348907,16777216,43046721,67108864,129140163,268435456,387420489,1073741824,1162261467,3486784401,4294967296,10460353203,17179869184
%N List of powers of 3 and powers of 4, in increasing order, starting with a(0) = 3^0 = 4^0 = 1.
%C 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.
%C 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.
%C 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.
%F Union of A000244 and A000302.
%t 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 *)
%o (PARI) upto(N)={my(p(b)=[b^k|k<-[0..logint(N,b)]]);setunion(p(3), p(4))}
%o (Python)
%o from itertools import islice
%o def A367083_gen(): # generator of terms
%o yield 1
%o a, b = 1, 4
%o while True:
%o while (a:=a*3)<b:
%o yield a
%o yield from (b,a)
%o b <<= 2
%o A367083_list = list(islice(A367083_gen(),30)) # _Chai Wah Wu_, Nov 08 2023
%Y Cf. A000244 (powers of 3), A000302 (powers of 4).
%K nonn,easy
%O 0,2
%A _M. F. Hasler_, Nov 03 2023