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

A115343
Products of 9 distinct primes.
10
223092870, 281291010, 300690390, 340510170, 358888530, 363993630, 380570190, 397687290, 406816410, 417086670, 434444010, 455885430, 458948490, 481410930, 485555070, 497668710, 504894390, 512942430, 514083570, 531990690, 538047510, 547777230, 551861310
OFFSET
1,1
LINKS
David A. Corneth, Table of n, a(n) for n = 1..10000 (first 1045 terms from Vincenzo Librandi and Chai Wah Wu)
EXAMPLE
514083570 is in the sequence as it is equal to 2*3*5*7*11*13*17*19*53.
MAPLE
N:= 10^9: # to get all terms < N
n0:= mul(ithprime(i), i=1..8):
Primes:= select(isprime, [$1..floor(N/n0)]):
nPrimes:= nops(Primes):
for i from 1 to 9 do
for j from 1 to nPrimes do
M[i, j]:= convert(Primes[1..min(j, i)], `*`);
od od:
A:= {}:
for i9 from 9 to nPrimes do
m9:= Primes[i9];
for i8 in select(t -> M[7, t-1]*Primes[t]*m9 <= N, [$8..i9-1]) do
m8:= m9*Primes[i8];
for i7 in select(t -> M[6, t-1]*Primes[t]*m8 <= N, [$7..i8-1]) do
m7:= m8*Primes[i7];
for i6 in select(t -> M[5, t-1]*Primes[t]*m7 <= N, [$6..i7-1]) do
m6:= m7*Primes[i6];
for i5 in select(t -> M[4, t-1]*Primes[t]*m6 <= N, [$5..i6-1]) do
m5:= m6*Primes[i5];
for i4 in select(t -> M[3, t-1]*Primes[t]*m5 <= N, [$4..i5-1]) do
m4:= m5*Primes[i4];
for i3 in select(t -> M[2, t-1]*Primes[t]*m4 <= N, [$3..i4-1]) do
m3:= m4*Primes[i3];
for i2 in select(t -> M[1, t-1]*Primes[t]*m3 <= N, [$2..i3-1]) do
m2:= m3*Primes[i2];
for i1 in select(t -> Primes[t]*m2 <= N, [$1..i2-1]) do
A:= A union {m2*Primes[i1]};
od od od od od od od od od:
A; # Robert Israel, Sep 02 2014
MATHEMATICA
Module[{n=6*10^8, k}, k=PrimePi[n/Times@@Prime[Range[8]]]; Select[ Union[ Times@@@ Subsets[Prime[Range[k]], {9}]], #<=n&]](* Harvey P. Dale with suggestions from Jean-François Alcover, Sep 03 2014 *)
n = 10^9; n0 = Times @@ Prime[Range[8]]; primes = Select[Range[Floor[n/n0]], PrimeQ]; nPrimes = Length[primes]; Do[M[i, j] = Times @@ primes[[1 ;; Min[j, i]]], {i, 1, 9}, {j, 1, nPrimes}]; A = {};
Do[m9 = primes[[i9]];
Do[m8 = m9*primes[[i8]];
Do[m7 = m8*primes[[i7]];
Do[m6 = m7*primes[[i6]];
Do[m5 = m6*primes[[i5]];
Do[m4 = m5*primes[[i4]];
Do[m3 = m4*primes[[i3]];
Do[m2 = m3*primes[[i2]];
Do[A = A ~Union~ {m2*primes[[i1]]},
{i1, Select[Range[1, i2-1], primes[[#]]*m2 <= n &]}],
{i2, Select[Range[2, i3-1], M[1, #-1]*primes[[#]]*m3 <= n &]}],
{i3, Select[Range[3, i4-1], M[2, #-1]*primes[[#]]*m4 <= n &]}],
{i4, Select[Range[4, i5-1], M[3, #-1]*primes[[#]]*m5 <= n &]}],
{i5, Select[Range[5, i6-1], M[4, #-1]*primes[[#]]*m6 <= n &]}],
{i6, Select[Range[6, i7-1], M[5, #-1]*primes[[#]]*m7 <= n &]}],
{i7, Select[Range[7, i8-1], M[6, #-1]*primes[[#]]*m8 <= n &]}],
{i8, Select[Range[8, i9-1], M[7, #-1]*primes[[#]]*m9 <= n &]}],
{i9, 9, nPrimes}];
A (* Jean-François Alcover, Sep 03 2014, translated and adapted from Robert Israel's Maple program *)
PROG
(Python)
from operator import mul
from functools import reduce
from sympy import nextprime, sieve
from itertools import combinations
n = 190
m = 9699690*nextprime(n-1)
A115343 = []
for x in combinations(sieve.primerange(1, n), 9):
y = reduce(mul, (d for d in x))
if y < m:
A115343.append(y)
A115343 = sorted(A115343) # Chai Wah Wu, Sep 02 2014
(Python)
from math import prod, isqrt
from sympy import primerange, integer_nthroot, primepi
def A115343(n):
def g(x, a, b, c, m): yield from (((d, ) for d in enumerate(primerange(b+1, isqrt(x//c)+1), a+1)) if m==2 else (((a2, b2), )+d for a2, b2 in enumerate(primerange(b+1, integer_nthroot(x//c, m)[0]+1), a+1) for d in g(x, a2, b2, c*b2, m-1)))
def f(x): return int(n+x-sum(primepi(x//prod(c[1] for c in a))-a[-1][0] for a in g(x, 0, 1, 1, 9)))
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
return bisection(f) # Chai Wah Wu, Aug 31 2024
(PARI) is(n)=omega(n)==9 && bigomega(n)==9 \\ Hugo Pfoertner, Dec 18 2018
KEYWORD
nonn,easy
AUTHOR
Jonathan Vos Post, Mar 06 2006
EXTENSIONS
Corrected and extended by Don Reble, Mar 09 2006
More terms and corrected b-file from Chai Wah Wu, Sep 02 2014
STATUS
approved