cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A123322 Products of 8 distinct primes (squarefree 8-almost primes).

This page as a plain text file.
%I A123322 #47 Aug 31 2024 18:02:56
%S A123322 9699690,11741730,13123110,14804790,15825810,16546530,17160990,
%T A123322 17687670,18888870,20030010,20281170,20930910,21111090,21411390,
%U A123322 21637770,21951930,23130030,23393370,23993970,24534510,25555530,25571910
%N A123322 Products of 8 distinct primes (squarefree 8-almost primes).
%C A123322 Intersection of A005117 and A046310.
%H A123322 Robert G. Wilson v, <a href="/A123322/b123322.txt">Table of n, a(n) for n = 1..29422</a> (first 10000 terms from Rick Shepherd)
%H A123322 <a href="/index/Pri#prime_signature">Index to sequences related to prime signature</a>
%e A123322 a(1) = 9699690 = 2*3*5*7*11*13*17*19 = A002110(8).
%p A123322 N:= 3*10^7: # to get all terms  <= N
%p A123322 pmax:= floor(N/mul(ithprime(i),i=1..7)):
%p A123322 Primes:= select(isprime,[2,seq(i,i=3..pmax,2)]):
%p A123322 sort(select(`<`,map(convert,combinat:-choose(Primes,8),`*`),N)); # _Robert Israel_, Dec 18 2018
%t A123322 f8Q[n_]:=Last/@FactorInteger[n]=={1, 1, 1, 1, 1, 1, 1, 1}; lst={};Do[If[f8Q[n], AppendTo[lst, n]], {n, 10!, 11!}];lst (* _Vladimir Joseph Stephan Orlovsky_, Aug 26 2008 *)
%t A123322 Take[ Sort[ Times @@@ Subsets[ Prime@ Range@ 15, {8}]], 22] (* _Robert G. Wilson v_, Dec 18 2018 *)
%o A123322 (PARI) is(n)=issquarefree(n)&&omega(n)==8 \\ _Charles R Greathouse IV_, Feb 01 2017, corrected (following an observation from Zak Seidov) by _M. F. Hasler_, Dec 19 2018
%o A123322 (PARI) is(n) = my(f = factor(n)); omega(f) == 8 && bigomega(f) == 8 \\ _David A. Corneth_, Dec 18 2018
%o A123322 (Python)
%o A123322 from math import isqrt, prod
%o A123322 from sympy import primerange, integer_nthroot, primepi
%o A123322 def A123322(n):
%o A123322     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)))
%o A123322     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,8)))
%o A123322     def bisection(f,kmin=0,kmax=1):
%o A123322         while f(kmax) > kmax: kmax <<= 1
%o A123322         while kmax-kmin > 1:
%o A123322             kmid = kmax+kmin>>1
%o A123322             if f(kmid) <= kmid:
%o A123322                 kmax = kmid
%o A123322             else:
%o A123322                 kmin = kmid
%o A123322         return kmax
%o A123322     return bisection(f) # _Chai Wah Wu_, Aug 31 2024
%Y A123322 Cf. A001221, A001222, A005117, A046310, A048692, Squarefree k-almost primes: A000040 (k=1), A006881 (k=2), A007304 (k=3), A046386 (k=4), A046387 (k=5), A067885 (k=6), A123321 (k=7), A115343 (k=9).
%K A123322 nonn
%O A123322 1,1
%A A123322 _Rick L. Shepherd_, Sep 25 2006
%E A123322 Edited by _Robert Israel_, Dec 18 2018