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-5 of 5 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

A005635 Number of ways of placing n non-attacking bishops on an n X n board so that every square is attacked (or occupied).

Original entry on oeis.org

1, 1, 1, 1, 3, 8, 36, 110, 666, 3250, 23436, 125198, 1037520, 7241272, 66360960, 500827928, 5080370400, 45926666984, 508032504000, 4919789029480, 59256857923200, 656763542278304, 8532986822438400, 100525959568386848, 1405335514253932800, 18431883489984091552
Offset: 0

Views

Author

Keywords

Comments

From Vaclav Kotesovec, Apr 26 2012: (Start)
This sequence gives (according to the article by Robinson) the number of inequivalent solutions.
For the total number of all arrangements of n non-attacking bishops such that every square of the board is controlled by at least one bishop, see A122749.
For the total number of all arrangements of n bishops (in any position) such that every square of the board is controlled by at least one bishop, see A182333.
(End)

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Maple
    E:=proc(n) local k; if n mod 2 = 0 then k := n/2; if k mod 2 = 0 then RETURN( (k!*(k+2)/2)^2 ); else RETURN( ((k-1)!*(k+1)^2/2)^2 ); fi; else k := (n-1)/2; if k mod 2 = 0 then RETURN( ((k!)^2/12)*(3*k^3+16*k^2+18*k+8) ); else RETURN( ((k-1)!*(k+1)!/12)*(3*k^3+13*k^2-k-3) ); fi; fi; end; # Gives A122749
    unprotect(D); D:=proc(n) option remember; if n <= 1 then 1 else D(n-1)+(n-1)*D(n-2); fi; end; # Gives A000085
    C:=proc(n) local k; if n mod 2 = 0 then RETURN(0); fi; k:=(n-1)/2; if k mod 2 = 0 then RETURN( k*2^(k-1)*((k/2)!)^2 ); else RETURN( 2^k*(((k+1)/2)!)^2 ); fi; end; # Gives A122693
    Q:=proc(n) local m; if n mod 8 <> 1 then RETURN(0); fi; m:=(n-1)/8; ((2*m)!)^2/(m!)^2; end; # Gives A122747
    M:=proc(n) local k; if n mod 2 = 0 then k:=n/2; if k mod 2 = 0 then RETURN( k!*(k+2)/2 ); else RETURN( (k-1)!*(k+1)^2/2 ); fi; else k:=(n-1)/2; RETURN(D(k)*D(k+1)); fi; end; # Gives A122748
    a:=n-> if n <= 1 then RETURN(1) else E(n)/8 + C(n)/8 + Q(n)/4 + M(n)/4; fi; # Gives A005635
    # The following additional Maple programs produce A123071, A005631, A123072, A005633, A005632, A005634
    S:=proc(n) local k; if n mod 2 = 0 then RETURN(0) else k:=(n-1)/2; RETURN(B(k)*B(k+1)); fi; end; # Gives A123071
    psi:=n->S(n)/2; # Gives A005631
    zeta:=n->Q(n)/2; # Gives A123072
    mu:=n->(M(n)-S(n))/2; # Gives A005633
    chi:=n->(C(n)-S(n)-Q(n))/4; # Gives A005632
    eps:=n->E(n)/8-C(n)/8+S(n)/4-M(n)/4; # Gives A005634

Extensions

Entry revised by N. J. A. Sloane, Sep 25 2006

A156992 Triangle T(n,k) = n!*binomial(n-1, k-1) for 1 <= k <= n, read by rows.

Original entry on oeis.org

1, 2, 2, 6, 12, 6, 24, 72, 72, 24, 120, 480, 720, 480, 120, 720, 3600, 7200, 7200, 3600, 720, 5040, 30240, 75600, 100800, 75600, 30240, 5040, 40320, 282240, 846720, 1411200, 1411200, 846720, 282240, 40320, 362880, 2903040, 10160640, 20321280, 25401600, 20321280, 10160640, 2903040, 362880
Offset: 1

Views

Author

Roger L. Bagula, Feb 20 2009

Keywords

Comments

Partition {1,2,...,n} into m subsets, arrange (linearly order) the elements within each subset, then arrange the subsets. - Geoffrey Critzer, Mar 05 2010
From Dennis P. Walsh, Nov 26 2011: (Start)
Number of ways to arrange n different books in a k-shelf bookcase leaving no shelf empty.
There are n! ways to arrange the books in one long line. With ni denoting the number of books for shelf i, we have n = n1 + n2 + ... + nk. Since the number of compositions of n with k summands is binomial(n-1,k-1), we obtain T(n,k) = n!*binomial(n-1,k-1) for the number of ways to arrange the n books on the k shelves.
Equivalently, T(n,k) is the number of ways to stack n different alphabet blocks into k labeled stacks.
Also, T(n,k) is the number of injective functions f:[n]->[n+k] such that (i) the pre-image of (n+j) exists for j=1..k and (ii) f has no fixed points, that is, for all x, f(x) does not equal x.
T(n,k) is the number of labeled, rooted forests that have (i) exactly k roots, (ii) each root labeled larger than any nonroot, (iii) each root with exactly one child node, (iv) n non-root nodes, and (v) at most one child node for each node in the forest.
(End)
Essentially, the triangle given by (2,1,3,2,4,3,5,4,6,5,7,6,8,7,9,8,...) DELTA (2,1,3,2,4,3,5,4,6,5,7,6,8,7,9,8,...) where DELTA is the operator defined in A084938. - Philippe Deléham, Nov 29 2011
T(n,j+k) = Sum_{i=j..n-k} binomial(n,i)*T(i,j)*T(n-i,k). - Dennis P. Walsh, Nov 29 2011

Examples

			The triangle starts:
      1;
      2,      2;
      6,     12,      6;
     24,     72,     72,      24;
    120,    480,    720,     480,     120;
    720,   3600,   7200,    7200,    3600,    720;
   5040,  30240,  75600,  100800,   75600,  30240,   5040;
  40320, 282240, 846720, 1411200, 1411200, 846720, 282240, 40320;
From _Dennis P. Walsh_, Nov 26 2011: (Start)
T(3,2) = 12 since there are 12 ways to arrange books b1, b2, and b3 on shelves <shelf1><shelf2>:
   <b1><b2,b3>, <b1><b3,b2>, <b2><b1,b3>, <b2><b3,b1>,
   <b3><b1,b2>, <b3><b2,b1>, <b2,b3><b1>, <b3,b2><b1>,
   <b1,b3><b2>, <b3,b1><b2>, <b1,b2><b3>, <b2,b1><b3>.
(End)
		

References

  • J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 98

Crossrefs

Cf. A002866 (row sums).
Column 1 = A000142. Column 2 = A001286 * 2! = A062119. Column 3 = A001754 * 3!. Column 4 = A001755 * 4!. Column 5 = A001777 * 5!. Column 6 = A001778 * 6!. Column 7 = A111597 * 7!. Column 8 = A111598 * 8!. Cf. A105278. - Geoffrey Critzer, Mar 05 2010
T(2n,n) gives A123072.

Programs

  • Magma
    [Factorial(n)*Binomial(n-1,k-1): k in [1..n], n in [1..10]]; // G. C. Greubel, May 10 2021
    
  • Maple
    seq(seq(n!*binomial(n-1,k-1),k=1..n),n=1..10); # Dennis P. Walsh, Nov 26 2011
    with(PolynomialTools): p := (n,x) -> (n+1)!*hypergeom([-n],[],-x);
    seq(CoefficientList(simplify(p(n,x)),x),n=0..5); # Peter Luschny, Apr 08 2015
  • Mathematica
    Table[n!*Binomial[n-1, k-1], {n,10}, {k,n}]//Flatten
  • Sage
    flatten([[factorial(n)*binomial(n-1,k-1) for k in (1..n)] for n in (1..10)]) # G. C. Greubel, May 10 2021

Formula

E.g.f. for column k is (x/(1-x))^k. - Geoffrey Critzer, Mar 05 2010
T(n,k) = A000142(n)*A007318(n-1,k-1). - Dennis P. Walsh, Nov 26 2011
Coefficient triangle of the polynomials p(n,x) = (n+1)!*hypergeom([-n],[],-x). - Peter Luschny, Apr 08 2015

A173331 Second of two intermediate sequences for integral solution of A002144(n)=x^2+y^2.

Original entry on oeis.org

2, 2, 13, 2, 31, 4, 2, 55, 8, 81, 4, 91, 99, 105, 133, 10, 6, 2, 10, 181, 183, 227, 8, 237, 16, 10, 14, 265, 2, 301, 303, 16, 18, 8, 355, 379, 6, 381, 389, 14, 421, 429, 453, 451, 487, 20, 531, 543, 20, 24, 585, 24, 18, 16, 637, 631, 655, 12, 651, 675, 22, 731, 26, 741, 757
Offset: 1

Views

Author

Reinhard Zumkeller, Feb 16 2010

Keywords

Comments

a(n) = A173330(n)*A010050(A005098(n)) mod A002144(n);
A002973(n) = MIN(a(n), A002144(n) - a(n)) / 2.

Examples

			n=7: A002144(7) = 53 = 4*13 + 1,
a(7) = A173330(7) * 26! mod 53 = 7*403291461126605635584000000 mod 53 = 2,
A002973(7) = MIN(2, 53 - 2) / 2 = 1;
n=8: A002144(8) = 61 = 4*15 + 1,
a(8) = A173330(8) * 30! mod 61 = 5*265252859812191058636308480000000 mod 61 = 55,
A002973(8) = MIN(55, 61 - 55) / 2 = 3.
		

References

  • H. Davenport, The Higher Arithmetic (Cambridge University Press 7th ed., 1999), ch. V.3, p.122.

Crossrefs

Formula

a(n) = ((2k)! / 2(k!))^2 mod p, where p = 4*k+1 = A002144(n).

A329965 a(n) = ((1+n)*floor(1+n/2))*(n!/floor(1+n/2)!)^2.

Original entry on oeis.org

1, 2, 6, 72, 240, 7200, 25200, 1411200, 5080320, 457228800, 1676505600, 221298739200, 821966745600, 149597947699200, 560992303872000, 134638152929280000, 508633022177280000, 155641704786247680000, 591438478187741184000, 224746621711341649920000
Offset: 0

Views

Author

Peter Luschny, Dec 04 2019

Keywords

Crossrefs

Programs

  • Maple
    A329965 := n -> ((1+n)*floor(1+n/2))*(n!/floor(1+n/2)!)^2:
    seq(A329965(n), n=0..19);
  • Mathematica
    ser := Series[(1 - Sqrt[1 - 4 x^2] - 4 x^2 (1 - x - Sqrt[1 - 4 x^2]))/(2 x^2 (1 - 4 x^2)^(3/2)), {x, 0, 22}]; Table[n! Coefficient[ser, x, n], {n, 0, 20}]
    Table[(1+n)Floor[1+n/2](n!/Floor[1+n/2]!)^2,{n,0,30}] (* Harvey P. Dale, Oct 01 2023 *)
  • Python
    from fractions import Fraction
    def A329965():
        x, n = 1, Fraction(1)
        while True:
            yield int(x)
            m = n if n % 2 else 4/(n+2)
            n += 1
            x *= m * n
    a = A329965(); [next(a) for i in range(36)]

Formula

a(n) = n!*A212303(n+1).
a(n) = (n+1)!*A057977(n).
a(n) = A093005(n+1)*A262033(n)^2.
a(n) = A093005(n+1)*A329964(n).
a(2*n) = A052510(n) (n >= 0).
a(2*n+1) = A123072(n+1) (n >= 0).
a(n) = n! [x^n] (1 - sqrt(1 - 4*x^2) - 4*x^2*(1 - x - sqrt(1 - 4*x^2)))/(2*x^2*(1 - 4*x^2)^(3/2)).
Showing 1-5 of 5 results.