login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A342950
7-smooth numbers not divisible by 10: positive numbers whose prime divisors are all <= 7 but do not contain both 2 and 5.
3
1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 14, 15, 16, 18, 21, 24, 25, 27, 28, 32, 35, 36, 42, 45, 48, 49, 54, 56, 63, 64, 72, 75, 81, 84, 96, 98, 105, 108, 112, 125, 126, 128, 135, 144, 147, 162, 168, 175, 189, 192, 196, 216, 224, 225, 243, 245, 252, 256, 288, 294, 315, 324
OFFSET
1,2
LINKS
FORMULA
Sum_{n>=1} 1/a(n) = 63/16. - Amiram Eldar, Apr 01 2021
EXAMPLE
12 is in the sequence as all of its prime divisors are <= 7 and 12 is not divisible by 10.
MATHEMATICA
Select[Range@500, Max[First/@FactorInteger@#]<=7&&Mod[#, 10]!=0&] (* Giorgos Kalogeropoulos, Mar 30 2021 *)
PROG
(PARI) is(n) = if(n%10 == 0, return(0)); forprime(p = 2, 7, n/=p^valuation(n, p)); n==1
(Python)
A342950_list, n = [], 1
while n < 10**9:
if n % 10:
m = n
for p in (2, 3, 5, 7):
q, r = divmod(m, p)
while r == 0:
m = q
q, r = divmod(m, p)
if m == 1:
A342950_list.append(n)
n += 1 # Chai Wah Wu, Mar 31 2021
(Python)
from sympy import integer_log
def A342950(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, 7)[0]+1):
for j in range(integer_log(m:=x//7**i, 3)[0]+1):
c -= (k:=m//3**j).bit_length()+integer_log(k, 5)[0]
return c
return bisection(f, n, n) # Chai Wah Wu, Sep 17 2024
(Python) # faster for initial segment of sequence
import heapq
from itertools import islice
def A342950gen(): # generator of terms
v, oldv, h, psmooth_primes, = 1, 0, [1], [2, 3, 5, 7]
while True:
v = heapq.heappop(h)
if v != oldv:
yield v
oldv = v
for p in psmooth_primes:
if not (p==2 and v%5==0) and not (p==5 and v&1==0):
heapq.heappush(h, v*p)
print(list(islice(A342950gen(), 65))) # Michael S. Branicky, Sep 17 2024
CROSSREFS
Union of A108319 and A108347.
Intersection of A002473 and A067251.
Sequence in context: A050742 A350572 A290387 * A238985 A337230 A226900
KEYWORD
nonn
AUTHOR
David A. Corneth, Mar 30 2021
STATUS
approved