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