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-6 of 6 results.

A034386 Primorial numbers (second definition): n# = product of primes <= n.

Original entry on oeis.org

1, 1, 2, 6, 6, 30, 30, 210, 210, 210, 210, 2310, 2310, 30030, 30030, 30030, 30030, 510510, 510510, 9699690, 9699690, 9699690, 9699690, 223092870, 223092870, 223092870, 223092870, 223092870, 223092870, 6469693230, 6469693230, 200560490130, 200560490130
Offset: 0

Views

Author

Keywords

Comments

Squarefree kernel of both n! and lcm(1, 2, 3, ..., n).
a(n) = lcm(core(1), core(2), core(3), ..., core(n)) where core(x) denotes the squarefree part of x, the smallest integer such that x*core(x) is a square. - Benoit Cloitre, May 31 2002
The sequence can also be obtained by taking a(1) = 1 and then multiplying the previous term by n if n is coprime to the previous term a(n-1) and taking a(n) = a(n-1) otherwise. - Amarnath Murthy, Oct 30 2002; corrected by Franklin T. Adams-Watters, Dec 13 2006

Examples

			a(5) = a(6) = 2*3*5 = 30;
a(7) = 2*3*5*7 = 210.
		

References

  • Steven R. Finch, Mathematical Constants, Cambridge, 2003, Section 1.3, p. 14, "n?".
  • József Sándor, Dragoslav S. Mitrinovic, Borislav Crstici, Handbook of Number Theory I, Springer Science & Business Media, 2005, Section VII.35, p. 268.

Crossrefs

Cf. A073838, A034387. - Reinhard Zumkeller, Jul 05 2010
The following fractions are all related to each other: Sum 1/n: A001008/A002805, Sum 1/prime(n): A024451/A002110 and A106830/A034386, Sum 1/nonprime(n): A282511/A282512, Sum 1/composite(n): A250133/A296358.

Programs

  • Magma
    [n eq 0 select 1 else LCM(PrimesInInterval(1, n)) : n in [0..50]]; // G. C. Greubel, Jul 21 2023
  • Maple
    A034386 := n -> mul(k,k=select(isprime,[$1..n])); # Peter Luschny, Jun 19 2009
    # second Maple program:
    a:= proc(n) option remember; `if`(n=0, 1,
          `if`(isprime(n), n, 1)*a(n-1))
        end:
    seq(a(n), n=0..36);  # Alois P. Heinz, Nov 26 2020
  • Mathematica
    q[x_]:=Apply[Times,Table[Prime[w],{w,1,PrimePi[x]}]]; Table[q[w],{w,1,30}]
    With[{pr=FoldList[Times,1,Prime[Range[20]]]},Table[pr[[PrimePi[n]+1]],{n,0,40}]] (* Harvey P. Dale, Apr 05 2012 *)
    Table[ResourceFunction["Primorial"][i], {i,1,40}] (* Navvye Anand, May 22 2024 *)
  • PARI
    a(n)=my(v=primes(primepi(n)));prod(i=1,#v,v[i]) \\ Charles R Greathouse IV, Jun 15 2011
    
  • PARI
    a(n)=lcm(primes([2,n])) \\ Jeppe Stig Nielsen, Mar 10 2019
    
  • Python
    from sympy import primorial
    def A034386(n): return 1 if n == 0 else primorial(n,nth=False) # Chai Wah Wu, Jan 11 2022
    
  • SageMath
    def sharp_primorial(n): return sloane.A002110(prime_pi(n))
    [sharp_primorial(n) for n in (0..30)] # Giuseppe Coppoletta, Jan 26 2015
    

Formula

a(n) = n# = A002110(A000720(n)) = A007947(A003418(n)) = A007947(A000142(n)).
Asymptotic expression for a(n): exp((1 + o(1)) * n) where o(1) is the "little o" notation. - Dan Fux (dan.fux(AT)OpenGaia.com or danfux(AT)OpenGaia.com), Apr 08 2001
For n > 0, log(a(n)) < 1.01624*n. [Rosser and Schoenfeld, 1962; Sándor et al., 2005] - N. J. A. Sloane, Apr 04 2017
a(n) <= A179215(n). - Reinhard Zumkeller, Jul 05 2010
a(n) = lcm(A006530(n), a(n-1)). - Jon Maiga, Nov 10 2018
Sum_{n>=0} 1/a(n) = A249270. - Amiram Eldar, Nov 08 2020

Extensions

Offset changed and initial term added by Arkadiusz Wesolowski, Jun 04 2011

A035250 Number of primes between n and 2n (inclusive).

Original entry on oeis.org

1, 2, 2, 2, 2, 2, 3, 2, 3, 4, 4, 4, 4, 3, 4, 5, 5, 4, 5, 4, 5, 6, 6, 6, 6, 6, 7, 7, 7, 7, 8, 7, 7, 8, 8, 9, 10, 9, 9, 10, 10, 10, 10, 9, 10, 10, 10, 9, 10, 10, 11, 12, 12, 12, 13, 13, 14, 14, 14, 13, 13, 12, 12, 13, 13, 14, 14, 13, 14, 15, 15, 14, 14, 13, 14, 15
Offset: 1

Views

Author

Keywords

Comments

By Bertrand's Postulate (proved by Chebyshev), there is always a prime between n and 2n, i.e., a(n) is positive for all n.
The number of primes in the interval [n,2*n) is the same sequence as this, except that a(1) = 0. - N. J. A. Sloane, Oct 18 2024
The smallest and largest primes between n and 2n inclusive are A007918 and A060308 respectively. - Lekraj Beedassy, Jan 01 2007
The number of partitions of 2n into exactly two parts with first part prime, n > 1. - Wesley Ivan Hurt, Jun 15 2013

Examples

			The primes between n = 13 and 2n = 26, inclusive, are 13, 17, 19, 23; so a(13) = 4.
a(5) = 2, since 2(5) = 10 has 5 partitions into exactly two parts: (9,1),(8,2),(7,3),(6,4),(5,5).  Two primes are among the first parts: 7 and 5.
		

References

  • Aigner, M. and Ziegler, G. Proofs from The Book (2nd edition). Springer-Verlag, 2001.

Crossrefs

Related sequences:
Primes (p) and composites (c): A000040, A002808, A000720, A065855.
Primes between p(n) and 2*p(n): A063124, A070046; between c(n) and 2*c(n): A376761; between n and 2*n: A035250, A060715, A077463, A108954.
Composites between p(n) and 2*p(n): A246514; between c(n) and 2*c(n): A376760; between n and 2*n: A075084, A307912, A307989, A376759.

Programs

Formula

a(n) = A000720(2*n) - A000720(n-1); a(n) <= A179211(n). - Reinhard Zumkeller, Jul 05 2010
a(A059316(n)) = n and a(m) <> n for m < A059316(n). - Reinhard Zumkeller, Jan 08 2012
a(n) = sum(A010051(k): k=n..2*n). [Reinhard Zumkeller, Jan 08 2012]
a(n) = pi(2n) - pi(n-1). [Wesley Ivan Hurt, Jun 15 2013]

A126804 a(n) = (2n)! / (n-1)!.

Original entry on oeis.org

2, 24, 360, 6720, 151200, 3991680, 121080960, 4151347200, 158789030400, 6704425728000, 309744468633600, 15543540607795200, 841941782922240000, 48962152914554880000, 3042648073975910400000, 201220459292273541120000, 14110584707870682071040000
Offset: 1

Views

Author

Jonathan R. Love (japanada11(AT)yahoo.ca), Feb 22 2007

Keywords

Comments

Old name was "Multiplying n X n integers above n".
a(n) = 2*A001814(n). - Zerinvary Lajos, May 03 2007
A179214(n) <= a(n). - Reinhard Zumkeller, Jul 05 2010
Product of the numbers from n to 2n. - Wesley Ivan Hurt, Dec 14 2015

Examples

			a(5) = 151200 because five digits above 5: (6, 7, 8, 9, 10), multiplied by five equals 5*(6*7*8*9*10) = 151200.
		

Crossrefs

Cf. A045943, A073838. - Reinhard Zumkeller, Jul 05 2010

Programs

  • Magma
    [Factorial(2*n)/Factorial(n-1) : n in [1..20]]; // Wesley Ivan Hurt, Dec 14 2015
    
  • Maple
    a:=n->sum((count(Permutation(2*n+2),size=n+1)),j=0..n): seq(a(n), n=0..15); # Zerinvary Lajos, May 03 2007
    seq(mul((n+k), k=0..n), n=1..16); # Zerinvary Lajos, Sep 21 2007
    with(combstruct):with(combinat) :bin := {B=Union(Z,Prod(B,B))}: seq (count([B,bin,labeled],size=n)*(n-1), n=2..17); # Zerinvary Lajos, Dec 05 2007
  • Mathematica
    Table[Pochhammer[n, n + 1], {n, 17}] (* Arkadiusz Wesolowski, Aug 13 2012 *)
    Table[(2 n)!/(n - 1)!, {n, 20}] (* Wesley Ivan Hurt, Dec 14 2015 *)
  • PARI
    a(n) = prod(k=n, 2*n, k); \\ Michel Marcus, Dec 15 2015
    
  • PARI
    x='x+O('x^99); Vec(serlaplace(2*x/(1-4*x)^(3/2))) \\ Altug Alkan, Mar 11 2018

Formula

a(n) = (2n)! / (n-1)!.
a(n) = Product_{i=n..2n} i. - Wesley Ivan Hurt, Dec 14 2015
From Robert Israel, Dec 15 2015: (Start)
a(n) = (2*n*(2*n-1)/(n-1))*a(n-1).
E.g.f.: 2*x/(1-4*x)^(3/2). (End)
a(n) = Pochhammer(n,n+1). - Pedro Caceres, Mar 10 2018

Extensions

New name from Wesley Ivan Hurt, Dec 15 2015

A073837 Sum of primes p satisfying n <= p <= 2n.

Original entry on oeis.org

2, 5, 8, 12, 12, 18, 31, 24, 41, 60, 60, 72, 72, 59, 88, 119, 119, 102, 139, 120, 161, 204, 204, 228, 228, 228, 281, 281, 281, 311, 372, 341, 341, 408, 408, 479, 552, 515, 515, 594, 594, 636, 636, 593, 682, 682, 682, 635, 732, 732, 833, 936, 936, 990, 1099, 1099
Offset: 1

Views

Author

Amarnath Murthy, Aug 12 2002

Keywords

Comments

a(n) = A034387(2*n) - A034387(n-1); a(n) <= A179213(n). [Reinhard Zumkeller, Jul 05 2010]

Examples

			a(7) = 31 = 7+11+13 (sum of primes between 7 and 14).
		

Crossrefs

Cf. A073838.

Programs

  • Maple
    for n from 1 to 150 do l := 0:for j from n to 2*n do if isprime(j) then l := l+j:fi:od:a[n] := l:od:seq(a[j],j=1..150);
  • Mathematica
    Table[Total[Select[Range[n, 2 n], PrimeQ]], {n, 56}] (* Jayanta Basu, Aug 12 2013 *)
  • PARI
    a(n)=sum(i=n,2*n,i*isprime(i))

Extensions

More terms from Sascha Kurz and Benoit Cloitre, Aug 14 2002

A179214 Product of squarefree numbers between n and 2*n (inclusive).

Original entry on oeis.org

2, 6, 90, 210, 2100, 4620, 140140, 300300, 5105100, 96996900, 4481256780, 9369900540, 243617414040, 18739801080, 1164544781400, 2406725881560, 2700346439110320, 5559536786403600, 7816708721683461600
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 05 2010

Keywords

Comments

A073838(n) <= a(n) <= A126804(n);
a(n) = A179215(2*n)/A179215(n-1).

Examples

			a(10) = 10*11*13*14*15*17*19 = 96996900;
a(11) = 11*13*14*15*17*19*21*22 = 4481256780;
a(12) = 13*14*15*17*19*21*22*23 = 9369900540.
		

Crossrefs

Formula

a(n) = PROD(k^A008966(k): n <= k <= 2*n).

Extensions

Example corrected by Reinhard Zumkeller, Jul 19 2010

A201146 Triangle read by rows: T(n,k) = (n#)/(k#), 1 <= k <= n.

Original entry on oeis.org

1, 2, 1, 6, 3, 1, 6, 3, 1, 1, 30, 15, 5, 5, 1, 30, 15, 5, 5, 1, 1, 210, 105, 35, 35, 7, 7, 1, 210, 105, 35, 35, 7, 7, 1, 1, 210, 105, 35, 35, 7, 7, 1, 1, 1, 210, 105, 35, 35, 7, 7, 1, 1, 1, 1, 2310, 1155, 385, 385, 77, 77, 11, 11, 11, 11, 1, 2310, 1155, 385, 385
Offset: 1

Views

Author

Arkadiusz Wesolowski, Nov 27 2011

Keywords

Comments

Row sums give A201156.
Central terms give A068111: T(2*n-1,n) = A068111(n).
T(n,1) = A034386(n).
T(n,n-1) = A089026(n) for n > 1.
T(n,n) = A000012(n).
Let n > 1 and p = A000040(n). Then T(p,p-1) = T(p+1,p-1) = p.
T(2*n-1,n-1) = A073838(n) for n > 1.
T(2*n,n+1) = A144186(n).

Examples

			1:                                   1
2:                               2       1
3:                           6       3       1
4:                       6       3       1       1
5:                   30      15      5       5       1
6:               30      15      5       5       1       1
7:           210     105     35      35      7       7       1
8:       210     105     35      35      7       7       1       1
9:   210     105     35      35      7       7       1       1       1
		

Crossrefs

Cf. A034386.

Programs

  • Mathematica
    lst = {}; Do[AppendTo[lst, Product[Prime[i], {i, PrimePi[n]}]/Product[Prime[i], {i, PrimePi[k]}]], {n, 12}, {k, n}]; lst (* Arkadiusz Wesolowski, Dec 02 2011 *)
Showing 1-6 of 6 results.