OFFSET
1,1
COMMENTS
Equivalently, this sequence is the union of numbers of the form 25^n*(5*n+2) and numbers of the form 25^n*(5*n+3).
FORMULA
a(n) = 2.4 n + O(log n). - Charles R Greathouse IV, Dec 19 2013
PROG
(PARI) is(n)=n/=25^valuation(n, 25); n%5==2||n%5==3 \\ Charles R Greathouse IV and V. Raman, Dec 19 2013
(Python)
from sympy import integer_log
def A233998(n):
def bisection(f, kmin=0, kmax=1):
while f(kmax) > kmax: kmax <<= 1
kmin = kmax >> 1
while kmax-kmin > 1:
kmid = kmax+kmin>>1
if f(kmid) <= kmid:
kmax = kmid
else:
kmin = kmid
return kmax
def f(x): return n+x-sum(((m:=x//25**i)-2)//5+(m-3)//5+2 for i in range(integer_log(x, 25)[0]+1))
return bisection(f, n, n) # Chai Wah Wu, Mar 19 2025
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
V. Raman, Dec 18 2013
STATUS
approved
