OFFSET
1,1
COMMENTS
Numbers of the form 2^r*3^s*5^t with r, s >= 0, t > 0.
That is, 5-smooth numbers which are multiples of 5. - Charles R Greathouse IV, Mar 19 2015
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
FORMULA
EXAMPLE
15 = 3*5 is a term but 18 = 2*3^2 is not.
MATHEMATICA
Select[Range[1000], FactorInteger[#][[-1, 1]] == 5 &] (* Amiram Eldar, Nov 10 2020 *)
PROG
(PARI) {m=1440; z=[]; for(r=0, floor(log(m)/log(2)), a=2^r; for(s=0, floor(log(m/a)/log(3)), b=a*3^s; for(t=1, floor(log(m/b)/log(5)), z=concat(z, b*5^t)))); z=vecsort(z); for(i=1, length(z), print1(z[i], ", "))}
(PARI) list(lim)=my(v=List(), x=1, y, z); while((x*=5)<=lim, y=x/3; while((y*=3)<=lim, z=y/2; while((z*=2)<=lim, listput(v, z)))); Set(v) \\ Charles R Greathouse IV, Mar 19 2015
(Python)
from sympy import integer_log
def A080193(n):
def bisection(f, kmin=0, kmax=1):
while f(kmax) > kmax: kmax <<= 1
while kmax-kmin > 1:
kmid = kmax+kmin>>1
if f(kmid) <= kmid:
kmax = kmid
else:
kmin = kmid
return kmax
def f(x):
c = n+x
for i in range(integer_log(x, 5)[0]+1):
for j in range(integer_log(y:=x//5**i, 3)[0]+1):
c -= (y//3**j).bit_length()
return c
return bisection(f, n, n)*5 # Chai Wah Wu, Sep 16 2024
(Python) # faster for initial segment of sequence
import heapq
from itertools import islice
def A080193gen(): # generator of terms
v, oldv, h, psmooth_primes, = 1, 0, [1], [2, 3, 5]
while True:
v = heapq.heappop(h)
if v != oldv:
yield 5*v
oldv = v
for p in psmooth_primes:
heapq.heappush(h, v*p)
print(list(islice(A080193gen(), 55))) # Michael S. Branicky, Sep 18 2024
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Klaus Brockhaus, Feb 10 2003
STATUS
approved