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.

Showing 1-3 of 3 results.

A367084 Indices k such that A367083(k) and A367083(k+1) are both odd.

Original entry on oeis.org

0, 7, 16, 25, 34, 43, 50, 59, 68, 77, 86, 95, 102, 111, 120, 129, 138, 145, 154, 163, 172, 181, 190, 197, 206, 215, 224, 233, 240, 249, 258, 267, 276, 285, 292, 301, 310, 319, 328, 335, 344, 353, 362, 371, 380, 387, 396, 405, 414, 423, 430, 439, 448, 457, 466, 475, 482, 491, 500
Offset: 0

Views

Author

M. F. Hasler, Nov 03 2023

Keywords

Comments

First differences are either 7 (in isolated positions) or 9 (always 4 or 5 times consecutively in a row). It is interesting to study these run lengths, see A367083 for further information.

Crossrefs

Programs

  • PARI
    A367084_upto(N) = [n|n<-A=A367083_upto(N), A[n+1]==Mod(A[n],2)]
    
  • Python
    from itertools import islice
    def A367084_gen(): # generator of terms
        a, b, c = 1, 4, -1
        while True:
            while (a:=a*3)A367084_list = list(islice(A367084_gen(),30)) # Chai Wah Wu, Nov 08 2023

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

A367086 Exponents k > 0 such that the interval [4^(k-1), 4^k] contains two powers of 3.

Original entry on oeis.org

1, 4, 8, 12, 16, 20, 23, 27, 31, 35, 39, 43, 46, 50, 54, 58, 62, 65, 69, 73, 77, 81, 85, 88, 92, 96, 100, 104, 107, 111, 115, 119, 123, 127, 130, 134, 138, 142, 146, 149, 153, 157, 161, 165, 169, 172, 176, 180, 184, 188, 191, 195, 199, 203, 207, 211, 214, 218, 222, 226, 230, 233, 237, 241
Offset: 0

Views

Author

M. F. Hasler, Nov 03 2023

Keywords

Comments

This is a list or set of numbers but at the same time a function of n related to other sequences A367083 - A367085 that all use the same index n starting at offset 0, which explains why this sequence also starts at offset 0.
The list of powers of 3 and powers of 4 by increasing size is A367083 = (1; 3^1, 4^1, 3^2, 4^2, 3^3, 4^3, 3^4; 3^5, 4^4, 3^6, 4^5, 3^7, 4^6, 3^8, 4^7, 3^9; 3^10, ...). That list can be split into groups (3^r, 4^s, ..., 3^r') of either 4+3 = 7 or 5+4 = 9 terms which start and end with a power of three. Otherwise said, the end of one group and the start of the next group are two consecutive powers of 3 that lie between two consecutive powers of 4.
This sequence lists the exponent of the first power of 4 in each group: these are exactly the exponents k of powers of 4 such that there are two powers of 3 in the interval [4^(k-1), 4^k].
The first differences, D = (3, 4, 4, 4, 4, 3, 4, 4, 4, 4, 4, 3, 4, 4, 4, 4, 3, 4, 4, 4, 4, 4, 3, ...) are directly related to those of A367084 and A367085, viz, D(n) = (A367084(n+1)-A367084(n)-1)/2 = A367085(n+1)-A367085(n)-1. The run lengths of the '4's are (4, 5, 4, 5, ...) with two consecutive '5's every 24 +- 1 terms.

Examples

			The smallest power 4^s such that the interval [4^(s-1), 4^s] contains two powers of 3 is 4^1, i.e., s = 1, where [4^0, 4^1] contains 3^0 and 3^1. Hence a(0) = 1. (This is also the exponent of the smallest power of 4 in the first group of the form (3^r, 4^s, ..., 3^r') in A367083, namely: (3^1, 4^1, 3^2, 4^2, 3^3, 4^3, 3^4).)
The next larger power of 4 with this property is 4^4, hence a(1) = 4, where [4^3, 4^4] contains 3^4 and 3^5. This is also the least exponent of a power of 4 in the second group (3^5, 4^4, 3^6, 4^5, ..., 3^9), which is marked on the left in the table below.
.
    Numbers of the forms
         3^r      4^s
      ------   ------
         ...
    |              16
    |     27 __________    the interval
    |              64  |    [4^3, 4^4]
    \____ 81           |   includes two
    /    243           |   powers of 3,
  2 |        ____ 256 _|  so 4 is a term
  n |    729             of this sequence
  d |            1024
    |   2187
  g |            4096
  r |   6561 __________    the interval
  p |           16384  |    [4^7, 4^8]
    \_ 19683           |   includes two
    /  59049           |   powers of 3,
    |        __ 65536 _|  so 8 is a term
    | 177147             of this sequence
    |          262144
    | 531441
                  ...
		

Crossrefs

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

Programs

  • PARI
    A367086_upto(N)={my(r=1, s=1, L3=log(3), L4=log(4), A=List(s)); until(r>=N, listput(A, s-=1+r-r+=((r+4)*L3 > (s+3)*L4)+4)); Vec(A)}
    
  • Python
    from itertools import islice
    def A367086_gen(): # generator of terms
        a, b, c, i = 1, 4, -1, 1
        while True:
            while (a:=a*3)A367086_list = list(islice(A367086_gen(),30)) # Chai Wah Wu, Nov 18 2023

Formula

a(n) = A235127( A367083( A367084(n)+2 )), where A235127 is the 4-valuation.
a(n) = 1 + floor(n/log_3(4/3)) = 1 + floor(n/(log_3(4) - 1)).
Showing 1-3 of 3 results.