A080193 5-smooth numbers which are not 3-smooth.
5, 10, 15, 20, 25, 30, 40, 45, 50, 60, 75, 80, 90, 100, 120, 125, 135, 150, 160, 180, 200, 225, 240, 250, 270, 300, 320, 360, 375, 400, 405, 450, 480, 500, 540, 600, 625, 640, 675, 720, 750, 800, 810, 900, 960, 1000, 1080, 1125, 1200, 1215, 1250, 1280, 1350
Offset: 1
Examples
15 = 3*5 is a term but 18 = 2*3^2 is not.
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
Select[Range[1000], FactorInteger[#][[-1, 1]] == 5 &] (* Amiram Eldar, Nov 10 2020 *)
-
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
Comments