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 A367085 #11 Nov 09 2023 11:05:49 %S A367085 1,5,10,15,20,25,29,34,39,44,49,54,58,63,68,73,78,82,87,92,97,102,107, %T A367085 111,116,121,126,131,135,140,145,150,155,160,164,169,174,179,184,188, %U A367085 193,198,203,208,213,217,222,227,232,237,241,246,251,256,261,266,270,275,280,285,290,294,299 %N 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. %C A367085 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))). %C A367085 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. %e A367085 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. %e A367085 The second such group starts with A367083(8) = 3^5 (following the odd term A367083(A367084(1) = 7) = 3^4), therefore a(1) = 5. %o A367085 (PARI) A367085(n)=valuation(A367083(A367084(n)+1),3) \\ or Axxx[.+1] if vectors are used instead of the 0-indexed functions/sequences. %o A367085 (PARI) /* more efficiently: */ %o A367085 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)} %o A367085 (Python) %o A367085 from itertools import islice %o A367085 def A367085_gen(): # generator of terms %o A367085 a, b, c = 1, 4, 0 %o A367085 while True: %o A367085 while (a:=a*3)<b: %o A367085 yield (c:=c+1) %o A367085 b <<= 2 %o A367085 c += 1 %o A367085 A367085_list = list(islice(A367085_gen(),30)) # _Chai Wah Wu_, Nov 09 2023 %Y A367085 Cf. A367083, A367084. %Y A367085 Cf. A000244 (powers of 3), A000302 (powers of 4). %K A367085 nonn %O A367085 0,2 %A A367085 _M. F. Hasler_, Nov 03 2023