cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A080193 5-smooth numbers which are not 3-smooth.

This page as a plain text file.
%I A080193 #23 Sep 18 2024 11:53:50
%S A080193 5,10,15,20,25,30,40,45,50,60,75,80,90,100,120,125,135,150,160,180,
%T A080193 200,225,240,250,270,300,320,360,375,400,405,450,480,500,540,600,625,
%U A080193 640,675,720,750,800,810,900,960,1000,1080,1125,1200,1215,1250,1280,1350
%N A080193 5-smooth numbers which are not 3-smooth.
%C A080193 Numbers of the form 2^r*3^s*5^t with r, s >= 0, t > 0.
%C A080193 That is, 5-smooth numbers which are multiples of 5. - _Charles R Greathouse IV_, Mar 19 2015
%H A080193 Amiram Eldar, <a href="/A080193/b080193.txt">Table of n, a(n) for n = 1..10000</a>
%F A080193 From _Amiram Eldar_, Nov 10 2020: (Start)
%F A080193 a(n) = 5 * A051037(n).
%F A080193 Sum_{n>=1} 1/a(n) = 3/4. (End)
%e A080193 15 = 3*5 is a term but 18 = 2*3^2 is not.
%t A080193 Select[Range[1000], FactorInteger[#][[-1, 1]] == 5 &] (* _Amiram Eldar_, Nov 10 2020 *)
%o A080193 (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],","))}
%o A080193 (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
%o A080193 (Python)
%o A080193 from sympy import integer_log
%o A080193 def A080193(n):
%o A080193     def bisection(f,kmin=0,kmax=1):
%o A080193         while f(kmax) > kmax: kmax <<= 1
%o A080193         while kmax-kmin > 1:
%o A080193             kmid = kmax+kmin>>1
%o A080193             if f(kmid) <= kmid:
%o A080193                 kmax = kmid
%o A080193             else:
%o A080193                 kmin = kmid
%o A080193         return kmax
%o A080193     def f(x):
%o A080193         c = n+x
%o A080193         for i in range(integer_log(x,5)[0]+1):
%o A080193             for j in range(integer_log(y:=x//5**i,3)[0]+1):
%o A080193                 c -= (y//3**j).bit_length()
%o A080193         return c
%o A080193     return bisection(f,n,n)*5 # _Chai Wah Wu_, Sep 16 2024
%o A080193 (Python) # faster for initial segment of sequence
%o A080193 import heapq
%o A080193 from itertools import islice
%o A080193 def A080193gen(): # generator of terms
%o A080193     v, oldv, h, psmooth_primes, = 1, 0, [1], [2, 3, 5]
%o A080193     while True:
%o A080193         v = heapq.heappop(h)
%o A080193         if v != oldv:
%o A080193             yield 5*v
%o A080193             oldv = v
%o A080193             for p in psmooth_primes:
%o A080193                     heapq.heappush(h, v*p)
%o A080193 print(list(islice(A080193gen(), 55))) # _Michael S. Branicky_, Sep 18 2024
%Y A080193 Cf. A051037, A003586.
%K A080193 easy,nonn
%O A080193 1,1
%A A080193 _Klaus Brockhaus_, Feb 10 2003