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.

A367085 3-valuation r(n) of the terms A367083(A367084(n)+1) = 3^r(n) which are the odd terms preceded by another odd term.

Original entry on oeis.org

1, 5, 10, 15, 20, 25, 29, 34, 39, 44, 49, 54, 58, 63, 68, 73, 78, 82, 87, 92, 97, 102, 107, 111, 116, 121, 126, 131, 135, 140, 145, 150, 155, 160, 164, 169, 174, 179, 184, 188, 193, 198, 203, 208, 213, 217, 222, 227, 232, 237, 241, 246, 251, 256, 261, 266, 270, 275, 280, 285, 290, 294, 299
Offset: 0

Views

Author

M. F. Hasler, Nov 03 2023

Keywords

Comments

These terms, A367083(A367084(n)+1) = 3^r(n), are also those which start the (maximal) groups of terms of alternating parity, (3^r(n), 4^s(n), ..., 3^(r(n+1)-1) = A367083(A367084(n+1))).
The first differences, D = (4, 5, 5, 5, 5, 4, 5, 5, 5, 5, 5, 4, 5, 5, 5, 5, 4, 5, 5, 5, 5, 5, 4, ...) are directly related to those of A367084, viz, D(n) = (A367084(n+1)-A367084(n)+1)/2. The run lengths of the '5's are (4, 5, 4, 5, ...) with two consecutive '5' every 24 +- 1 terms.

Examples

			The first group (3^r, 4^s, ..., 3^r') in A367083 starts with A367083(1) = 3 = 3^1 (following the odd term A367083(A367084(0)) = 3^0 = 1), therefore a(0) = 1.
The second such group starts with A367083(8) = 3^5 (following the odd term A367083(A367084(1) = 7) = 3^4), therefore a(1) = 5.
		

Crossrefs

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

Programs

  • PARI
    A367085(n)=valuation(A367083(A367084(n)+1),3) \\ or Axxx[.+1] if vectors are used instead of the 0-indexed functions/sequences.
    
  • PARI
    /* more efficiently: */
    A367085_upto(N)={my(r=1, s=1, L3=log(3), L4=log(4), A=List(r)); until(r>=N, listput(A, r += 1-s+s+=((r+4)*L3 > (s+3)*L4)+3)); Vec(A)}
    
  • Python
    from itertools import islice
    def A367085_gen(): # generator of terms
        a, b, c = 1, 4, 0
        while True:
            while (a:=a*3)A367085_list = list(islice(A367085_gen(),30)) # Chai Wah Wu, Nov 09 2023