A195238
Numbers with at least 2 and not more than 3 distinct prime factors not greater than 7 that are multiples of 7 or of 15.
Original entry on oeis.org
14, 15, 21, 28, 30, 35, 42, 45, 56, 60, 63, 70, 75, 84, 90, 98, 105, 112, 120, 126, 135, 140, 147, 150, 168, 175, 180, 189, 196, 224, 225, 240, 245, 252, 270, 280, 294, 300, 315, 336, 350, 360, 375, 378, 392, 405, 441, 448, 450, 480, 490, 504, 525, 540, 560
Offset: 1
a(10) = 60 = 2^2 * 3 * 5.
a(11) = 63 = 3^2 * 7.
a(12) = 70 = 2 * 5 * 7.
-
a195238 n = a195238_list !! (n-1)
a195238_list = filter (\x -> a001221 x `elem` [2,3] &&
a006530 x `elem` [5,7] &&
(mod x 7 == 0 || mod x 15 == 0)) [1..]
-- Reinhard Zumkeller, Sep 13 2011
-
pfsQ[n_]:=Module[{fs=Transpose[FactorInteger[n]][[1]]},Max[fs]<8 && 1Harvey P. Dale, Aug 21 2011 *)
-
is(n)=my(v=apply(p->valuation(n,p), [2,3,5,7])); n==2^v[1]*3^v[2]*5^v[3]*7^v[4] && (v[4] || v[2]*v[3]) && factorback(v)==0 && !!v[1]+!!v[2]+!!v[3]+!!v[4]>1 \\ Charles R Greathouse IV, Sep 14 2015
A198375
Smallest n-digit number whose product of digits is n or 0 if no number exists.
Original entry on oeis.org
1, 12, 113, 1114, 11115, 111116, 1111117, 11111118, 111111119, 1111111125, 0, 111111111126, 0, 11111111111127, 111111111111135, 1111111111111128, 0, 111111111111111129, 0, 11111111111111111145, 111111111111111111137, 0, 0, 111111111111111111111138
Offset: 1
113, 131, and 311 are the 3-digit numbers whose product of digits is 3; 113 is the smallest.
-
Table[If[FactorInteger[n][[-1, 1]] > 9, 0, i = (10^n - 1)/9; While[i < 10^n && Times @@ IntegerDigits[i] != n, i++]; If[i == 10^n, 0, i]], {n, 30}] (* T. D. Noe, Oct 24 2011 *)
-
def A198375(n): return int(str(A198376(n))[::-1])
print([A198375(n) for n in range(1, 25)]) # Michael S. Branicky, Jan 21 2021
A219697
Primes neighboring a 7-smooth number.
Original entry on oeis.org
2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 71, 73, 79, 83, 89, 97, 101, 107, 109, 113, 127, 139, 149, 151, 163, 167, 179, 181, 191, 193, 197, 199, 211, 223, 239, 241, 251, 257, 269, 271, 281, 293, 337, 349, 359, 379, 383, 401, 419, 421, 431
Offset: 1
23 is in the sequence as one of 23-1 = 22 = 2 * 11 and 23+1 = 24 = 2^3 * 3 is 7-smooth and 23 is prime. - _David A. Corneth_, Apr 19 2021
-
mx = 2^10; t7 = Select[Sort[Flatten[Table[2^i * 3^j * 5^k * 7^l, {i, 0, Log[2, mx]}, {j, 0, Log[3, mx]}, {k, 0, Log[5, mx]}, {l, 0, Log[7, mx]}]]], # <= mx &]; Union[Select[t7 + 1, PrimeQ], Select[t7 - 1, PrimeQ]] (* T. D. Noe, Nov 26 2012 *)
Select[Prime[Range[90]],Max[FactorInteger[#-1][[;;,1]]]<11||Max[FactorInteger[#+1][[;;,1]]]<11&] (* Harvey P. Dale, Nov 03 2024 *)
-
is7smooth(n) = forprime(p = 2, 7, n /= p^valuation(n, p)); n==1
is(n) = isprime(n) && (is7smooth(n - 1) || is7smooth(n + 1)) \\ David A. Corneth, Apr 19 2021
A237851
a(1)=1; a(n) is the smallest integer not yet in the sequence divisible by all nonzero digits of a(n-1).
Original entry on oeis.org
1, 2, 4, 8, 16, 6, 12, 10, 3, 9, 18, 24, 20, 14, 28, 32, 30, 15, 5, 25, 40, 36, 42, 44, 48, 56, 60, 54, 80, 64, 72, 70, 7, 21, 22, 26, 66, 78, 112, 34, 84, 88, 96, 90, 27, 98, 144, 52, 50, 35, 45, 100, 11, 13, 33, 39, 63, 102, 38, 120, 46, 108, 104, 68, 168
Offset: 1
-
import Data.List (nub, sort, delete)
a237851 n = a237851_list !! (n-1)
a237851_list = 1 : f 1 [2..] where
f x zs = g zs where
g (u:us) | all ((== 0) . (mod u)) ds = u : f u (delete u zs)
| otherwise = g us
where ds = dropWhile (<= 1) $
sort $ nub $ map (read . return) $ show x
-- Reinhard Zumkeller, Feb 14 2014
-
a[1] = 1;
a[n_] := a[n] = For[k = 1, True, k++, If[FreeQ[Array[a, n-1], k], If[ AllTrue[Select[IntegerDigits[a[n-1]], #>0&] // Union, Divisible[k, #]&], Return[k]]]];
a /@ Range[100] (* Jean-François Alcover, Nov 26 2019 *)
A253572
Rectangular array A read by upward antidiagonals in which row A(n) is the sequence of all numbers divisible by no prime exceeding prime(n).
Original entry on oeis.org
1, 1, 2, 1, 2, 4, 1, 2, 3, 8, 1, 2, 3, 4, 16, 1, 2, 3, 4, 6, 32, 1, 2, 3, 4, 5, 8, 64, 1, 2, 3, 4, 5, 6, 9, 128, 1, 2, 3, 4, 5, 6, 8, 12, 256, 1, 2, 3, 4, 5, 6, 7, 9, 16, 512, 1, 2, 3, 4, 5, 6, 7, 8, 10, 18, 1024, 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 2048
Offset: 1
Array A starts:
{1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, ...}
{1, 2, 3, 4, 6, 8, 9, 12, 16, 18, 24, 27, 32, 36, ...}
{1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, 16, 18, 20, ...}
{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15, 16, ...}
{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 15, ...}
{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, ...}
{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, ...}
-
r = 20; c = 20; cmax = Max[300, Prime[r + 1]]; a[1] = Table[2^j, {j, 0, cmax}]; b[1] = a[1]; For[n = 2, n <= r, n++, a[n_] := a[n] = {}; b[n_] := b[n] = {}; a[n] = Union[Flatten[Table[Prime[n]^j*b[n - 1], {j, 0, cmax}]]]; For[k = 1, k <= cmax, k++, AppendTo[b[n], a[n][[k]]]]]; Table[b[n - k + 1][[k]], {n, 13}, {k, n}] // Flatten (* Array antidiagonals flattened. *)
(* Second program: *)
rows = 13; smoothNumbers[p_, max_] := Module[{a, aa, k, pp, iter}, k = PrimePi[p]; aa = Array[a, k]; pp = Prime[Range[k]]; iter = Table[{a[j], 0, PowerExpand @ Log[pp[[j]], max/Times @@ (Take[pp, j-1]^Take[aa, j-1])]}, {j, 1, k}]; Table[Times @@ (pp^aa), Sequence @@ iter // Evaluate] // Flatten // Sort]; t = Table[p = Prime[n]; Take[smoothNumbers[p, If[p == 2, 2^rows, (1/Sqrt[6])* Exp[Sqrt[2*Log[2]*Log[3]*rows]]]], rows-n+1], {n, 1, rows}]; Table[t[[n-k+1, k]], {n, 1, rows}, {k, 1, n}] // Flatten (* Jean-François Alcover, Nov 09 2016 *)
First formula corrected by
Tom Edgar, Jan 08 2015
A254196
a(n) is the numerator of Product_{i=1..n} (1/(1-1/prime(i))) - 1.
Original entry on oeis.org
1, 2, 11, 27, 61, 809, 13945, 268027, 565447, 2358365, 73551683, 2734683311, 112599773191, 4860900544813, 9968041656757, 40762420985117, 83151858555707, 5085105491885327, 341472595155548909, 24295409051193284539
Offset: 1
a(1)=1 because 1/2 + 1/4 + 1/8 + 1/16 + ... = 1/1.
a(2)=2 because 1/2 + 1/3 + 1/4 + 1/6 + 1/8 + 1/9 + 1/12 + ... = 2/1.
a(3)=11 because 1/2 + 1/3 + 1/4 + 1/5 + 1/6 + 1/8 + 1/9 + 1/10 + 1/12 + 1/15 + ... = 11/4.
a(4)=27 because Sum_{n>=2} 1/A002473(n) = 27/8.
a(5)=61 because Sum_{n>=2} 1/A051038(n) = 61/16.
-
seq(numer(mul(1/(1-1/ithprime(i)),i=1..n)-1),n=1..20); # Robert Israel, Jan 28 2015
-
Numerator[Table[Product[1/(1 - 1/p), {p, Prime[Range[n]]}] - 1, {n,1,20}]]
b[0] := 0; b[n_] := b[n - 1] + (1 - b[n - 1]) / Prime[n]
Numerator@ Table[b[n], {n, 1, 20}] (* Fred Daniel Kline, Jun 27 2017 *)
-
a(n) = numerator(prod(i=1, n, (1/(1-1/prime(i)))) - 1); \\ Michel Marcus, Jun 29 2017
A322447
Numbers k where Sum_{d | k} 1/rad(d) increases to a record.
Original entry on oeis.org
1, 2, 4, 8, 12, 16, 24, 32, 48, 72, 96, 144, 192, 288, 384, 576, 864, 1152, 1728, 2304, 3456, 4608, 5184, 6912, 10368, 13824, 20736, 27648, 41472, 55296, 62208, 82944, 124416, 165888, 207360, 248832, 331776, 373248, 414720, 497664, 622080, 746496, 829440, 995328
Offset: 1
The divisors of 12 are 1,2,3,4,6,12, so f(12) = 1 + (1/2) + (1/3) + (1/2) + (1/6) + (1/6) = 8/3, which exceeds f(n) for n = 1,...,11. Alternately, since f is multiplicative, f(12) = f(4)*f(3) = (1+2/2)*(1+1/3).
f(207360) = f(2^9)*f(3^4)*f(5) = (11/2)*(7/3)*(6/5) = 15.4, which exceeds f(n) for n < 207360. (Note that this is the first value of the sequence that is divisible by 5; earlier values are all 3-smooth.)
-
rad[n_] := Times @@ (First@# & /@ FactorInteger@n); f[n_] := DivisorSum[n, 1/rad[#] &]; fm = 0; s = {}; Do[f1 = f[n]; If[f1 > fm, fm = f1; AppendTo[s, n]], {n, 1, 10^6}]; s (* Amiram Eldar, Dec 08 2018 *)
-
rad(n) = factorback(factorint(n)[, 1]); \\ A007947
lista(nn) = {my(m=0, newm); for (n=1, nn, newm = sumdiv(n, d, 1/rad(d)); if (newm > m, m = newm; print1(n, ", ")););} \\ Michel Marcus, Dec 09 2018
A335331
a(n) = prime(k) where k is the n-th 7-smooth number.
Original entry on oeis.org
2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 37, 43, 47, 53, 61, 71, 73, 89, 97, 103, 107, 113, 131, 149, 151, 173, 181, 197, 223, 227, 229, 251, 263, 281, 307, 311, 349, 359, 379, 409, 419, 433, 463, 503, 521, 541, 571, 593, 613, 659, 691, 701, 719, 761, 809, 827, 853, 863
Offset: 1
A342950
7-smooth numbers not divisible by 10: positive numbers whose prime divisors are all <= 7 but do not contain both 2 and 5.
Original entry on oeis.org
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
12 is in the sequence as all of its prime divisors are <= 7 and 12 is not divisible by 10.
-
Select[Range@500,Max[First/@FactorInteger@#]<=7&&Mod[#,10]!=0&] (* Giorgos Kalogeropoulos, Mar 30 2021 *)
-
is(n) = if(n%10 == 0, return(0)); forprime(p = 2, 7, n/=p^valuation(n, p)); n==1
-
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
-
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
-
# 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
A343597
Numbers divisible by a 7-smooth composite number.
Original entry on oeis.org
4, 6, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 24, 25, 27, 28, 30, 32, 35, 36, 40, 42, 44, 45, 48, 49, 50, 52, 54, 56, 60, 63, 64, 66, 68, 70, 72, 75, 76, 78, 80, 81, 84, 88, 90, 92, 96, 98, 99, 100, 102, 104, 105, 108, 110, 112, 114, 116, 117, 120, 124, 125, 126, 128, 130
Offset: 1
33 = 11 * 3 has divisors 1, 3, 11, 33, of which only 33 is composite. 33 is not 7-smooth, as its prime factors include 11, which is greater than 7. So 33 is not in the sequence.
52 = 13 * 2 * 2 is divisible by 4, which is composite and 7-smooth, so 52 is in the sequence.
-
Select[Range[130], Plus @@ IntegerExponent[#, {2, 3, 5, 7}] > 1 &] (* Amiram Eldar, May 04 2021 *)
Comments