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”).

7-smooth numbers not divisible by 10: positive numbers whose prime divisors are all <= 7 but do not contain both 2 and 5.
3

%I #34 Sep 18 2024 05:53:13

%S 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,

%T 54,56,63,64,72,75,81,84,96,98,105,108,112,125,126,128,135,144,147,

%U 162,168,175,189,192,196,216,224,225,243,245,252,256,288,294,315,324

%N 7-smooth numbers not divisible by 10: positive numbers whose prime divisors are all <= 7 but do not contain both 2 and 5.

%H David A. Corneth, <a href="/A342950/b342950.txt">Table of n, a(n) for n = 1..10195</a>

%F Sum_{n>=1} 1/a(n) = 63/16. - _Amiram Eldar_, Apr 01 2021

%e 12 is in the sequence as all of its prime divisors are <= 7 and 12 is not divisible by 10.

%t Select[Range@500,Max[First/@FactorInteger@#]<=7&&Mod[#,10]!=0&] (* _Giorgos Kalogeropoulos_, Mar 30 2021 *)

%o (PARI) is(n) = if(n%10 == 0, return(0)); forprime(p = 2, 7, n/=p^valuation(n, p)); n==1

%o (Python)

%o A342950_list, n = [], 1

%o while n < 10**9:

%o if n % 10:

%o m = n

%o for p in (2,3,5,7):

%o q, r = divmod(m,p)

%o while r == 0:

%o m = q

%o q, r = divmod(m,p)

%o if m == 1:

%o A342950_list.append(n)

%o n += 1 # _Chai Wah Wu_, Mar 31 2021

%o (Python)

%o from sympy import integer_log

%o def A342950(n):

%o def bisection(f,kmin=0,kmax=1):

%o while f(kmax) > kmax: kmax <<= 1

%o while kmax-kmin > 1:

%o kmid = kmax+kmin>>1

%o if f(kmid) <= kmid:

%o kmax = kmid

%o else:

%o kmin = kmid

%o return kmax

%o def f(x):

%o c = n+x

%o for i in range(integer_log(x,7)[0]+1):

%o for j in range(integer_log(m:=x//7**i,3)[0]+1):

%o c -= (k:=m//3**j).bit_length()+integer_log(k,5)[0]

%o return c

%o return bisection(f,n,n) # _Chai Wah Wu_, Sep 17 2024

%o (Python) # faster for initial segment of sequence

%o import heapq

%o from itertools import islice

%o def A342950gen(): # generator of terms

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

%o while True:

%o v = heapq.heappop(h)

%o if v != oldv:

%o yield v

%o oldv = v

%o for p in psmooth_primes:

%o if not (p==2 and v%5==0) and not (p==5 and v&1==0):

%o heapq.heappush(h, v*p)

%o print(list(islice(A342950gen(), 65))) # _Michael S. Branicky_, Sep 17 2024

%Y Union of A108319 and A108347.

%Y Intersection of A002473 and A067251.

%K nonn

%O 1,2

%A _David A. Corneth_, Mar 30 2021