login
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.
2
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,2
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.
EXAMPLE
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.
PROG
(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)<b:
yield (c:=c+1)
b <<= 2
c += 1
A367085_list = list(islice(A367085_gen(), 30)) # Chai Wah Wu, Nov 09 2023
CROSSREFS
Cf. A000244 (powers of 3), A000302 (powers of 4).
Sequence in context: A007845 A299985 A313729 * A313730 A313731 A313732
KEYWORD
nonn
AUTHOR
M. F. Hasler, Nov 03 2023
STATUS
approved