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.

A367083 List of powers of 3 and powers of 4, in increasing order, starting with a(0) = 3^0 = 4^0 = 1.

Original entry on oeis.org

1, 3, 4, 9, 16, 27, 64, 81, 243, 256, 729, 1024, 2187, 4096, 6561, 16384, 19683, 59049, 65536, 177147, 262144, 531441, 1048576, 1594323, 4194304, 4782969, 14348907, 16777216, 43046721, 67108864, 129140163, 268435456, 387420489, 1073741824, 1162261467, 3486784401, 4294967296, 10460353203, 17179869184
Offset: 0

Views

Author

M. F. Hasler, Nov 03 2023

Keywords

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.

Crossrefs

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

Programs

  • 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 *)
  • 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)A367083_list = list(islice(A367083_gen(),30)) # Chai Wah Wu, Nov 08 2023

Formula

Union of A000244 and A000302.