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.

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

A035158 Floor of the Chebyshev function theta(n): a(n) = floor(Sum_{primes p <= n } log(p)).

Original entry on oeis.org

0, 0, 1, 1, 3, 3, 5, 5, 5, 5, 7, 7, 10, 10, 10, 10, 13, 13, 16, 16, 16, 16, 19, 19, 19, 19, 19, 19, 22, 22, 26, 26, 26, 26, 26, 26, 29, 29, 29, 29, 33, 33, 37, 37, 37, 37, 40, 40, 40, 40, 40, 40, 44, 44, 44, 44, 44, 44, 49, 49, 53, 53, 53, 53, 53, 53, 57, 57, 57, 57, 61, 61, 65, 65, 65, 65
Offset: 1

Views

Author

N. J. A. Sloane, Oct 02 2008

Keywords

Comments

The old entry with this sequence number was a duplicate of A002325.

References

  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, 5th ed., Oxford Univ. Press, 1979, see Chap. 22.
  • D. S. Mitrinovic et al., Handbook of Number Theory, Kluwer, Section VII.35. (For inequalities, etc.)

Crossrefs

Cf. A057872, A083535, A016040 (records), A000040 (places of records)

Programs

  • Maple
    (Maple for A035158, A057872, A083535:)
    Digits:=2000;
    tf:=[]; tr:=[]; tc:=[];
    for n from 1 to 120 do
    t2:=0;
    j:=pi(n);
    for i from 1 to j do t2:=t2+log(ithprime(i)); od;
    tf:=[op(tf),floor(evalf(t2))];
    tr:=[op(tr),round(evalf(t2))];
    tc:=[op(tc),ceil(evalf(t2))];
    od:

Formula

a(n) ~ n by the prime number theorem. - Charles R Greathouse IV, Aug 02 2012

A215260 Nearest integer to log(A002110(n)).

Original entry on oeis.org

0, 1, 2, 3, 5, 8, 10, 13, 16, 19, 23, 26, 30, 33, 37, 41, 45, 49, 53, 57, 62, 66, 70, 75, 79, 84, 88, 93, 98, 102, 107, 112, 117, 122, 127, 132, 137, 142, 147, 152, 157, 162, 167, 173, 178, 183, 189, 194, 199, 205, 210, 216, 221, 227, 232, 238, 243, 249, 254, 260, 266, 271, 277, 283, 288, 294, 300, 306, 312, 317, 323, 329, 335, 341, 347, 353, 359, 365, 371, 377
Offset: 0

Views

Author

N. J. A. Sloane, Sep 14 2012

Keywords

Crossrefs

Programs

  • Mathematica
    Round@ Log@ FoldList[ Times, 1, Prime@ Range@ 60] (* Robert G. Wilson v, Sep 16 2015 *)
  • PARI
    v=List([t=0]);forprime(p=2,200,t+=log(p);listput(v,round(t))); Vec(v) \\ Charles R Greathouse IV, Sep 23 2012
    
  • PARI
    a(n) = round(log(factorback(primes(n)))); \\ Michel Marcus, Jan 15 2025

Formula

a(n) ~ n log n, a statement equivalent to the Prime Number Theorem. - Charles R Greathouse IV, Sep 23 2012

A215259 Nearest integer to log(A003418(n)).

Original entry on oeis.org

0, 0, 1, 2, 2, 4, 4, 6, 7, 8, 8, 10, 10, 13, 13, 13, 13, 16, 16, 19, 19, 19, 19, 22, 22, 24, 24, 25, 25, 28, 28, 32, 33, 33, 33, 33, 33, 36, 36, 36, 36, 40, 40, 44, 44, 44, 44, 48, 48, 49, 49, 49, 49, 53, 53, 53, 53, 53, 53, 58, 58, 62, 62, 62, 62, 62, 62, 67, 67, 67, 67, 71, 71, 75, 75, 75, 75, 75, 75, 79, 79, 81, 81, 85, 85, 85, 85, 85, 85, 89, 89, 89, 89, 89, 89
Offset: 0

Views

Author

N. J. A. Sloane, Sep 14 2012

Keywords

Crossrefs

Programs

  • PARI
    v=List([0]);t=1;for(n=1,100,listput(v,round(log(t=lcm(t,n))))); Vec(v) \\ Charles R Greathouse IV, Sep 23 2012

Formula

a(n) ~ n, a statement equivalent to the Prime Number Theorem. - Charles R Greathouse IV, Sep 23 2012

A252398 Successive n with minimal relative distance |1-theta(n)/n|, where theta(n) = log(A034386(n)) is Chebyshev's theta function.

Original entry on oeis.org

2, 3, 5, 7, 13, 19, 43, 47, 73, 103, 107, 109, 113, 199, 283, 467, 661, 887, 1063, 1069, 1097, 1103, 1109, 1123, 1129, 1303, 1307, 1321, 1327, 1621, 1627, 2803, 3931, 3947, 4273, 4289, 4297, 5867, 5869, 5881, 6373, 6379, 9439, 9473, 9479, 9497, 9551, 9859, 9931, 9949
Offset: 1

Views

Author

Jean-François Alcover, Dec 17 2014

Keywords

Comments

The first 10000 terms are the same as A108310 (see that sequence for comments). - Charles R Greathouse IV, Dec 18 2014
This sequence, unlike A108310, is presumably infinite; it is finite if and only if theta(n) = n for some number n.

Examples

			Given that 1 - theta(3)/3 = 1 - log(6)/3 = 0.40..., 1 - theta(4)/4 = 1 - log(6)/4 = 0.55... and 1 - theta(5)/5 = 1 - log(30)/5 = 0.31..., the next term after 3 is 5.
		

Crossrefs

Programs

  • Mathematica
    (* Adapted from PARI *) Reap[For[record = 2; theta = 0; p = 2, p < 2 * 10^8, p = NextPrime[p], theta = theta + Log[p] //N; d = Abs[1 - theta/p]; If[d < record, record = d; Print[p]; Sow[p]]]][[2, 1]]
  • PARI
    /* Note: This program may fail if you replace 1e6 with a number larger than 1e17, and will certainly fail at some point below 1e316. These large numbers are not remotely feasible at the moment. */
    r=th=0; forprime(p=2,1e6, th+=log(p); t=th/p; if(t>r, r=t; print1(p", "); if(t>1, warning("theta(n) > n, possible missed terms")))) \\ Charles R Greathouse IV, Dec 17 2014
Showing 1-5 of 5 results.