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.

Showing 1-9 of 9 results.

A014612 Numbers that are the product of exactly three (not necessarily distinct) primes.

Original entry on oeis.org

8, 12, 18, 20, 27, 28, 30, 42, 44, 45, 50, 52, 63, 66, 68, 70, 75, 76, 78, 92, 98, 99, 102, 105, 110, 114, 116, 117, 124, 125, 130, 138, 147, 148, 153, 154, 164, 165, 170, 171, 172, 174, 175, 182, 186, 188, 190, 195, 207, 212, 222, 230, 231, 236, 238, 242, 244
Offset: 1

Views

Author

Keywords

Comments

Sometimes called "triprimes" or "3-almost primes".
See also A001358 for product of two primes (sometimes called semiprimes).
If you graph a(n)/n for n up to 10000 (and probably quite a bit higher), it appears to be converging to something near 3.9. In fact the limit is infinite. - Franklin T. Adams-Watters, Sep 20 2006
Meng shows that for any sufficiently large odd integer n, the equation n = a + b + c has solutions where each of a, b, c is 3-almost prime. The number of such solutions is (log log n)^6/(16 (log n)^3)*n^2*s(n)*(1 + O(1/log log n)), where s(n) = Sum_{q >= 1} Sum_{a = 1..q, (a, q) = 1} exp(i*2*Pi*n*a/q)*mu(n)/phi(n)^3 > 1/2. - Jonathan Vos Post, Sep 16 2005, corrected & rewritten by M. F. Hasler, Apr 24 2019
Also, a(n) are the numbers such that exactly half of their divisors are composite. For the numbers in which exactly half of the divisors are prime, see A167171. - Ivan Neretin, Jan 12 2016

Examples

			From _Gus Wiseman_, Nov 04 2020: (Start)
Also Heinz numbers of integer partitions into three parts, counted by A001399(n-3) = A069905(n) with ordered version A000217, where the Heinz number of an integer partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k). The sequence of terms together with their prime indices begins:
      8: {1,1,1}     70: {1,3,4}     130: {1,3,6}
     12: {1,1,2}     75: {2,3,3}     138: {1,2,9}
     18: {1,2,2}     76: {1,1,8}     147: {2,4,4}
     20: {1,1,3}     78: {1,2,6}     148: {1,1,12}
     27: {2,2,2}     92: {1,1,9}     153: {2,2,7}
     28: {1,1,4}     98: {1,4,4}     154: {1,4,5}
     30: {1,2,3}     99: {2,2,5}     164: {1,1,13}
     42: {1,2,4}    102: {1,2,7}     165: {2,3,5}
     44: {1,1,5}    105: {2,3,4}     170: {1,3,7}
     45: {2,2,3}    110: {1,3,5}     171: {2,2,8}
     50: {1,3,3}    114: {1,2,8}     172: {1,1,14}
     52: {1,1,6}    116: {1,1,10}    174: {1,2,10}
     63: {2,2,4}    117: {2,2,6}     175: {3,3,4}
     66: {1,2,5}    124: {1,1,11}    182: {1,4,6}
     68: {1,1,7}    125: {3,3,3}     186: {1,2,11}
(End)
		

References

  • Edmund Landau, Handbuch der Lehre von der Verteilung der Primzahlen, Vol. 1, Teubner, Leipzig; third edition : Chelsea, New York (1974). See p. 211.

Crossrefs

Cf. A000040, A001358 (biprimes), A014613 (quadruprimes), A033942, A086062, A098238, A123072, A123073, A101605 (characteristic function).
Cf. A109251 (number of 3-almost primes <= 10^n).
Subsequence of A145784. - Reinhard Zumkeller, Oct 19 2008
Cf. A007304 is the squarefree case.
Sequences listing r-almost primes, that is, the n such that A001222(n) = r: A000040 (r = 1), A001358 (r = 2), this sequence (r = 3), A014613 (r = 4), A014614 (r = 5), A046306 (r = 6), A046308 (r = 7), A046310 (r = 8), A046312 (r = 9), A046314 (r = 10), A069272 (r = 11), A069273 (r = 12), A069274 (r = 13), A069275 (r = 14), A069276 (r = 15), A069277 (r = 16), A069278 (r = 17), A069279 (r = 18), A069280 (r = 19), A069281 (r = 20). - Jason Kimberley, Oct 02 2011
Cf. A253721 (final digits).
A014311 is a different ranking of ordered triples, with strict case A337453.
A046316 is the restriction to odds, with strict case A307534.
A075818 is the restriction to evens, with strict case A075819.
A285508 is the nonsquarefree case.
A001399(n-3) = A069905(n) = A211540(n+2) counts 3-part partitions.

Programs

  • Haskell
    a014612 n = a014612_list !! (n-1)
    a014612_list = filter ((== 3) . a001222) [1..] -- Reinhard Zumkeller, Apr 02 2012
    
  • Maple
    with(numtheory); A014612:=n->`if`(bigomega(n)=3, n, NULL); seq(A014612(n), n=1..250) # Wesley Ivan Hurt, Feb 05 2014
  • Mathematica
    threeAlmostPrimeQ[n_] := Plus @@ Last /@ FactorInteger@n == 3; Select[ Range@244, threeAlmostPrimeQ[ # ] &] (* Robert G. Wilson v, Jan 04 2006 *)
    NextkAlmostPrime[n_, k_: 2, m_: 1] := Block[{c = 0, sgn = Sign[m]}, kap = n + sgn; While[c < Abs[m], While[ PrimeOmega[kap] != k, If[sgn < 0, kap--, kap++]]; If[ sgn < 0, kap--, kap++]; c++]; kap + If[sgn < 0, 1, -1]]; NestList[NextkAlmostPrime[#, 3] &, 2^3, 56] (* Robert G. Wilson v, Jan 27 2013 *)
    Select[Range[244], PrimeOmega[#] == 3 &] (* Jayanta Basu, Jul 01 2013 *)
  • PARI
    isA014612(n)=bigomega(n)==3 \\ Charles R Greathouse IV, May 07 2011
    
  • PARI
    list(lim)=my(v=List(),t);forprime(p=2,lim\4, forprime(q=2,min(lim\(2*p),p), t=p*q; forprime(r=2,min(lim\t,q),listput(v,t*r)))); vecsort(Vec(v)) \\ Charles R Greathouse IV, Jan 04 2013
    
  • Python
    from sympy import factorint
    def ok(n): f = factorint(n); return sum(f[p] for p in f) == 3
    print(list(filter(ok, range(245)))) # Michael S. Branicky, Aug 12 2021
    
  • Python
    from math import isqrt
    from sympy import primepi, primerange, integer_nthroot
    def A014612(n):
        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)) for b,m in enumerate(primerange(k,isqrt(x//k)+1),a)))
        m, k = n, f(n)
        while m != k:
            m, k = k, f(k)
        return m # Chai Wah Wu, Aug 17 2024
  • Scala
    def primeFactors(number: Int, list: List[Int] = List())
                                                          : List[Int] = {
      for (n <- 2 to number if (number % n == 0)) {
        return primeFactors(number / n, list :+ n)
      }
      list
    }
    (1 to 250).filter(primeFactors().size == 3) // _Alonso del Arte, Nov 04 2020, based on algorithm by Victor Farcic (vfarcic)
    

Formula

Product p_i^e_i with Sum e_i = 3.
a(n) ~ 2n log n / (log log n)^2 as n -> infinity [Landau, p. 211].
Tau(a(n)) = 2 * (omega(a(n)) + 1) = 2*A083399(a(n)), where tau = A000005 and omega = A001221. - Wesley Ivan Hurt, Jun 28 2013
a(n) = A078840(3,n). - R. J. Mathar, Jan 30 2019

Extensions

More terms from Patrick De Geest, Jun 15 1998

A007304 Sphenic numbers: products of 3 distinct primes.

Original entry on oeis.org

30, 42, 66, 70, 78, 102, 105, 110, 114, 130, 138, 154, 165, 170, 174, 182, 186, 190, 195, 222, 230, 231, 238, 246, 255, 258, 266, 273, 282, 285, 286, 290, 310, 318, 322, 345, 354, 357, 366, 370, 374, 385, 399, 402, 406, 410, 418, 426, 429, 430, 434, 435, 438
Offset: 1

Views

Author

Keywords

Comments

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
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
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
Also numbers n with A001222(n)=3 and A001221(n)=3. - Enrique Pérez Herrero, Jun 28 2012
n = 265550 is the smallest n with a(n) (=1279789) < A006881(n) (=1279793). - Peter Dolland, Apr 11 2020

Examples

			From _Gus Wiseman_, Nov 05 2020: (Start)
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:
     30: {1,2,3}     182: {1,4,6}     286: {1,5,6}
     42: {1,2,4}     186: {1,2,11}    290: {1,3,10}
     66: {1,2,5}     190: {1,3,8}     310: {1,3,11}
     70: {1,3,4}     195: {2,3,6}     318: {1,2,16}
     78: {1,2,6}     222: {1,2,12}    322: {1,4,9}
    102: {1,2,7}     230: {1,3,9}     345: {2,3,9}
    105: {2,3,4}     231: {2,4,5}     354: {1,2,17}
    110: {1,3,5}     238: {1,4,7}     357: {2,4,7}
    114: {1,2,8}     246: {1,2,13}    366: {1,2,18}
    130: {1,3,6}     255: {2,3,7}     370: {1,3,12}
    138: {1,2,9}     258: {1,2,14}    374: {1,5,7}
    154: {1,4,5}     266: {1,4,8}     385: {3,4,5}
    165: {2,3,5}     273: {2,4,6}     399: {2,4,8}
    170: {1,3,7}     282: {1,2,15}    402: {1,2,19}
    174: {1,2,10}    285: {2,3,8}     406: {1,4,10}
(End)
		

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • "Sphenic", The American Heritage Dictionary of the English Language, Fourth Edition, Houghton Mifflin Company, 2000.

Crossrefs

Products of exactly k distinct primes, for k = 1 to 6: A000040, A006881. A007304, A046386, A046387, A067885.
Cf. A162143 (a(n)^2).
For the following, NNS means "not necessarily strict".
A014612 is the NNS version.
A046389 is the restriction to odds (NNS: A046316).
A075819 is the restriction to evens (NNS: A075818).
A239656 gives first differences.
A285508 lists terms of A014612 that are not squarefree.
A307534 is the case where all prime indices are odd (NNS: A338471).
A337453 is a different ranking of ordered triples (NNS: A014311).
A338557 is the case where all prime indices are even (NNS: A338556).
A001399(n-6) counts strict 3-part partitions (NNS: A001399(n-3)).
A005117 lists squarefree numbers.
A008289 counts strict partitions by sum and length.
A220377 counts 3-part pairwise coprime strict partitions (NNS: A307719).

Programs

  • Haskell
    a007304 n = a007304_list !! (n-1)
    a007304_list = filter f [1..] where
    f u = p < q && q < w && a010051 w == 1 where
    p = a020639 u; v = div u p; q = a020639 v; w = div v q
    -- Reinhard Zumkeller, Mar 23 2014
    
  • Maple
    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
    A007304 := proc(n)
        option remember;
        local a;
        if n =1 then
            30;
        else
            for a from procname(n-1)+1 do
                if bigomega(a)=3 and nops(factorset(a))=3 then
                    return a;
                end if;
            end do:
        end if;
    end proc: # R. J. Mathar, Dec 06 2016
    is_a := proc(n) local P; P := NumberTheory:-PrimeFactors(n); nops(P) = 3 and n = mul(P) end:
    A007304List := upto -> select(is_a, [seq(1..upto)]):  # Peter Luschny, Apr 14 2025
  • Mathematica
    Union[Flatten[Table[Prime[n]*Prime[m]*Prime[k], {k, 20}, {n, k+1, 20}, {m, n+1, 20}]]]
    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 *)
    With[{upto=500},Sort[Select[Times@@@Subsets[Prime[Range[Ceiling[upto/6]]],{3}],#<=upto&]]] (* Harvey P. Dale, Jan 08 2015 *)
    Select[Range[100],SquareFreeQ[#]&&PrimeOmega[#]==3&] (* Gus Wiseman, Nov 05 2020 *)
  • PARI
    for(n=1,1e4,if(bigomega(n)==3 && omega(n)==3,print1(n", "))) \\ Charles R Greathouse IV, Jun 10 2011
    
  • 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
    
  • 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
    
  • Python
    from math import isqrt
    from sympy import primepi, primerange, integer_nthroot
    def A007304(n):
        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)))
        kmin, kmax = 0,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 # Chai Wah Wu, Aug 29 2024
    
  • SageMath
    def is_a(n):
        P = prime_divisors(n)
        return len(P) == 3 and prod(P) == n
    print([n for n in range(1, 439) if is_a(n)]) # Peter Luschny, Apr 14 2025

Formula

A008683(a(n)) = -1.
A000005(a(n)) = 8. - R. J. Mathar, Aug 14 2009
A002033(a(n)-1) = 13. - Juri-Stepan Gerasimov, Oct 07 2009, R. J. Mathar, Oct 14 2009
A178254(a(n)) = 36. - Reinhard Zumkeller, May 24 2010
A050326(a(n)) = 5, subsequence of A225228. - Reinhard Zumkeller, May 03 2013
a(n) ~ 2n log n/(log log n)^2. - Charles R Greathouse IV, Sep 14 2015

Extensions

More terms from Robert G. Wilson v, Jan 04 2006
Comment concerning number of divisors corrected by R. J. Mathar, Aug 14 2009

A140106 Number of noncongruent diagonals in a regular n-gon.

Original entry on oeis.org

0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 30, 30, 31, 31, 32, 32, 33, 33, 34, 34, 35, 35, 36, 36, 37
Offset: 1

Views

Author

Andrew McFarland, Jun 03 2008

Keywords

Comments

Number of double-stars (diameter 3 trees) with n nodes. For n >= 3, number of partitions of n-2 into two parts. - Washington Bomfim, Feb 12 2011
Number of roots of the n-th Bernoulli polynomial in the left half-plane. - Michel Lagneau, Nov 08 2012
From Gus Wiseman, Oct 17 2020: (Start)
Also the number of 3-part non-strict integer partitions of n - 1. The Heinz numbers of these partitions are given by A285508. The version for partitions of any length is A047967, with Heinz numbers A013929. The a(4) = 1 through a(15) = 6 partitions are (A = 10, B = 11, C = 12):
111 211 221 222 322 332 333 433 443 444 544 554
311 411 331 422 441 442 533 552 553 644
511 611 522 622 551 633 661 662
711 811 722 822 733 833
911 A11 922 A22
B11 C11
(End)

Examples

			The square (n=4) has two congruent diagonals; so a(4)=1. The regular pentagon also has congruent diagonals; so a(5)=1. Among all the diagonals in a regular hexagon, there are two noncongruent ones; hence a(6)=2, etc.
		

Crossrefs

A001399(n-3) = A069905(n) = A211540(n+2) counts 3-part partitions.
Essentially the same as A004526.

Programs

  • Magma
    A140106:= func< n | n eq 1 select 0 else Floor((n-2)/2) >;
    [A140106(n): n in [1..80]]; // G. C. Greubel, Feb 10 2023
    
  • Maple
    with(numtheory): for n from 1 to 80 do:it:=0:
    y:=[fsolve(bernoulli(n,x) , x, complex)] : for m from 1 to nops(y) do : if Re(y[m])<0 then it:=it+1:else fi:od: printf(`%d, `,it):od:
  • Mathematica
    a[1]=0; a[n_?OddQ] := (n-3)/2; a[n_] := n/2-1; Array[a, 100] (* Jean-François Alcover, Nov 17 2015 *)
  • PARI
    a(n)=if(n>1,n\2-1,0) \\ Charles R Greathouse IV, Oct 16 2015
    
  • Python
    def A140106(n): return n-2>>1 if n>1 else 0 # Chai Wah Wu, Sep 18 2023
  • SageMath
    def A140106(n): return 0 if (n==1) else (n-2)//2
    [A140106(n) for n in range(1,81)] # G. C. Greubel, Feb 10 2023
    

Formula

a(n) = floor((n-2)/2), for n > 1, otherwise 0. - Washington Bomfim, Feb 12 2011
G.f.: x^4/(1-x-x^2+x^3). - Colin Barker, Jan 31 2012
a(n) = floor(A129194(n-1)/A022998(n)), for n > 1. - Paul Curtz, Jul 23 2017
a(n) = A001399(n-3) - A001399(n-6). Compare to A007997(n) = A001399(n-3) + A001399(n-6). - Gus Wiseman, Oct 17 2020

Extensions

More terms from Joseph Myers, Sep 05 2009

A082293 Numbers having exactly one square divisor > 1.

Original entry on oeis.org

4, 8, 9, 12, 18, 20, 24, 25, 27, 28, 40, 44, 45, 49, 50, 52, 54, 56, 60, 63, 68, 75, 76, 84, 88, 90, 92, 98, 99, 104, 116, 117, 120, 121, 124, 125, 126, 132, 135, 136, 140, 147, 148, 150, 152, 153, 156, 164, 168, 169, 171, 172, 175, 184, 188, 189, 198, 204, 207, 212
Offset: 1

Views

Author

Reinhard Zumkeller, Apr 08 2003

Keywords

Comments

Numbers of the form m*p^2, p prime and m squarefree (A005117). [Corrected by Peter Munn, Nov 17 2020]
The asymptotic density of this sequence is (6/Pi^2)*Sum_{n>=1} 1/prime(n)^2 = 0.274933... (A222056). - Amiram Eldar, Jul 07 2020

Crossrefs

Complement of A048111 within A013929.
Subsequence of A252849.
Disjoint union of A048109 and A060687.
A285508 is a subsequence.

Programs

  • Mathematica
    Select[Range[2, 200], MemberQ[{2, 3}, (e = Sort[FactorInteger[#][[;; , 2]]])[[-1]]] && (Length[e] == 1 || e[[-2]] == 1) &] (* Amiram Eldar, Jul 07 2020 *)
  • PARI
    is(n)=my(f=vecsort(factor(n)[,2],,4)); #f && f[1]>1 && f[1]<4 && (#f==1 || f[2]==1) \\ Charles R Greathouse IV, Oct 16 2015
    
  • Python
    from math import isqrt
    from sympy import mobius, primerange
    def A082293(n):
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            kmin = kmax >> 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        def g(x): return sum(mobius(k)*(x//k**2) for k in range(1, isqrt(x)+1))
        def f(x): return int(n+x-sum(g(x//p**2) for p in primerange(isqrt(x)+1)))
        return bisection(f,n,n) # Chai Wah Wu, Feb 24 2025

Formula

A046951(a(n)) = 2.

A338556 Products of three prime numbers of even index.

Original entry on oeis.org

27, 63, 117, 147, 171, 261, 273, 333, 343, 387, 399, 477, 507, 549, 609, 637, 639, 711, 741, 777, 801, 903, 909, 931, 963, 1017, 1083, 1113, 1131, 1179, 1183, 1251, 1281, 1359, 1421, 1443, 1467, 1491, 1557, 1629, 1653, 1659, 1677, 1729, 1737, 1791, 1813, 1869
Offset: 1

Views

Author

Gus Wiseman, Nov 08 2020

Keywords

Comments

All terms are odd.
Also Heinz numbers of integer partitions with 3 parts, all of which are even. These partitions are counted by A001399.

Examples

			The sequence of terms together with their prime indices begins:
      27: {2,2,2}      637: {4,4,6}     1183: {4,6,6}
      63: {2,2,4}      639: {2,2,20}    1251: {2,2,34}
     117: {2,2,6}      711: {2,2,22}    1281: {2,4,18}
     147: {2,4,4}      741: {2,6,8}     1359: {2,2,36}
     171: {2,2,8}      777: {2,4,12}    1421: {4,4,10}
     261: {2,2,10}     801: {2,2,24}    1443: {2,6,12}
     273: {2,4,6}      903: {2,4,14}    1467: {2,2,38}
     333: {2,2,12}     909: {2,2,26}    1491: {2,4,20}
     343: {4,4,4}      931: {4,4,8}     1557: {2,2,40}
     387: {2,2,14}     963: {2,2,28}    1629: {2,2,42}
     399: {2,4,8}     1017: {2,2,30}    1653: {2,8,10}
     477: {2,2,16}    1083: {2,8,8}     1659: {2,4,22}
     507: {2,6,6}     1113: {2,4,16}    1677: {2,6,14}
     549: {2,2,18}    1131: {2,6,10}    1729: {4,6,8}
     609: {2,4,10}    1179: {2,2,32}    1737: {2,2,44}
		

Crossrefs

A014612 allows all prime indices (not just even) (strict: A007304).
A066207 allows products of any length (strict: A258117).
A338471 is the version for odds instead of evens (strict: A307534).
A338557 is the strict case.
A014311 is a ranking of ordered triples (strict: A337453).
A001399(n-3) counts 3-part partitions (strict: A001399(n-6)).
A005117 lists squarefree numbers, with even case A039956.
A008284 counts partitions by sum and length (strict: A008289).
A023023 counts 3-part relatively prime partitions (strict: A101271).
A046316 lists products of exactly three odd primes (strict: A046389).
A066208 lists numbers with all odd prime indices (strict: A258116).
A075818 lists even Heinz numbers of 3-part partitions (strict: A075819).
A307719 counts 3-part pairwise coprime partitions (strict: A220377).
A285508 lists Heinz numbers of non-strict triples.
Subsequence of A332820.

Programs

  • Mathematica
    Select[Range[1000],PrimeOmega[#]==3&&OddQ[Times@@(1+PrimePi/@First/@FactorInteger[#])]&]
  • PARI
    isok(m) = my(f=factor(m)); (bigomega(f)==3) && (#select(x->(x%2), apply(primepi, f[,1]~)) == 0); \\ Michel Marcus, Nov 10 2020
    
  • Python
    from itertools import filterfalse
    from math import isqrt
    from sympy import primepi, primerange, integer_nthroot
    def A338556(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): return int(n+x-sum((primepi(x//(k*m))>>1)-(b>>1)+1 for a,k in filterfalse(lambda x:x[0]&1,enumerate(primerange(3,integer_nthroot(x,3)[0]+1),2)) for b,m in filterfalse(lambda x:x[0]&1,enumerate(primerange(k,isqrt(x//k)+1),a))))
        return bisection(f,n,n) # Chai Wah Wu, Oct 18 2024

A338471 Products of three prime numbers of odd index.

Original entry on oeis.org

8, 20, 44, 50, 68, 92, 110, 124, 125, 164, 170, 188, 230, 236, 242, 268, 275, 292, 310, 332, 374, 388, 410, 412, 425, 436, 470, 506, 508, 548, 575, 578, 590, 596, 605, 628, 668, 670, 682, 716, 730, 764, 775, 782, 788, 830, 844, 902, 908, 932, 935, 964, 970
Offset: 1

Views

Author

Gus Wiseman, Nov 08 2020

Keywords

Comments

Also Heinz numbers of integer partitions with 3 parts, all of which are odd. These partitions are counted by A001399.

Examples

			The sequence of terms together with their prime indices begins:
       8: {1,1,1}      268: {1,1,19}     575: {3,3,9}
      20: {1,1,3}      275: {3,3,5}      578: {1,7,7}
      44: {1,1,5}      292: {1,1,21}     590: {1,3,17}
      50: {1,3,3}      310: {1,3,11}     596: {1,1,35}
      68: {1,1,7}      332: {1,1,23}     605: {3,5,5}
      92: {1,1,9}      374: {1,5,7}      628: {1,1,37}
     110: {1,3,5}      388: {1,1,25}     668: {1,1,39}
     124: {1,1,11}     410: {1,3,13}     670: {1,3,19}
     125: {3,3,3}      412: {1,1,27}     682: {1,5,11}
     164: {1,1,13}     425: {3,3,7}      716: {1,1,41}
     170: {1,3,7}      436: {1,1,29}     730: {1,3,21}
     188: {1,1,15}     470: {1,3,15}     764: {1,1,43}
     230: {1,3,9}      506: {1,5,9}      775: {3,3,11}
     236: {1,1,17}     508: {1,1,31}     782: {1,7,9}
     242: {1,5,5}      548: {1,1,33}     788: {1,1,45}
		

Crossrefs

A066208 allows products of any length (strict: A258116).
A307534 is the squarefree case.
A338469 is the restriction to odds.
A338556 is the version for evens (strict: A338557).
A000009 counts partitions into odd parts (strict: A000700).
A001399(n-3) counts 3-part partitions (strict: A001399(n-6)).
A008284 counts partitions by sum and length.
A014311 is a ranking of ordered triples (strict: A337453).
A014612 lists Heinz numbers of all triples (strict: A007304).
A023023 counts 3-part relatively prime partitions (strict: A101271).
A023023 counts 3-part relatively prime partitions (strict: A078374).
A046316 lists products of exactly three odd primes (strict: A046389).
A066207 lists numbers with all even prime indices (strict: A258117).
A075818 lists even Heinz numbers of 3-part partitions (strict: A075819).
A285508 lists Heinz numbers of non-strict triples.
A307719 counts 3-part pairwise coprime partitions (strict: A220377).
Subsequence of A332820.

Programs

  • Maple
    N:= 1000: # for terms <= N
    R:= NULL:
    for i from 1 by 2 do
      p:= ithprime(i);
      if p^3 >= N then break fi;
      for j from i by 2 do
        q:= ithprime(j);
        if p*q^2 >= N then break fi;
        for k from j by 2 do
          x:= p*q*ithprime(k);
          if x > N then break fi;
          R:= R,x;
    od od od:
    sort([R]); # Robert Israel, Jun 11 2025
  • Mathematica
    Select[Range[100],PrimeOmega[#]==3&&OddQ[Times@@PrimePi/@First/@FactorInteger[#]]&]
  • PARI
    isok(m) = my(f=factor(m)); (bigomega(f)==3) && (#select(x->!(x%2), apply(primepi, f[,1]~)) == 0); \\ Michel Marcus, Nov 10 2020
    
  • Python
    from sympy import primerange
    from itertools import combinations_with_replacement as mc
    def aupto(limit):
        pois = [p for i, p in enumerate(primerange(2, limit//4+1)) if i%2 == 0]
        return sorted(set(a*b*c for a, b, c in mc(pois, 3) if a*b*c <= limit))
    print(aupto(971)) # Michael S. Branicky, Aug 20 2021
    
  • Python
    from math import isqrt
    from sympy import primepi, primerange, integer_nthroot
    def A338471(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): return int(n+x-sum((primepi(x//(k*m))+1>>1)-(b+1>>1)+1 for a,k in filter(lambda x:x[0]&1,enumerate(primerange(integer_nthroot(x,3)[0]+1),1)) for b,m in filter(lambda x:x[0]&1,enumerate(primerange(k,isqrt(x//k)+1),a))))
        return bisection(f,n,n) # Chai Wah Wu, Oct 18 2024

A338557 Products of three distinct prime numbers of even index.

Original entry on oeis.org

273, 399, 609, 741, 777, 903, 1113, 1131, 1281, 1443, 1491, 1653, 1659, 1677, 1729, 1869, 2067, 2109, 2121, 2247, 2373, 2379, 2451, 2639, 2751, 2769, 2919, 3021, 3081, 3171, 3219, 3367, 3423, 3471, 3477, 3633, 3741, 3801, 3857, 3913, 3939, 4047, 4053, 4173
Offset: 1

Views

Author

Gus Wiseman, Nov 08 2020

Keywords

Comments

All terms are odd.
Also sphenic numbers (A007304) with all even prime indices (A031215).
Also Heinz numbers of strict integer partitions with 3 parts, all of which are even. These partitions are counted by A001399.

Examples

			The sequence of terms together with their prime indices begins:
     273: {2,4,6}     1869: {2,4,24}    3219: {2,10,12}
     399: {2,4,8}     2067: {2,6,16}    3367: {4,6,12}
     609: {2,4,10}    2109: {2,8,12}    3423: {2,4,38}
     741: {2,6,8}     2121: {2,4,26}    3471: {2,6,24}
     777: {2,4,12}    2247: {2,4,28}    3477: {2,8,18}
     903: {2,4,14}    2373: {2,4,30}    3633: {2,4,40}
    1113: {2,4,16}    2379: {2,6,18}    3741: {2,10,14}
    1131: {2,6,10}    2451: {2,8,14}    3801: {2,4,42}
    1281: {2,4,18}    2639: {4,6,10}    3857: {4,8,10}
    1443: {2,6,12}    2751: {2,4,32}    3913: {4,6,14}
    1491: {2,4,20}    2769: {2,6,20}    3939: {2,6,26}
    1653: {2,8,10}    2919: {2,4,34}    4047: {2,8,20}
    1659: {2,4,22}    3021: {2,8,16}    4053: {2,4,44}
    1677: {2,6,14}    3081: {2,6,22}    4173: {2,6,28}
    1729: {4,6,8}     3171: {2,4,36}    4179: {2,4,46}
		

Crossrefs

For the following, NNS means "not necessarily strict".
A007304 allows all prime indices (not just even) (NNS: A014612).
A046389 allows all odd primes (NNS: A046316).
A258117 allows products of any length (NNS: A066207).
A307534 is the version for odds instead of evens (NNS: A338471).
A337453 is a different ranking of ordered triples (NNS: A014311).
A338556 is the NNS version.
A001399(n-6) counts strict 3-part partitions (NNS: A001399(n-3)).
A005117 lists squarefree numbers, with even case A039956.
A078374 counts 3-part relatively prime strict partitions (NNS: A023023).
A075819 lists even Heinz numbers of strict triples (NNS: A075818).
A220377 counts 3-part pairwise coprime strict partitions (NNS: A307719).
A258116 lists squarefree numbers with all odd prime indices (NNS: A066208).
A285508 lists Heinz numbers of non-strict triples.

Programs

  • Mathematica
    Select[Range[1000],SquareFreeQ[#]&&PrimeOmega[#]==3&&OddQ[Times@@(1+PrimePi/@First/@FactorInteger[#])]&]
  • PARI
    isok(m) = my(f=factor(m)); (bigomega(f)==3) && (omega(f)==3) && (#select(x->(x%2), apply(primepi, f[,1]~)) == 0); \\ Michel Marcus, Nov 10 2020
    
  • Python
    from itertools import filterfalse
    from math import isqrt
    from sympy import primepi, primerange, nextprime, integer_nthroot
    def A338557(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): return int(n+x-sum((primepi(x//(k*m))>>1)-(b>>1) for a,k in filterfalse(lambda x:x[0]&1,enumerate(primerange(3,integer_nthroot(x,3)[0]+1),2)) for b,m in filterfalse(lambda x:x[0]&1,enumerate(primerange(nextprime(k)+1,isqrt(x//k)+1),a+2))))
        return bisection(f,n,n) # Chai Wah Wu, Oct 18 2024

A321773 Number of compositions of n into parts with distinct multiplicities and with exactly three parts.

Original entry on oeis.org

1, 3, 6, 4, 9, 9, 10, 12, 15, 13, 18, 18, 19, 21, 24, 22, 27, 27, 28, 30, 33, 31, 36, 36, 37, 39, 42, 40, 45, 45, 46, 48, 51, 49, 54, 54, 55, 57, 60, 58, 63, 63, 64, 66, 69, 67, 72, 72, 73, 75, 78, 76, 81, 81, 82, 84, 87, 85, 90, 90, 91, 93, 96, 94, 99, 99
Offset: 3

Views

Author

Alois P. Heinz, Nov 18 2018

Keywords

Examples

			From _Gus Wiseman_, Nov 11 2020: (Start)
Also the number of 3-part non-strict compositions of n. For example, the a(3) = 1 through a(11) = 15 triples are:
  111   112   113   114   115   116   117   118   119
        121   122   141   133   161   144   181   155
        211   131   222   151   224   171   226   191
              212   411   223   233   225   244   227
              221         232   242   252   262   272
              311         313   323   333   334   335
                          322   332   414   343   344
                          331   422   441   424   353
                          511   611   522   433   434
                                      711   442   443
                                            622   515
                                            811   533
                                                  551
                                                  722
                                                  911
(End)
		

Crossrefs

Column k=3 of A242887.
A235451 counts 3-part compositions with distinct run-lengths
A001399(n-6) counts 3-part compositions in the complement.
A014311 intersected with A335488 ranks these compositions.
A140106 is the unordered case, with Heinz numbers A285508.
A261982 counts non-strict compositions of any length.
A001523 counts unimodal compositions, with complement A115981.
A007318 and A097805 count compositions by length.
A032020 counts strict compositions.
A047967 counts non-strict partitions, with Heinz numbers A013929.
A242771 counts triples that are not strictly increasing.

Programs

  • Mathematica
    Table[Length[Join@@Permutations/@Select[IntegerPartitions[n,{3}],!UnsameQ@@#&]],{n,0,100}] (* Gus Wiseman, Nov 11 2020 *)

Formula

Conjectures from Colin Barker, Dec 11 2018: (Start)
G.f.: x^3*(1 + 3*x + 5*x^2) / ((1 - x)^2*(1 + x)*(1 + x + x^2)).
a(n) = a(n-2) + a(n-3) - a(n-5) for n>7. (End)
Conjecture: a(n) = (3*n-k)/2 where k value has a cycle of 6 starting from n=3 of (7,6,3,10,3,6). - Bill McEachen, Aug 12 2025

A338469 Products of three odd prime numbers of odd index.

Original entry on oeis.org

125, 275, 425, 575, 605, 775, 935, 1025, 1175, 1265, 1331, 1445, 1475, 1675, 1705, 1825, 1955, 2057, 2075, 2255, 2425, 2575, 2585, 2635, 2645, 2725, 2783, 3175, 3179, 3245, 3425, 3485, 3565, 3685, 3725, 3751, 3925, 3995, 4015, 4175, 4301, 4475, 4565, 4715
Offset: 1

Views

Author

Gus Wiseman, Nov 08 2020

Keywords

Comments

Also Heinz numbers of integer partitions with 3 parts, all of which are odd and > 1. These partitions are counted by A001399.

Examples

			The sequence of terms together with their prime indices begins:
     125: {3,3,3}     1825: {3,3,21}    3425: {3,3,33}
     275: {3,3,5}     1955: {3,7,9}     3485: {3,7,13}
     425: {3,3,7}     2057: {5,5,7}     3565: {3,9,11}
     575: {3,3,9}     2075: {3,3,23}    3685: {3,5,19}
     605: {3,5,5}     2255: {3,5,13}    3725: {3,3,35}
     775: {3,3,11}    2425: {3,3,25}    3751: {5,5,11}
     935: {3,5,7}     2575: {3,3,27}    3925: {3,3,37}
    1025: {3,3,13}    2585: {3,5,15}    3995: {3,7,15}
    1175: {3,3,15}    2635: {3,7,11}    4015: {3,5,21}
    1265: {3,5,9}     2645: {3,9,9}     4175: {3,3,39}
    1331: {5,5,5}     2725: {3,3,29}    4301: {5,7,9}
    1445: {3,7,7}     2783: {5,5,9}     4475: {3,3,41}
    1475: {3,3,17}    3175: {3,3,31}    4565: {3,5,23}
    1675: {3,3,19}    3179: {5,7,7}     4715: {3,9,13}
    1705: {3,5,11}    3245: {3,5,17}    4775: {3,3,43}
		

Crossrefs

A046316 allows all primes (strict: A046389).
A338471 allows all odd primes (strict: A307534).
A338556 is the version for evens (strict: A338557).
A000009 counts partitions into odd parts (strict: A000700).
A001399(n-3) counts 3-part partitions (strict: A001399(n-6)).
A005408 lists odds (strict: A056911).
A008284 counts partitions by sum and length.
A014311 is a ranking of 3-part compositions (strict: A337453).
A014612 lists Heinz numbers of 3-part partitions (strict: A007304).
A023023 counts 3-part relatively prime partitions (strict: A101271).
A066207 lists numbers with all even prime indices (strict: A258117).
A066208 lists numbers with all odd prime indices (strict: A258116).
A075818 lists even Heinz numbers of 3-part partitions (strict: A075819).
A285508 lists Heinz numbers of non-strict 3-part partitions.

Programs

  • Maple
    N:= 10000: # for terms <= N
    P0:= [seq(ithprime(i),i=3..numtheory:-pi(floor(N/25)),2)]:
    sort(select(`<=`,[seq(seq(seq(P0[i]*P0[j]*P0[k],k=1..j),j=1..i),i=1..nops(P0))], N)); # Robert Israel, Nov 12 2020
  • Mathematica
    Select[Range[1,1000,2],PrimeOmega[#]==3&&OddQ[Times@@PrimePi/@First/@FactorInteger[#]]&]
  • PARI
    isok(m) = my(f=factor(m)); (m%2) && (bigomega(f)==3) && (#select(x->!(x%2), apply(primepi, f[,1]~)) == 0); \\ Michel Marcus, Nov 10 2020
    
  • Python
    from math import isqrt
    from sympy import primepi, primerange, integer_nthroot
    def A338469(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): return int(n+x-sum((primepi(x//(k*m))+1>>1)-(b+1>>1)+1 for a,k in filter(lambda x:x[0]&1,enumerate(primerange(5,integer_nthroot(x,3)[0]+1),3)) for b,m in filter(lambda x:x[0]&1,enumerate(primerange(k,isqrt(x//k)+1),a))))
        return bisection(f,n,n) # Chai Wah Wu, Oct 18 2024
Showing 1-9 of 9 results.