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.

A007304 Sphenic numbers: products of 3 distinct primes.

This page as a plain text file.
%I A007304 M5207 #113 Apr 14 2025 05:39:06
%S A007304 30,42,66,70,78,102,105,110,114,130,138,154,165,170,174,182,186,190,
%T A007304 195,222,230,231,238,246,255,258,266,273,282,285,286,290,310,318,322,
%U A007304 345,354,357,366,370,374,385,399,402,406,410,418,426,429,430,434,435,438
%N A007304 Sphenic numbers: products of 3 distinct primes.
%C A007304 Note the distinctions between this and "n has exactly three prime factors" (A014612) or "n has exactly three distinct prime factors." (A033992). The word "sphenic" also means "shaped like a wedge" [American Heritage Dictionary] as in dentation with "sphenic molars." - _Jonathan Vos Post_, Sep 11 2005
%C A007304 Also the volume of a sphenic brick. A sphenic brick is a rectangular parallelepiped whose sides are components of a sphenic number, namely whose sides are three distinct primes. Example: The distinct prime triple (3,5,7) produces a 3x5x7 unit brick which has volume 105 cubic units. 3-D analog of 2-D A037074 Product of twin primes, per Cino Hilliard's comment. Compare with 3-D A107768 Golden 3-almost primes = Volumes of bricks (rectangular parallelepipeds) each of whose faces has golden semiprime area. - _Jonathan Vos Post_, Jan 08 2007
%C A007304 Sum(n>=1,  1/a(n)^s) = (1/6)*(P(s)^3 - P(3*s) - 3*(P(s)*P(2*s)-P(3*s))), where P is prime zeta function. - _Enrique Pérez Herrero_, Jun 28 2012
%C A007304 Also numbers n with A001222(n)=3 and A001221(n)=3. - _Enrique Pérez Herrero_, Jun 28 2012
%C A007304 n = 265550 is the smallest n with a(n) (=1279789) < A006881(n) (=1279793). - _Peter Dolland_, Apr 11 2020
%D A007304 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%D A007304 "Sphenic", The American Heritage Dictionary of the English Language, Fourth Edition, Houghton Mifflin Company, 2000.
%H A007304 T. D. Noe, <a href="/A007304/b007304.txt">Table of n, a(n) for n = 1..10000</a>
%H A007304 <a href="/index/Pri#prime_signature">Index to sequences related to prime signature</a>
%F A007304 A008683(a(n)) = -1.
%F A007304 A000005(a(n)) = 8. - _R. J. Mathar_, Aug 14 2009
%F A007304 A002033(a(n)-1) = 13. - _Juri-Stepan Gerasimov_, Oct 07 2009, _R. J. Mathar_, Oct 14 2009
%F A007304 A178254(a(n)) = 36. - _Reinhard Zumkeller_, May 24 2010
%F A007304 A050326(a(n)) = 5, subsequence of A225228. - _Reinhard Zumkeller_, May 03 2013
%F A007304 a(n) ~ 2n log n/(log log n)^2. - _Charles R Greathouse IV_, Sep 14 2015
%e A007304 From _Gus Wiseman_, Nov 05 2020: (Start)
%e A007304 Also Heinz numbers of strict integer partitions into three parts, where the Heinz number of a partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k). These partitions are counted by A001399(n-6) = A069905(n-3), with ordered version A001399(n-6)*6. The sequence of terms together with their prime indices begins:
%e A007304      30: {1,2,3}     182: {1,4,6}     286: {1,5,6}
%e A007304      42: {1,2,4}     186: {1,2,11}    290: {1,3,10}
%e A007304      66: {1,2,5}     190: {1,3,8}     310: {1,3,11}
%e A007304      70: {1,3,4}     195: {2,3,6}     318: {1,2,16}
%e A007304      78: {1,2,6}     222: {1,2,12}    322: {1,4,9}
%e A007304     102: {1,2,7}     230: {1,3,9}     345: {2,3,9}
%e A007304     105: {2,3,4}     231: {2,4,5}     354: {1,2,17}
%e A007304     110: {1,3,5}     238: {1,4,7}     357: {2,4,7}
%e A007304     114: {1,2,8}     246: {1,2,13}    366: {1,2,18}
%e A007304     130: {1,3,6}     255: {2,3,7}     370: {1,3,12}
%e A007304     138: {1,2,9}     258: {1,2,14}    374: {1,5,7}
%e A007304     154: {1,4,5}     266: {1,4,8}     385: {3,4,5}
%e A007304     165: {2,3,5}     273: {2,4,6}     399: {2,4,8}
%e A007304     170: {1,3,7}     282: {1,2,15}    402: {1,2,19}
%e A007304     174: {1,2,10}    285: {2,3,8}     406: {1,4,10}
%e A007304 (End)
%p A007304 with(numtheory): a:=proc(n) if bigomega(n)=3 and nops(factorset(n))=3 then n else fi end: seq(a(n),n=1..450); # _Emeric Deutsch_
%p A007304 A007304 := proc(n)
%p A007304     option remember;
%p A007304     local a;
%p A007304     if n =1 then
%p A007304         30;
%p A007304     else
%p A007304         for a from procname(n-1)+1 do
%p A007304             if bigomega(a)=3 and nops(factorset(a))=3 then
%p A007304                 return a;
%p A007304             end if;
%p A007304         end do:
%p A007304     end if;
%p A007304 end proc: # _R. J. Mathar_, Dec 06 2016
%p A007304 is_a := proc(n) local P; P := NumberTheory:-PrimeFactors(n); nops(P) = 3 and n = mul(P) end:
%p A007304 A007304List := upto -> select(is_a, [seq(1..upto)]):  # _Peter Luschny_, Apr 14 2025
%t A007304 Union[Flatten[Table[Prime[n]*Prime[m]*Prime[k], {k, 20}, {n, k+1, 20}, {m, n+1, 20}]]]
%t A007304 Take[ Sort@ Flatten@ Table[ Prime@i Prime@j Prime@k, {i, 3, 21}, {j, 2, i - 1}, {k, j - 1}], 53] (* _Robert G. Wilson v_ *)
%t A007304 With[{upto=500},Sort[Select[Times@@@Subsets[Prime[Range[Ceiling[upto/6]]],{3}],#<=upto&]]] (* _Harvey P. Dale_, Jan 08 2015 *)
%t A007304 Select[Range[100],SquareFreeQ[#]&&PrimeOmega[#]==3&] (* _Gus Wiseman_, Nov 05 2020 *)
%o A007304 (PARI) for(n=1,1e4,if(bigomega(n)==3 && omega(n)==3,print1(n", "))) \\ _Charles R Greathouse IV_, Jun 10 2011
%o A007304 (PARI) list(lim)=my(v=List(),t);forprime(p=2,(lim)^(1/3),forprime(q=p+1,sqrt(lim\p),t=p*q;forprime(r=q+1,lim\t,listput(v,t*r))));vecsort(Vec(v)) \\ _Charles R Greathouse IV_, Jul 20 2011
%o A007304 (PARI) list(lim)=my(v=List(), t); forprime(p=2, sqrtnint(lim\=1,3), forprime(q=p+1, sqrtint(lim\p), t=p*q; forprime(r=q+1, lim\t, listput(v, t*r)))); Set(v) \\ _Charles R Greathouse IV_, Jan 21 2025
%o A007304 (Haskell)
%o A007304 a007304 n = a007304_list !! (n-1)
%o A007304 a007304_list = filter f [1..] where
%o A007304 f u = p < q && q < w && a010051 w == 1 where
%o A007304 p = a020639 u; v = div u p; q = a020639 v; w = div v q
%o A007304 -- _Reinhard Zumkeller_, Mar 23 2014
%o A007304 (Python)
%o A007304 from math import isqrt
%o A007304 from sympy import primepi, primerange, integer_nthroot
%o A007304 def A007304(n):
%o A007304     def f(x): return int(n+x-sum(primepi(x//(k*m))-b for a,k in enumerate(primerange(integer_nthroot(x,3)[0]+1),1) for b,m in enumerate(primerange(k+1,isqrt(x//k)+1),a+1)))
%o A007304     kmin, kmax = 0,1
%o A007304     while f(kmax) > kmax:
%o A007304         kmax <<= 1
%o A007304     while kmax-kmin > 1:
%o A007304         kmid = kmax+kmin>>1
%o A007304         if f(kmid) <= kmid:
%o A007304             kmax = kmid
%o A007304         else:
%o A007304             kmin = kmid
%o A007304     return kmax # _Chai Wah Wu_, Aug 29 2024
%o A007304 (SageMath)
%o A007304 def is_a(n):
%o A007304     P = prime_divisors(n)
%o A007304     return len(P) == 3 and prod(P) == n
%o A007304 print([n for n in range(1, 439) if is_a(n)]) # _Peter Luschny_, Apr 14 2025
%Y A007304 Products of exactly k distinct primes, for k = 1 to 6: A000040, A006881. A007304, A046386, A046387, A067885.
%Y A007304 Cf. A002033, A010051, A020639, A037074, A046393, A061299, A067467, A071140, A096917, A096918, A096919, A100765, A103653, A107464, A107768, A179643, A179695.
%Y A007304 Cf. A162143 (a(n)^2).
%Y A007304 For the following, NNS means "not necessarily strict".
%Y A007304 A014612 is the NNS version.
%Y A007304 A046389 is the restriction to odds (NNS: A046316).
%Y A007304 A075819 is the restriction to evens (NNS: A075818).
%Y A007304 A239656 gives first differences.
%Y A007304 A285508 lists terms of A014612 that are not squarefree.
%Y A007304 A307534 is the case where all prime indices are odd (NNS: A338471).
%Y A007304 A337453 is a different ranking of ordered triples (NNS: A014311).
%Y A007304 A338557 is the case where all prime indices are even (NNS: A338556).
%Y A007304 A001399(n-6) counts strict 3-part partitions (NNS: A001399(n-3)).
%Y A007304 A005117 lists squarefree numbers.
%Y A007304 A008289 counts strict partitions by sum and length.
%Y A007304 A220377 counts 3-part pairwise coprime strict partitions (NNS: A307719).
%Y A007304 Cf. A000212, A000217, A001840, A101271, A284825, A321773, A337599, A337605.
%K A007304 nonn,easy
%O A007304 1,1
%A A007304 _Simon Plouffe_
%E A007304 More terms from _Robert G. Wilson v_, Jan 04 2006
%E A007304 Comment concerning number of divisors corrected by _R. J. Mathar_, Aug 14 2009