login

Revision History for A051037

(Bold, blue-underlined text is an addition; faded, red-underlined text is a deletion.)

Showing entries 1-10 | older changes
5-smooth numbers, i.e., numbers whose prime divisors are all <= 5.
(history; published version)
#181 by Michel Marcus at Wed Sep 18 06:05:02 EDT 2024
STATUS

reviewed

approved

#180 by Joerg Arndt at Wed Sep 18 03:02:47 EDT 2024
STATUS

proposed

reviewed

#179 by Michael S. Branicky at Tue Sep 17 12:50:07 EDT 2024
STATUS

editing

proposed

#178 by Michael S. Branicky at Tue Sep 17 12:50:04 EDT 2024
PROG

(Python) # faster for initial segment of sequence

import heapq

from itertools import islice

def A051037gen(): # generator of terms

v, oldv, h, psmooth_primes, = 1, 0, [1], [2, 3, 5]

while True:

v = heapq.heappop(h)

if v != oldv:

yield v

oldv = v

for p in psmooth_primes:

heapq.heappush(h, v*p)

print(list(islice(A051037gen(), 65))) # Michael S. Branicky, Sep 17 2024

STATUS

proposed

editing

#177 by Chai Wah Wu at Mon Sep 16 21:41:42 EDT 2024
STATUS

editing

proposed

#176 by Chai Wah Wu at Mon Sep 16 21:41:36 EDT 2024
PROG

i5 for j in range(integer_log(y:= x//5**i, 3)[0]+1):

for j in range(integer_log(x//i5, 3)[0]+1):

c -= (xy//(i5*3**j)).bit_length()

STATUS

approved

editing

#175 by N. J. A. Sloane at Mon Sep 16 12:47:08 EDT 2024
STATUS

proposed

approved

#174 by Chai Wah Wu at Mon Sep 16 12:30:11 EDT 2024
STATUS

editing

proposed

#173 by Chai Wah Wu at Mon Sep 16 12:30:02 EDT 2024
PROG

return bisection(f, n, n) # Chai Wah Wu, Sep 16 2024

#172 by Chai Wah Wu at Mon Sep 16 12:29:11 EDT 2024
PROG

(Python)

from sympy import integer_log

def A051037(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):

i5 = 5**i

for j in range(integer_log(x//i5, 3)[0]+1):

c -= (x//(i5*3**j)).bit_length()

return c

return bisection(f, n, n) # Chai Wah Wu, Sep 16 2024

STATUS

approved

editing