login
7-smooth numbers which are not 5-smooth.
15

%I #34 Sep 18 2024 06:07:49

%S 7,14,21,28,35,42,49,56,63,70,84,98,105,112,126,140,147,168,175,189,

%T 196,210,224,245,252,280,294,315,336,343,350,378,392,420,441,448,490,

%U 504,525,560,567,588,630,672,686,700,735,756,784,840,875,882,896,945,980

%N 7-smooth numbers which are not 5-smooth.

%C Numbers of the form 7*2^r*3^s*5^t*7^u with r, s, t, u >= 0.

%C Multiples of 7 which are members of A002473. Or multiples of 7 with the largest prime divisor < 10.

%C Numbers whose greatest prime factor (A006530) is 7. - _M. F. Hasler_, Nov 21 2018

%H David A. Corneth, <a href="/A080194/b080194.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = 7 * A002473(n). - _David A. Corneth_, Nov 22 2018

%F Sum_{n>=1} 1/a(n) = 5/8. - _Amiram Eldar_, Nov 10 2020

%e 28 = 2^2*7 is a term but 30 = 2*3*5 is not.

%t Select[Range[999], FactorInteger[#][[-1, 1]] == 7 &] (* _Giovanni Resta_, Nov 22 2018 *)

%o (PARI) A080194_list(M)={my(L=List(),a,b,c); for(r=1,logint(M\1,7), a=7^r; for(s=0, logint(M\a,3), b=a*3^s; for(t=0,logint(M\b,5), c=b*5^t; for(u=0,logint(M\c,2), listput(L,c<<u))))); Set(L)} \\ Could be replaced by smooth(primes(4),M) from A051037. - Edited by _M. F. Hasler_, Nov 22 2018

%o (PARI) select( is_A080194(n)={n>1 && vecmax(factor(n,7)[,1])==7}, [0..10^3]) \\ Defines is_A080194(), used elsewhere. The select() command is a check and illustration. For longer lists, use list() above. - _M. F. Hasler_, Nov 21 2018

%o (Python)

%o from sympy import integer_log

%o def A080194(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,5)[0]+1):

%o for k in range(integer_log(r:=m//5**j,3)[0]+1):

%o c -= (r//3**k).bit_length()

%o return c

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

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

%o import heapq

%o from itertools import islice

%o from sympy import primerange

%o def A080194gen(p=7): # generator of terms

%o v, oldv, h, psmooth_primes, = 1, 0, [1], list(primerange(1, p+1))

%o while True:

%o v = heapq.heappop(h)

%o if v != oldv:

%o yield 7*v

%o oldv = v

%o for p in psmooth_primes:

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

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

%Y Cf. A002473, A051037.

%Y Cf. A085125, A085126, A085127, A085128, A085129, A085131, A085132.

%K easy,nonn

%O 1,1

%A _Klaus Brockhaus_, Feb 10 2003