OFFSET
0,2
COMMENTS
EXAMPLE
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
CROSSREFS
KEYWORD
nonn
AUTHOR
M. F. Hasler, Nov 03 2023
STATUS
approved