OFFSET
1,1
COMMENTS
Base 3 analog of A112249.
The asymptotic density of this sequence is 0 (Cooper and Kennedy, 1989).
LINKS
Paolo Xausa, Table of n, a(n) for n = 1..10000
Curtis N. Cooper and Robert E. Kennedy, Chebyshev's inequality and natural density, Amer. Math. Monthly, Vol. 96, No. 2 (1989), pp. 118-124.
MATHEMATICA
Select[Range[3, 200], Divisible[#, IntegerLength[#, 3] - 1] &] (* Paolo Xausa, Jul 03 2026 *)
PROG
(Python)
from sympy import integer_log
from oeis_sequences.OEISsequences import bisection
def A397629(n):
def f(x):
c, l, a = n+x, integer_log(x, 3)[0], 3
for i in range(1, l):
c += (a-1)//i
a *= 3
c -= (a-1)//i
if l:
c -= x//l-(a-1)//l
return c
return bisection(f, n, n)
CROSSREFS
KEYWORD
nonn,new
AUTHOR
Chai Wah Wu, Jul 02 2026
STATUS
approved
