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

A001399 a(n) is the number of partitions of n into at most 3 parts; also partitions of n+3 in which the greatest part is 3; also number of unlabeled multigraphs with 3 nodes and n edges.

Original entry on oeis.org

1, 1, 2, 3, 4, 5, 7, 8, 10, 12, 14, 16, 19, 21, 24, 27, 30, 33, 37, 40, 44, 48, 52, 56, 61, 65, 70, 75, 80, 85, 91, 96, 102, 108, 114, 120, 127, 133, 140, 147, 154, 161, 169, 176, 184, 192, 200, 208, 217, 225, 234, 243, 252, 261, 271, 280, 290, 300, 310, 320, 331, 341
Offset: 0

Views

Author

Keywords

Comments

Also number of tripods (trees with exactly 3 leaves) on n vertices. - Eric W. Weisstein, Mar 05 2011
Also number of partitions of n+3 into exactly 3 parts; number of partitions of n in which the greatest part is less than or equal to 3; and the number of nonnegative solutions to b + 2c + 3d = n.
Also a(n) gives number of partitions of n+6 into 3 distinct parts and number of partitions of 2n+9 into 3 distinct and odd parts, e.g., 15 = 11 + 3 + 1 = 9 + 5 + 1 = 7 + 5 + 3. - Jon Perry, Jan 07 2004
Also bracelets with n+3 beads 3 of which are red (so there are 2 possibilities with 5 beads).
More generally, the number of partitions of n into at most k parts is also the number of partitions of n+k into k positive parts, the number of partitions of n+k in which the greatest part is k, the number of partitions of n in which the greatest part is less than or equal to k, the number of partitions of n+k(k+1)/2 into exactly k distinct positive parts, the number of nonnegative solutions to b + 2c + 3d + ... + kz = n and the number of nonnegative solutions to 2c + 3d + ... + kz <= n. - Henry Bottomley, Apr 17 2001
Also coefficient of q^n in the expansion of (m choose 3)_q as m goes to infinity. - Y. Kelly Itakura (yitkr(AT)mta.ca), Aug 21 2002
From Winston C. Yang (winston(AT)cs.wisc.edu), Apr 30 2002: (Start)
Write 1,2,3,4,... in a hexagonal spiral around 0, then a(n) for n > 0 is formed by the folding points (including the initial 1). The spiral begins:
.
85--84--83--82--81--80
/ \
86 56--55--54--53--52 79
/ / \ \
87 57 33--32--31--30 51 78
/ / / \ \ \
88 58 34 16--15--14 29 50 77
/ / / / \ \ \ \
89 59 35 17 5---4 13 28 49 76
/ / / / / \ \ \ \ \
90 60 36 18 6 0 3 12 27 48 75
/ / / / / / / / / / /
91 61 37 19 7 1---2 11 26 47 74
\ \ \ \ / / / /
62 38 20 8---9--10 25 46 73
\ \ \ / / /
63 39 21--22--23--24 45 72
\ \ / /
64 40--41--42--43--44 71
\ /
65--66--67--68--69--70
.
a(p) is maximal number of hexagons in a polyhex with perimeter at most 2p + 6. (End)
a(n-3) is the number of partitions of n into 3 distinct parts, where 0 is allowed as a part. E.g., at n=9, we can write 8+1+0, 7+2+0, 6+3+0, 4+5+0, 1+2+6, 1+3+5 and 2+3+4, which is a(6)=7. - Jon Perry, Jul 08 2003
a(n) gives number of partitions of n+6 into parts <=3 where each part is used at least once (subtract 6=1+2+3 from n). - Jon Perry, Jul 03 2004
This is also the number of partitions of n+3 into exactly 3 parts (there is a 1-to-1 correspondence between the number of partitions of n+3 in which the greatest part is 3 and the number of partitions of n+3 into exactly three parts). - Graeme McRae, Feb 07 2005
Apply the Riordan array (1/(1-x^3),x) to floor((n+2)/2). - Paul Barry, Apr 16 2005
Also, number of triangles that can be created with odd perimeter 3,5,7,9,11,... with all sides whole numbers. Note that triangles with even perimeter can be generated from the odd ones by increasing each side by 1. E.g., a(1) = 1 because perimeter 3 can make {1,1,1} 1 triangle. a(4) = 3 because perimeter 9 can make {1,4,4} {2,3,4} {3,3,3} 3 possible triangles. - Bruce Love (bruce_love(AT)ofs.edu.sg), Nov 20 2006
Also number of nonnegative solutions of the Diophantine equation x+2*y+3*z=n, cf. Pólya/Szegő reference.
From Vladimir Shevelev, Apr 23 2011: (Start)
Also a(n-3), n >= 3, is the number of non-equivalent necklaces of 3 beads each of them painted by one of n colors.
The sequence {a(n-3), n >= 3} solves the so-called Reis problem about convex k-gons in case k=3 (see our comment to A032279).
a(n-3) (n >= 3) is an essentially unimprovable upper estimate for the number of distinct values of the permanent in (0,1)-circulants of order n with three 1's in every row. (End)
A001399(n) is the number of 3-tuples (w,x,y) having all terms in {0,...,n} and w = 2*x+3*y. - Clark Kimberling, Jun 04 2012
Also, for n >= 3, a(n-3) is the number of the distinct triangles in an n-gon, see the Ngaokrajang links. - Kival Ngaokrajang, Mar 16 2013
Also, a(n) is the total number of 5-curve coin patterns (5C4S type: 5 curves covering full 4 coins and symmetry) packing into fountain of coins base (n+3). See illustration in links. - Kival Ngaokrajang, Oct 16 2013
Also a(n) = half the number of minimal zero sequences for Z_n of length 3 [Ponomarenko]. - N. J. A. Sloane, Feb 25 2014
Also, a(n) equals the number of linearly-independent terms at 2n-th order in the power series expansion of an Octahedral Rotational Energy Surface (cf. Harter & Patterson). - Bradley Klee, Jul 31 2015
Also Molien series for invariants of finite Coxeter groups D_3 and A_3. - N. J. A. Sloane, Jan 10 2016
Number of different distributions of n+6 identical balls in 3 boxes as x,y,z where 0 < x < y < z. - Ece Uslu and Esin Becenen, Jan 11 2016
a(n) is also the number of partitions of 2*n with <= n parts and no part >= 4. The bijection to partitions of n with no part >= 4 is: 1 <-> 2, 2 <-> 1 + 3, 3 <-> 3 + 3 (observing the order of these rules). The <- direction uses the following fact for partitions of 2*n with <= n parts and no part >=4: for each part 1 there is a part 3, and an even number (including 0) of remaining parts 3. - Wolfdieter Lang, May 21 2019
List of the terms in A000567(n>=1), A049450(n>=1), A033428(n>=1), A049451(n>=1), A045944(n>=1), and A003215(n) in nondecreasing order. List of the numbers A056105(n)-1, A056106(n)-1, A056107(n)-1, A056108(n)-1, A056109(n)-1, and A003215(m) with n >= 1 and m >= 0 in nondecreasing order. Numbers of the forms 3n*(n-1)+1, n*(3n-2), n*(3n-1), 3n^2, n*(3n+1), n*(3n+2) with n >= 1 listed in nondecreasing order. Integers m such that lattice points from 1 through m on a hexagonal spiral starting at 1 forms a convex polygon. - Ya-Ping Lu, Jan 24 2024

Examples

			G.f. = 1 + x + 2*x^2 + 3*x^3 + 4*x^4 + 5*x^5 + 7*x^6 + 8*x^7 + 10*x^8 + 12*x^9 + ...
Recall that in a necklace the adjacent beads have distinct colors. Suppose we have n colors with labels 1,...,n. Two colorings of the beads are equivalent if the cyclic sequences of the distances modulo n between labels of adjacent colors have the same period. If n=4, all colorings are equivalent. E.g., for the colorings {1,2,3} and {1,2,4} we have the same period {1,1,2} of distances modulo 4. So, a(n-3)=a(1)=1. If n=5, then we have two such periods {1,1,3} and {1,2,2} modulo 5. Thus a(2)=2. - _Vladimir Shevelev_, Apr 23 2011
a(0) = 1, i.e., {1,2,3} Number of different distributions of 6 identical balls to 3 boxes as x,y and z where 0 < x < y < z. - _Ece Uslu_, Esin Becenen, Jan 11 2016
a(3) = 3, i.e., {1,2,6}, {1,3,5}, {2,3,4} Number of different distributions of 9 identical balls in 3 boxes as x,y and z where 0 < x < y < z. - _Ece Uslu_, Esin Becenen, Jan 11 2016
From _Gus Wiseman_, Apr 15 2019: (Start)
The a(0) = 1 through a(8) = 10 integer partitions of n with at most three parts are the following. The Heinz numbers of these partitions are given by A037144.
  ()  (1)  (2)   (3)    (4)    (5)    (6)    (7)    (8)
           (11)  (21)   (22)   (32)   (33)   (43)   (44)
                 (111)  (31)   (41)   (42)   (52)   (53)
                        (211)  (221)  (51)   (61)   (62)
                               (311)  (222)  (322)  (71)
                                      (321)  (331)  (332)
                                      (411)  (421)  (422)
                                             (511)  (431)
                                                    (521)
                                                    (611)
The a(0) = 1 through a(7) = 8 integer partitions of n + 3 whose greatest part is 3 are the following. The Heinz numbers of these partitions are given by A080193.
  (3)  (31)  (32)   (33)    (322)    (332)     (333)      (3322)
             (311)  (321)   (331)    (3221)    (3222)     (3331)
                    (3111)  (3211)   (3311)    (3321)     (32221)
                            (31111)  (32111)   (32211)    (33211)
                                     (311111)  (33111)    (322111)
                                               (321111)   (331111)
                                               (3111111)  (3211111)
                                                          (31111111)
Non-isomorphic representatives of the a(0) = 1 through a(5) = 5 unlabeled multigraphs with 3 vertices and n edges are the following.
  {}  {12}  {12,12}  {12,12,12}  {12,12,12,12}  {12,12,12,12,12}
            {13,23}  {12,13,23}  {12,13,23,23}  {12,13,13,23,23}
                     {13,23,23}  {13,13,23,23}  {12,13,23,23,23}
                                 {13,23,23,23}  {13,13,23,23,23}
                                                {13,23,23,23,23}
The a(0) = 1 through a(8) = 10 strict integer partitions of n - 6 with three parts are the following (A = 10, B = 11). The Heinz numbers of these partitions are given by A007304.
  (321)  (421)  (431)  (432)  (532)  (542)  (543)  (643)   (653)
                (521)  (531)  (541)  (632)  (642)  (652)   (743)
                       (621)  (631)  (641)  (651)  (742)   (752)
                              (721)  (731)  (732)  (751)   (761)
                                     (821)  (741)  (832)   (842)
                                            (831)  (841)   (851)
                                            (921)  (931)   (932)
                                                   (A21)   (941)
                                                           (A31)
                                                           (B21)
The a(0) = 1 through a(8) = 10 integer partitions of n + 3 with three parts are the following. The Heinz numbers of these partitions are given by A014612.
  (111)  (211)  (221)  (222)  (322)  (332)  (333)  (433)  (443)
                (311)  (321)  (331)  (422)  (432)  (442)  (533)
                       (411)  (421)  (431)  (441)  (532)  (542)
                              (511)  (521)  (522)  (541)  (551)
                                     (611)  (531)  (622)  (632)
                                            (621)  (631)  (641)
                                            (711)  (721)  (722)
                                                   (811)  (731)
                                                          (821)
                                                          (911)
The a(0) = 1 through a(8) = 10 integer partitions of n whose greatest part is <= 3 are the following. The Heinz numbers of these partitions are given by A051037.
  ()  (1)  (2)   (3)    (22)    (32)     (33)      (322)      (332)
           (11)  (21)   (31)    (221)    (222)     (331)      (2222)
                 (111)  (211)   (311)    (321)     (2221)     (3221)
                        (1111)  (2111)   (2211)    (3211)     (3311)
                                (11111)  (3111)    (22111)    (22211)
                                         (21111)   (31111)    (32111)
                                         (111111)  (211111)   (221111)
                                                   (1111111)  (311111)
                                                              (2111111)
                                                              (11111111)
The a(0) = 1 through a(6) = 7 strict integer partitions of 2n+9 with 3 parts, all of which are odd, are the following. The Heinz numbers of these partitions are given by A307534.
  (5,3,1)  (7,3,1)  (7,5,1)  (7,5,3)   (9,5,3)   (9,7,3)   (9,7,5)
                    (9,3,1)  (9,5,1)   (9,7,1)   (11,5,3)  (11,7,3)
                             (11,3,1)  (11,5,1)  (11,7,1)  (11,9,1)
                                       (13,3,1)  (13,5,1)  (13,5,3)
                                                 (15,3,1)  (13,7,1)
                                                           (15,5,1)
                                                           (17,3,1)
The a(0) = 1 through a(8) = 10 strict integer partitions of n + 3 with 3 parts where 0 is allowed as a part (A = 10):
  (210)  (310)  (320)  (420)  (430)  (530)  (540)  (640)  (650)
                (410)  (510)  (520)  (620)  (630)  (730)  (740)
                       (321)  (610)  (710)  (720)  (820)  (830)
                              (421)  (431)  (810)  (910)  (920)
                                     (521)  (432)  (532)  (A10)
                                            (531)  (541)  (542)
                                            (621)  (631)  (632)
                                                   (721)  (641)
                                                          (731)
                                                          (821)
The a(0) = 1 through a(7) = 7 integer partitions of n + 6 whose distinct parts are 1, 2, and 3 are the following. The Heinz numbers of these partitions are given by A143207.
  (321)  (3211)  (3221)   (3321)    (32221)    (33221)     (33321)
                 (32111)  (32211)   (33211)    (322211)    (322221)
                          (321111)  (322111)   (332111)    (332211)
                                    (3211111)  (3221111)   (3222111)
                                               (32111111)  (3321111)
                                                           (32211111)
                                                           (321111111)
(End)
Partitions of 2*n with <= n parts and no part >= 4: a(3) = 3 from (2^3), (1,2,3), (3^2) mapping to (1^3), (1,2), (3), the partitions of 3 with no part >= 4, respectively. - _Wolfdieter Lang_, May 21 2019
		

References

  • R. Ayoub, An Introduction to the Analytic Theory of Numbers, Amer. Math. Soc., 1963; Chapter III, Problem 33.
  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 110, D(n); page 263, #18, P_n^{3}.
  • J. L. Gross and J. Yellen, eds., Handbook of Graph Theory, CRC Press, 2004; p. 517.
  • H. Gupta et al., Tables of Partitions. Royal Society Mathematical Tables, Vol. 4, Cambridge Univ. Press, 1958, p. 2.
  • F. Harary and E. M. Palmer, Graphical Enumeration, Academic Press, NY, 1973, p. 88, (4.1.18).
  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers. 3rd ed., Oxford Univ. Press, 1954, p. 275.
  • R. Honsberger, Mathematical Gems III, Math. Assoc. Amer., 1985, p. 39.
  • J. H. van Lint, Combinatorial Seminar Eindhoven, Lecture Notes Math., 382 (1974), see pp. 33-34.
  • G. Pólya and G. Szegő, Problems and Theorems in Analysis I (Springer 1924, reprinted 1972), Part One, Chap. 1, Sect. 1, Problem 25.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Haskell
    a001399 = p [1,2,3] where
       p _      0 = 1
       p []     _ = 0
       p ks'@(k:ks) m = if m < k then 0 else p ks' (m - k) + p ks m
    -- Reinhard Zumkeller, Feb 28 2013
    
  • Magma
    I:=[1,1,2,3,4,5]; [n le 6 select I[n] else Self(n-1)+Self(n-2)-Self(n-4)-Self(n-5)+Self(n-6): n in [1..80]]; // Vincenzo Librandi, Feb 14 2015
    
  • Magma
    [#RestrictedPartitions(n,{1,2,3}): n in [0..62]]; // Marius A. Burtea, Jan 06 2019
    
  • Magma
    [Round((n+3)^2/12): n in [0..70]]; // Marius A. Burtea, Jan 06 2019
    
  • Maple
    A001399 := proc(n)
        round( (n+3)^2/12) ;
    end proc:
    seq(A001399(n),n=0..40) ;
    with(combstruct):ZL4:=[S,{S=Set(Cycle(Z,card<4))}, unlabeled]:seq(count(ZL4,size=n),n=0..61); # Zerinvary Lajos, Sep 24 2007
    B:=[S,{S = Set(Sequence(Z,1 <= card),card <=3)},unlabelled]: seq(combstruct[count](B, size=n), n=0..61); # Zerinvary Lajos, Mar 21 2009
  • Mathematica
    CoefficientList[ Series[ 1/((1 - x)*(1 - x^2)*(1 - x^3)), {x, 0, 65} ], x ]
    Table[ Length[ IntegerPartitions[n, 3]], {n, 0, 61} ] (* corrected by Jean-François Alcover, Aug 08 2012 *)
    k = 3; Table[(Apply[Plus, Map[EulerPhi[ # ]Binomial[n/#, k/# ] &, Divisors[GCD[n, k]]]]/n + Binomial[If[OddQ[n], n - 1, n - If[OddQ[k], 2, 0]]/2, If[OddQ[k], k - 1, k]/2])/2, {n, k, 50}] (* Robert A. Russell, Sep 27 2004 *)
    LinearRecurrence[{1,1,0,-1,-1,1},{1,1,2,3,4,5},70] (* Harvey P. Dale, Jun 21 2012 *)
    a[ n_] := With[{m = Abs[n + 3] - 3}, Length[ IntegerPartitions[ m, 3]]]; (* Michael Somos, Dec 25 2014 *)
    k=3 (* Number of red beads in bracelet problem *);CoefficientList[Series[(1/k Plus@@(EulerPhi[#] (1-x^#)^(-(k/#))&/@Divisors[k])+(1+x)/(1-x^2)^Floor[(k+2)/2])/2,{x,0,50}],x] (* Herbert Kociemba, Nov 04 2016 *)
    Table[Length[Select[IntegerPartitions[n,{3}],UnsameQ@@#&]],{n,0,30}] (* Gus Wiseman, Apr 15 2019 *)
  • PARI
    {a(n) = round((n + 3)^2 / 12)}; /* Michael Somos, Sep 04 2006 */
    
  • Python
    [round((n+3)**2 / 12) for n in range(0,62)] # Ya-Ping Lu, Jan 24 2024

Formula

G.f.: 1/((1 - x) * (1 - x^2) * (1 - x^3)) = -1/((x+1)*(x^2+x+1)*(x-1)^3); Simon Plouffe in his 1992 dissertation
a(n) = round((n + 3)^2/12). Note that this cannot be of the form (2*i + 1)/2, so ties never arise.
a(n) = A008284(n+3, 3), n >= 0.
a(n) = 1 + a(n-2) + a(n-3) - a(n-5) for all n in Z. - Michael Somos, Sep 04 2006
a(n) = a(-6 - n) for all n in Z. - Michael Somos, Sep 04 2006
a(6*n) = A003215(n), a(6*n + 1) = A000567(n + 1), a(6*n + 2) = A049450(n + 1), a(6*n + 3) = A033428(n + 1), a(6*n + 4) = A049451(n + 1), a(6*n + 5) = A045944(n + 1).
a(n) = a(n-1) + A008615(n+2) = a(n-2) + A008620(n) = a(n-3) + A008619(n) = A001840(n+1) - a(n-1) = A002620(n+2) - A001840(n) = A000601(n) - A000601(n-1). - Henry Bottomley, Apr 17 2001
P(n, 3) = (1/72) * (6*n^2 - 7 - 9*pcr{1, -1}(2, n) + 8*pcr{2, -1, -1}(3, n)) (see Comtet). [Here "pcr" stands for "prime circulator" and it is defined on p. 109 of Comtet, while the formula appears on p. 110. - Petros Hadjicostas, Oct 03 2019]
Let m > 0 and -3 <= p <= 2 be defined by n = 6*m+p-3; then for n > -3, a(n) = 3*m^2 + p*m, and for n = -3, a(n) = 3*m^2 + p*m + 1. - Floor van Lamoen, Jul 23 2001
72*a(n) = 17 + 6*(n+1)*(n+5) + 9*(-1)^n - 8*A061347(n). - Benoit Cloitre, Feb 09 2003
From Jon Perry, Jun 17 2003: (Start)
a(n) = 6*t(floor(n/6)) + (n%6) * (floor(n/6) + 1) + (n mod 6 == 0?1:0), where t(n) = n*(n+1)/2.
a(n) = ceiling(1/12*n^2 + 1/2*n) + (n mod 6 == 0?1:0).
[Here "n%6" means "n mod 6" while "(n mod 6 == 0?1:0)" means "if n mod 6 == 0 then 1, else 0" (as in C).]
(End)
a(n) = Sum_{i=0..floor(n/3)} 1 + floor((n - 3*i)/2). - Jon Perry, Jun 27 2003
a(n) = Sum_{k=0..n} floor((k + 2)/2) * (cos(2*Pi*(n - k)/3 + Pi/3)/3 + sqrt(3) * sin(2*Pi*(n-k)/3 + Pi/3)/3 + 1/3). - Paul Barry, Apr 16 2005
(m choose 3)_q = (q^m-1) * (q^(m-1) - 1) * (q^(m-2) - 1)/((q^3 - 1) * (q^2 - 1) * (q - 1)).
a(n) = Sum_{k=0..floor(n/2)} floor((3 + n - 2*k)/3). - Paul Barry, Nov 11 2003
A117220(n) = a(A003586(n)). - Reinhard Zumkeller, Mar 04 2006
a(n) = 3 * Sum_{i=2..n+1} floor(i/2) - floor(i/3). - Thomas Wieder, Feb 11 2007
Identical to the number of points inside or on the boundary of the integer grid of {I, J}, bounded by the three straight lines I = 0, I - J = 0 and I + 2J = n. - Jonathan Vos Post, Jul 03 2007
a(n) = A026820(n,3) for n > 2. - Reinhard Zumkeller, Jan 21 2010
Euler transform of length 3 sequence [ 1, 1, 1]. - Michael Somos, Feb 25 2012
a(n) = A005044(2*n + 3) = A005044(2*n + 6). - Michael Somos, Feb 25 2012
a(n) = A000212(n+3) - A002620(n+3). - Richard R. Forberg, Dec 08 2013
a(n) = a(n-1) + a(n-2) - a(n-4) - a(n-5) + a(n-6). - David Neil McGrath, Feb 14 2015
a(n) = floor((n^2+3)/12) + floor((n+2)/2). - Giacomo Guglieri, Apr 02 2019
From Devansh Singh, May 28 2020: (Start)
Let p(n, 3) be the number of 3-part integer partitions in which every part is > 0.
Then for n >= 3, p(n, 3) is equal to:
(n^2 - 1)/12 when n is odd and 3 does not divide n.
(n^2 + 3)/12 when n is odd and 3 divides n.
(n^2 - 4)/12 when n is even and 3 does not divide n.
(n^2)/12 when n is even and 3 divides n.
For n >= 3, p(n, 3) = a(n-3). (End)
a(n) = floor(((n+3)^2 + 4)/12). - Vladimír Modrák, Zuzana Soltysova, Dec 08 2020
Sum_{n>=0} 1/a(n) = 15/4 - Pi/(2*sqrt(3)) + Pi^2/18 + tanh(Pi/(2*sqrt(3)))*Pi/sqrt(3). - Amiram Eldar, Sep 29 2022
E.g.f.: exp(-x)*(9 + exp(2*x)*(47 + 42*x + 6*x^2) + 16*exp(x/2)*cos(sqrt(3)*x/2))/72. - Stefano Spezia, Mar 05 2023
a(6n) = 1+6*A000217(n); Sum_{i=1..n} a(6*i) = A000578(n+1). - David García Herrero, May 05 2024

Extensions

Name edited by Gus Wiseman, Apr 15 2019

A014311 Numbers with exactly 3 ones in binary expansion.

Original entry on oeis.org

7, 11, 13, 14, 19, 21, 22, 25, 26, 28, 35, 37, 38, 41, 42, 44, 49, 50, 52, 56, 67, 69, 70, 73, 74, 76, 81, 82, 84, 88, 97, 98, 100, 104, 112, 131, 133, 134, 137, 138, 140, 145, 146, 148, 152, 161, 162, 164, 168, 176, 193, 194, 196, 200, 208, 224, 259, 261, 262, 265, 266, 268, 273, 274, 276, 280, 289, 290, 292, 296, 304
Offset: 1

Views

Author

Al Black (gblack(AT)nol.net)

Keywords

Comments

Equivalently, sums of three distinct powers of 2.
Appears to give all n such that 64 is the highest power of 2 dividing A005148(n). - Benoit Cloitre, Jun 22 2002
From Gus Wiseman, Oct 05 2020: (Start)
These are numbers k such that the k-th composition in standard order has length 3. The k-th composition in standard order (graded reverse-lexicographic, A066099) is obtained by taking the set of positions of 1's in the reversed binary expansion of k, prepending 0, taking first differences, and reversing again. This gives a bijective correspondence between nonnegative integers and integer compositions. The sequence together with the corresponding standard compositions begins:
7: (1,1,1) 44: (2,1,3) 97: (1,5,1)
11: (2,1,1) 49: (1,4,1) 98: (1,4,2)
13: (1,2,1) 50: (1,3,2) 100: (1,3,3)
14: (1,1,2) 52: (1,2,3) 104: (1,2,4)
19: (3,1,1) 56: (1,1,4) 112: (1,1,5)
21: (2,2,1) 67: (5,1,1) 131: (6,1,1)
22: (2,1,2) 69: (4,2,1) 133: (5,2,1)
25: (1,3,1) 70: (4,1,2) 134: (5,1,2)
26: (1,2,2) 73: (3,3,1) 137: (4,3,1)
28: (1,1,3) 74: (3,2,2) 138: (4,2,2)
35: (4,1,1) 76: (3,1,3) 140: (4,1,3)
37: (3,2,1) 81: (2,4,1) 145: (3,4,1)
38: (3,1,2) 82: (2,3,2) 146: (3,3,2)
41: (2,3,1) 84: (2,2,3) 148: (3,2,3)
42: (2,2,2) 88: (2,1,4) 152: (3,1,4)
(End)

Crossrefs

Cf. A038465 (base 3), A038471 (base 4), A038475 (base 5).
Cf. A081091 (primes), A212190 (squares), A212192 (triangular numbers), A173589 (Fibbinary).
Cf. A057168.
Cf. A000079, A018900, A014311, A014312, A014313, A023688, A023689, A023690, A023691 (Hammingweight = 1, 2, ..., 9).
A000217(n-2) counts compositions into three parts.
A001399(n-3) = A069905(n) = A211540(n+2) counts the unordered case.
A001399(n-6) = A069905(n-3) = A211540(n-1) counts the unordered strict case.
A001399(n-6)*6 = A069905(n-3)*6 = A211540(n-1)*6 counts the strict case.
A014612 is an unordered version, with strict case A007304.
A337453 is the strict case.
A337461 counts the coprime case.
A033992 lists numbers divisible by exactly three different primes.
A323024 lists numbers with exactly three different prime multiplicities.

Programs

  • C
    unsigned hakmem175(unsigned x) {
        unsigned s, o, r;
        s = x & -x;  r = x + s;
        o = r ^ x;  o = (o >> 2) / s;
        return r | o;
    }
    unsigned A014311(int n) {
        if (n == 1) return 7;
        return hakmem175(A014311(n - 1));
    }  // Peter Luschny, Jan 01 2014
    
  • Haskell
    a014311 n = a014311_list !! (n-1)
    a014311_list = [2^x + 2^y + 2^z |
                    x <- [2..], y <- [1..x-1], z <- [0..y-1]]
    -- Reinhard Zumkeller, May 03 2012
    
  • Mathematica
    Select[Range[200], (Count[IntegerDigits[#, 2], 1] == 3)&]
    nn = 8; Flatten[Table[2^i + 2^j + 2^k, {i, 2, nn}, {j, 1, i - 1}, {k, 0, j - 1}]] (* T. D. Noe, Nov 05 2013 *)
  • PARI
    for(n=0,10^3,if(hammingweight(n)==3,print1(n,", "))); \\ Joerg Arndt, Mar 04 2014
    
  • PARI
    print1(t=7);for(i=2,50,print1(","t=A057168(t))) \\ M. F. Hasler, Aug 27 2014
    
  • Python
    A014311_list = [2**a+2**b+2**c for a in range(2,6) for b in range(1,a) for c in range(b)] # Chai Wah Wu, Jan 24 2021
    
  • Python
    from itertools import islice
    def A014311_gen(): # generator of terms
        yield (n:=7)
        while True: yield (n:=n^((a:=-n&n+1)|(a>>1)) if n&1 else ((n&~(b:=n+(a:=n&-n)))>>a.bit_length())^b)
    A014311_list = list(islice(A014311_gen(),20)) # Chai Wah Wu, Mar 10 2025
    
  • Python
    from math import isqrt, comb
    from sympy import integer_nthroot
    def A014311(n): return (1<<(r:=n-1-comb((m:=integer_nthroot(6*n,3)[0])+(t:=(n>comb(m+2,3)))+1,3))-comb((k:=isqrt(b:=r+1<<1))+(b>k*(k+1)),2))+(1<<(a:=isqrt(s:=n-comb(m-(t^1)+2,3)<<1))+((s<<2)>(a<<2)*(a+1)+1))+(1<Chai Wah Wu, Mar 10 2025

Formula

A000120(a(n)) = 3. - Reinhard Zumkeller, May 03 2012
Start with A084468. If n is in sequence, then 2n is too. - Ralf Stephan, Aug 16 2013
a(n+1) = A057168(a(n)). - M. F. Hasler, Aug 27 2014
a(n) = 2^A056558(n-1) + 2^A194848(n-1) + 2^A194847(n-1). - Ridouane Oudra, Sep 06 2020
Sum_{n>=1} 1/a(n) = A367110 = 1.428591545852638123996854844400537952781688750906133068397189529775365950039... (calculated using Baillie's irwinSums.m, see Links). - Amiram Eldar, Feb 14 2022

Extensions

Extension and program by Olivier Gérard

A337453 Numbers k such that the k-th composition in standard order is an ordered triple of distinct positive integers.

Original entry on oeis.org

37, 38, 41, 44, 50, 52, 69, 70, 81, 88, 98, 104, 133, 134, 137, 140, 145, 152, 161, 176, 194, 196, 200, 208, 261, 262, 265, 268, 274, 276, 289, 290, 296, 304, 321, 324, 328, 352, 386, 388, 400, 416, 517, 518, 521, 524, 529, 530, 532, 536, 545, 560, 577, 578
Offset: 1

Views

Author

Gus Wiseman, Sep 07 2020

Keywords

Comments

The k-th composition in standard order (graded reverse-lexicographic, A066099) is obtained by taking the set of positions of 1's in the reversed binary expansion of k, prepending 0, taking first differences, and reversing again. This gives a bijective correspondence between nonnegative integers and integer compositions.

Examples

			The sequence together with the corresponding triples begins:
     37: (3,2,1)    140: (4,1,3)    289: (3,5,1)
     38: (3,1,2)    145: (3,4,1)    290: (3,4,2)
     41: (2,3,1)    152: (3,1,4)    296: (3,2,4)
     44: (2,1,3)    161: (2,5,1)    304: (3,1,5)
     50: (1,3,2)    176: (2,1,5)    321: (2,6,1)
     52: (1,2,3)    194: (1,5,2)    324: (2,4,3)
     69: (4,2,1)    196: (1,4,3)    328: (2,3,4)
     70: (4,1,2)    200: (1,3,4)    352: (2,1,6)
     81: (2,4,1)    208: (1,2,5)    386: (1,6,2)
     88: (2,1,4)    261: (6,2,1)    388: (1,5,3)
     98: (1,4,2)    262: (6,1,2)    400: (1,3,5)
    104: (1,2,4)    265: (5,3,1)    416: (1,2,6)
    133: (5,2,1)    268: (5,1,3)    517: (7,2,1)
    134: (5,1,2)    274: (4,3,2)    518: (7,1,2)
    137: (4,3,1)    276: (4,2,3)    521: (6,3,1)
		

Crossrefs

6*A001399(n - 6) = 6*A069905(n - 3) = 6*A211540(n - 1) counts these compositions.
A007304 is an unordered version.
A014311 is the non-strict version.
A337461 counts the coprime case.
A000217(n - 2) counts 3-part compositions.
A001399(n - 3) = A069905(n) = A211540(n + 2) counts 3-part partitions.
A001399(n - 6) = A069905(n - 3) = A211540(n - 1) counts strict 3-part partitions.
A014612 ranks 3-part partitions.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    Select[Range[0,100],Length[stc[#]]==3&&UnsameQ@@stc[#]&]

Formula

These triples are counted by 6*A001399(n - 6) = 6*A069905(n - 3) = 6*A211540(n - 1).
Intersection of A014311 and A233564.

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

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.