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-10 of 106 results. Next

A293558 Triangle T(n,k) read by rows: T(n,k) = A005867(k-1)*A002110(n)/A002110(k).

Original entry on oeis.org

1, 3, 1, 15, 5, 2, 105, 35, 14, 8, 1155, 385, 154, 88, 48, 15015, 5005, 2002, 1144, 624, 480, 255255, 85085, 34034, 19448, 10608, 8160, 5760, 4849845, 1616615, 646646, 369512, 201552, 155040, 109440, 92160
Offset: 1

Views

Author

Bob Selcoe, Oct 11 2017

Keywords

Comments

T(n,k) is the triangle in A174909 with reversed row order. (See that sequence for additional comments).
Row sums = A053144(n) = A002110(n) - T(n+1,n+1).
T(n,k) = number of terms with smallest prime factor prime(k) contained in primorial(n) consecutive numbers, k <= n. For example, T(5,4) = 88, so there are 88 terms with smallest prime factor 7 in any sequence of 2310 consecutive numbers.

Examples

			Triangle starts:
n/k  1     2    3    4    5    6
1    1
2    3     1
3    15    5    2
4    105   35   14   8
5    1155  385  154  88   48
6    15015 5005 2002 1144 624 480
T(5,3) = 154: A005867(2) = 2, A002110(5) = 2310, A002110(3) = 30; 2*2310/30 = 154.
		

Crossrefs

Cf. A000040 (prime numbers), A002110, A005867, A053144, A174909 (this triangle with reversed row order).

Programs

  • Mathematica
    Table[#1 Product[EulerPhi@ Prime@ i, {i, k - 1}]/#2 & @@ Map[Product[ Prime@ i, {i, #}] &, {n, k}], {n, 8}, {k, n}] // Flatten (* Michael De Vlieger, Oct 12 2017 *)

A055767 Index (or subscript) k of the largest primorial A002110(k) that divides the Euler phi of the n-th primorial (A005867(n)).

Original entry on oeis.org

0, 1, 1, 2, 3, 3, 3, 3, 3, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16
Offset: 1

Views

Author

Labos Elemer, Jul 12 2000

Keywords

Examples

			For n = 52: the prime factors of phi(A002110(52)) = phi(2*3*5*7*...*233*239) are {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 37, 41, 43, 53, 83, 89, 113} in which the length of the initial prime continuous part is 10, thus a(52) = 10.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Module[{e = Times @@ (Prime[Range[n]] - 1), p = 2, k = 0}, While[Divisible[e, p], k++; p = NextPrime[p]]; k]; Array[a, 100] (* Amiram Eldar, Nov 12 2024 *)
  • PARI
    a(n) = {my(e = prod(i = 1, n, prime(i)-1), p = 2, k = 0); while(!(e % p), k++; p = nextprime(p+1)); k;} \\ Amiram Eldar, Nov 12 2024

Formula

a(n) = Max{k : primorial q(k) divides A000010(A002110(n))}.

Extensions

Data corrected by Sean A. Irvine, Apr 05 2022

A335260 Irregular triangle S(n,k) = numerators of k*A002110(n)/A005867(n) for 1 <= k <= A005867(n).

Original entry on oeis.org

1, 2, 3, 6, 15, 15, 45, 15, 75, 45, 105, 30, 35, 35, 105, 35, 175, 105, 245, 35, 315, 175, 385, 105, 455, 245, 525, 70, 595, 315, 665, 175, 735, 385, 805, 105, 875, 455, 945, 245, 1015, 525, 1085, 140, 1155, 595, 1225, 315, 1295, 665, 1365, 175, 1435, 735, 1505
Offset: 1

Views

Author

Keywords

Comments

Alternatively, numerators of k*A060753(n)/A038110(n) for 1 <= k <= A005867(n).

Examples

			Table begins:
     1;
     2;
     3, 6;
    15, 15, 45, 15, 75, 45, 105, 30;
    ...
Row n = 4 contains the numerators of (35/8)*k for 1 <= k <= A005867(4): 35/8, 35/4, 105/8, 35/2, 175/8, 105/4, 245/8, 35, 315/8, 175/4, 385/8, 105/2, 455/8, 245/4, 525/8, 70, 595/8, 315/4, 665/8, 175/2, 735/8, 385/4, 805/8, 105, 875/8, 455/4, 945/8, 245/2, 1015/8, 525/4, 1085/8, 140, 1155/8, 595/4, 1225/8, 315/2, 1295/8, 665/4, 1365/8, 175, 1435/8, 735/4, 1505/8, 385/2, 1575/8, 805/4, 1645/8, 210.
		

Crossrefs

Programs

  • Mathematica
    Table[Numerator[P Range[EulerPhi[P]]/EulerPhi[P]], {P, FoldList[Times, Prime@ Range@ 5]}] (* or, more efficiently for larger datasets: *)
    Flatten@ Block[{nn = 7, s, t}, s = Array[Numerator@ Product[1 - 1/Prime[k], {k, # - 1}] &, nn]; t = Nest[Append[#, #[[-1]] (Prime[Length@ #] - 1)]&, {1}, nn]; u = Denominator@ Nest[Append[#, #[[-1]] + (1 - #[[-1]])/Prime[Length@ #]] &, {0}, nn]; MapIndexed[Function[{m, D, i},  u[[i]]*Range[t[[i]]]/ PadRight[{}, t[[i]], ReplacePart[ConstantArray[0, m], Flatten@ Map[Function[d, Map[# -> m/d &, m/d Select[Range[d], GCD[#, d] == 1 &]]], D]]]] @@ {#1, Divisors@ #1, First[#2]} &, s]]
    (* or, generate a single numerator of S(n,k): *)
    f[n_, k_] := #2 k/GCD[#1, Mod[k, #1]] & @@ {Numerator@ Product[1 - 1/Prime[i], {i, n - 1}], Denominator@ Last@ Nest[Append[#, #[[-1]] + (1 - #[[-1]])/Prime[Length@ #]] &, {0}, n - 1]}

Formula

S(n,k) = k*A060753(n)/GCD(k (mod m), m) for m = A038110(n).
Row lengths: A005867(n).
Least numerator in row n: A060753(n), all numerators are multiples j*A060753(n).

A335261 Irregular triangle S(n,k) = denominators of k*A002110(n)/A005867(n) for 1 <= k <= A005867(n).

Original entry on oeis.org

1, 1, 1, 1, 4, 2, 4, 1, 4, 2, 4, 1, 8, 4, 8, 2, 8, 4, 8, 1, 8, 4, 8, 2, 8, 4, 8, 1, 8, 4, 8, 2, 8, 4, 8, 1, 8, 4, 8, 2, 8, 4, 8, 1, 8, 4, 8, 2, 8, 4, 8, 1, 8, 4, 8, 2, 8, 4, 8, 1, 16, 8, 16, 4, 16, 8, 16, 2, 16, 8, 16, 4, 16, 8, 16, 1, 16, 8, 16, 4, 16, 8, 16
Offset: 1

Views

Author

Keywords

Comments

Alternatively, denominators of k*A060753(n)/A038110(n) for 1 <= k <= A005867(n).
Let m = A038110(n). For row n, the primitive denominators d | m.
The mean of row n is related to the mean of row n of A309497: A060753(n+1)/(A038110(n+1)*2) = Mean(A309497(n))/A038110(n+1).

Examples

			Table begins:
    1;
    1;
    1, 1;
    4, 2, 4, 1, 4, 2, 4, 1;
    8, 4, 8, 2, 8, 4, 8, 1, ..., 8, 1;
    ...
Row n = 4 contains the denominators of (35/8)*k for 1 <= k <= A005867(4): 35/8, 35/4, 105/8, 35/2, 175/8, 105/4, 245/8, 35, 315/8, 175/4, 385/8, 105/2, 455/8, 245/4, 525/8, 70, 595/8, 315/4, 665/8, 175/2, 735/8, 385/4, 805/8, 105, 875/8, 455/4, 945/8, 245/2, 1015/8, 525/4, 1085/8, 140, 1155/8, 595/4, 1225/8, 315/2, 1295/8, 665/4, 1365/8, 175, 1435/8, 735/4, 1505/8, 385/2, 1575/8, 805/4, 1645/8, 210.
The mean of row 4: (A060753(4+1)/(A038110(4+1)*2))*(A005867(4)+1) = (35/(8*2))*(48+1) = (35/16)*49 = 1715/16.
		

Crossrefs

Programs

  • Mathematica
    Table[Denominator[P Range[EulerPhi[P]]/EulerPhi[P]], {P, FoldList[Times, Prime@ Range@ 5]}] (* or, more efficiently for larger datasets: *)
    Flatten@ Block[{nn = 7, s, t}, s = Array[Numerator@ Product[1 - 1/Prime[k], {k, # - 1}] &, nn]; t = Nest[Append[#, #[[-1]] (Prime[Length@ #] - 1)]&, {1}, nn]; MapIndexed[Function[{m, D, i}, PadRight[{}, t[[i]], ReplacePart[ConstantArray[0, m], Flatten@ Map[Function[d, Map[# -> d &, m/d Select[Range[d], GCD[#, d] == 1 &]]], D]]]] @@ {#1, Divisors@ #1, First[#2]} &, s]]
    (* or, to generate a single denominator of T(n,k) *)
    f[n_, k_] := #/GCD[#, Mod[k, #]] &@ Numerator@ Product[1 - 1/Prime[i], {i, n - 1}]

Formula

T(n,k) = m/GCD(k (mod m), m) with m = A038110(n).
Row lengths: A005867(n).

A372730 Number of primes <= A005867(n).

Original entry on oeis.org

0, 0, 1, 4, 15, 92, 757, 8899, 125261, 2232782, 51902553, 1327191561, 41351244491, 1452937916515, 54332144724834, 2246960940148460, 105818707666943651, 5595105626396158784, 308241771351984486729, 18772520681296116861073
Offset: 0

Views

Author

Alexandre Herrera, May 11 2024

Keywords

Examples

			a(3) = 4 because there are 4 primes less than A005867(3) = 8: 2, 3, 5 and 7.
		

Crossrefs

Programs

  • PARI
    A372730(n) = primepi(prod(k=1, n, prime(k)-1)); \\ Antti Karttunen, May 22 2024
  • Python
    from sympy import prime,primepi
    p = 1
    l = [0]
    for i in range(1,12):
        p *= (prime(i) - 1)
        l.append(primepi(p))
    print(l)
    

Formula

a(n) = A000720(A005867(n)).

Extensions

a(9)-a(11) from Antti Karttunen, May 22 2024
a(12)-a(16) from Amiram Eldar, May 22 2024
a(17)-a(18) from Chai Wah Wu, Jun 04 2024
a(19) from Chai Wah Wu, Jun 05 2024

A065412 a(n) = (A005867(n+1) - A000165(n))/96.

Original entry on oeis.org

0, 0, 0, 0, 1, 20, 480, 10560, 272640, 8709120, 280627200, 10644480000, 439404134400, 18781972070400, 873535419187200, 45751167221760000, 2665172872986624000, 160281737951182848000, 10593163661832880128000
Offset: 0

Views

Author

Alford Arnold, Nov 23 2001

Keywords

Comments

A005867 can be generated recursively using A006093 and A000165 can be generated recursively using the even numbers. Since all primes after 2 are odd, (A005867 - A000165)/96 is an integer.

Examples

			A005867(n+1) begins 1, 2, 8, 48, 480, 5760, 92160, ...
A000165(n) begins   1, 2, 8, 48, 384, 3840, 46080, ...
difference begins   0, 0, 0,  0,  96, 1920, 46080, ... .
		

Crossrefs

Extensions

More terms from Jason Earls, Apr 23 2002

A319039 Triangle read by rows: T(n,k), n >= 1, k = 0..A005867(n), is the smallest integer m > 0 such that the interval [P(n)*m+1, P(n)*(m+1)] includes exactly k primes, where P(n) = A002110(n) is the n-th primorial, or 0 if no such m exists.

Original entry on oeis.org

4, 1, 15, 4, 1, 360, 83, 17, 26, 10, 4, 3, 1, 0, 1751793, 235449, 60110, 10471, 17110, 8495, 6288, 3182, 2452, 1349, 331, 348, 446, 223, 249, 205, 111, 67, 55, 63, 28, 37, 14, 21, 18, 11, 10, 6, 551, 5, 4, 7, 3, 2
Offset: 1

Views

Author

Jon E. Schoenfield, Dec 13 2018

Keywords

Comments

For any interval I of length P(n) that starts beyond prime(n), divisibility by one or more of the first n primes limits the maximum number of primes in I to Product_{j=1..n} (prime(j) - 1) = A005867(n). Beyond this, for n >= 3, divisibility by primes larger than prime(n) (but smaller than P(n)) ensures that T(n,k)=0 for one or more terms at the end of the row. E.g., for every value of m mod 7, at least one of the A005867(3) = 8 numbers in [30*m+1, 30*(m+1)] that is not divisible by 2, 3, or 5 -- i.e., at least one of the 8 numbers {M+1, M+7, M+11, M+13, M+17, M+19, M+23, M+29} where M=30*m -- will be divisible by 7, so T(3,8)=0. A similar argument shows that T(4,46) = T(4,47) = T(4,48) = 0.

Examples

			Table begins
n=1: [4, 1];
n=2: [15, 4, 1];
n=3: [360, 83, 17, 26, 10, 4, 3, 1, 0];
n=4: [1751793, 235449, 60110, 10471, 17110, 8495, 6288, 3182, 2452, 1349, 331, 348, 446, 223, 249, 205, 111, 67, 55, 63, 28, 37, 14, 21, 18, 11, 10, 6, 551, 5, 4, 7, 3, 2, ?, 1, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 0, 0, 0];
		

Crossrefs

A000720 pi(n), the number of primes <= n. Sometimes called PrimePi(n) to distinguish it from the number 3.14159...

Original entry on oeis.org

0, 1, 2, 2, 3, 3, 4, 4, 4, 4, 5, 5, 6, 6, 6, 6, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 10, 10, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 17, 17, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19, 20, 20, 21, 21, 21, 21, 21, 21
Offset: 1

Views

Author

Keywords

Comments

Partial sums of A010051 (characteristic function of primes). - Jeremy Gardiner, Aug 13 2002
pi(n) and prime(n) are inverse functions: a(A000040(n)) = n and A000040(n) is the least number m such that A000040(a(m)) = A000040(n). A000040(a(n)) = n if (and only if) n is prime. - Jonathan Sondow, Dec 27 2004
See the additional references and links mentioned in A143227. - Jonathan Sondow, Aug 03 2008
A lower bound that gets better with larger N is that there are at least T prime numbers less than N, where the recursive function T is: T = N - N*Sum_{i=0..T(sqrt(N))} A005867(i)/A002110(i). - Ben Paul Thurston, Aug 23 2010
Number of partitions of 2n into exactly two parts with the smallest part prime. - Wesley Ivan Hurt, Jul 20 2013
Equivalent to the Riemann hypothesis: abs(a(n) - li(n)) < sqrt(n)*log(n)/(8*Pi), for n >= 2657, where li(n) is the logarithmic integral (Lowell Schoenfeld). - Ilya Gutkovskiy, Jul 05 2016
The second Hardy-Littlewood conjecture, that pi(x) + pi(y) >= pi(x + y) for integers x and y with min{x, y} >= 2, is known to hold for (x, y) sufficiently large (Udrescu 1975). - Peter Luschny, Jan 12 2021

Examples

			There are 3 primes <= 6, namely 2, 3 and 5, so pi(6) = 3.
		

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 870.
  • Tom M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, p. 8.
  • Raymond Ayoub, An Introduction to the Analytic Theory of Numbers, Amer. Math. Soc., 1963; p. 129.
  • Florian Cajori, A History of Mathematical Notations, Dover edition (2012), par. 409.
  • Richard Crandall and Carl Pomerance, Prime Numbers: A Computational Perspective, Springer, NY, 2001; see p. 5.
  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, 5th ed., Oxford Univ. Press, 1979, Theorems 6, 7, 420.
  • G. J. O. Jameson, The Prime Number Theorem, Camb. Univ. Press, 2003. [See also the review by D. M. Bressoud (link below).]
  • Władysław Narkiewicz, The Development of Prime Number Theory, Springer-Verlag, 2000.
  • Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See pp. 132-133, 157-184.
  • József Sándor, Dragoslav S. Mitrinovic and Borislav Crstici, Handbook of Number Theory I, Springer Science & Business Media, 2005, Section VII.1. (For inequalities, etc.).
  • 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).
  • Gerald Tenenbaum and Michel Mendès France, Prime Numbers and Their Distribution, AMS Providence RI, 1999.
  • V. Udrescu, Some remarks concerning the conjecture pi(x + y) <= pi(x) + pi(y), Rev. Roumaine Math. Pures Appl. 20 (1975), 1201-1208.

Crossrefs

Closely related:
A099802: Number of primes <= 2n.
A060715: Number of primes between n and 2n (exclusive).
A035250: Number of primes between n and 2n (inclusive).
A038107: Number of primes < n^2.
A014085: Number of primes between n^2 and (n+1)^2.
A007053: Number of primes <= 2^n.
A036378: Number of primes p between powers of 2, 2^n < p <= 2^(n+1).
A006880: Number of primes < 10^n.
A006879: Number of primes with n digits.
A033270: Number of odd primes <= n.
A065855: Number of composites <= n.
For lists of large values of a(n) see, e.g., A005669(n) = a(A002386(n)), A214935(n) = a(A205827(n)).
Related sequences:
Primes (p) and composites (c): A000040, A002808, 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

  • Haskell
    a000720 n = a000720_list !! (n-1)
    a000720_list = scanl1 (+) a010051_list  -- Reinhard Zumkeller, Sep 15 2011
    
  • Magma
    [ #PrimesUpTo(n): n in [1..200] ];  // Bruno Berselli, Jul 06 2011
    
  • Maple
    with(numtheory); A000720 := pi; [ seq(A000720(i),i=1..50) ];
  • Mathematica
    A000720[n_] := PrimePi[n]; Table[ A000720[n], {n, 1, 100} ]
    Array[ PrimePi[ # ]&, 100 ]
    Accumulate[Table[Boole[PrimeQ[n]],{n,100}]] (* Harvey P. Dale, Jan 17 2015 *)
  • PARI
    A000720=vector(100,n,omega(n!)) \\ For illustration only; better use A000720=primepi
    
  • PARI
    vector(300,j,primepi(j)) \\ Joerg Arndt, May 09 2008
    
  • Python
    from sympy import primepi
    for n in range(1,100): print(primepi(n), end=', ') # Stefano Spezia, Nov 30 2018
  • Sage
    [prime_pi(n) for n in range(1, 79)]  # Zerinvary Lajos, Jun 06 2009
    

Formula

The prime number theorem gives the asymptotic expression a(n) ~ n/log(n).
For x > 1, pi(x) < (x / log x) * (1 + 3/(2 log x)). For x >= 59, pi(x) > (x / log x) * (1 + 1/(2 log x)). [Rosser and Schoenfeld]
For x >= 355991, pi(x) < (x / log(x)) * (1 + 1/log(x) + 2.51/(log(x))^2 ). For x >= 599, pi(x) > (x / log(x)) * (1 + 1/log(x)). [Dusart]
For x >= 55, x/(log(x) + 2) < pi(x) < x/(log(x) - 4). [Rosser]
For n > 1, A138194(n) <= a(n) <= A138195(n) (Tschebyscheff, 1850). - Reinhard Zumkeller, Mar 04 2008
For n >= 33, a(n) = 1 + Sum_{j=3..n} ((j-2)! - j*floor((j-2)!/j)) (Hardy and Wright); for n >= 1, a(n) = n - 1 + Sum_{j=2..n} (floor((2 - Sum_{i=1..j} (floor(j/i)-floor((j-1)/i)))/j)) (Ruiz and Sondow 2000). - Benoit Cloitre, Aug 31 2003
a(n) = A001221(A000142(n)). - Benoit Cloitre, Jun 03 2005
G.f.: Sum_{p prime} x^p/(1-x) = b(x)/(1-x), where b(x) is the g.f. for A010051. - Franklin T. Adams-Watters, Jun 15 2006
a(n) = A036234(n) - 1. - Jaroslav Krizek, Mar 23 2009
From Enrique Pérez Herrero, Jul 12 2010: (Start)
a(n) = Sum_{i=2..n} floor((i+1)/A000203(i)).
a(n) = Sum_{i=2..n} floor(A000010(n)/(i-1)).
a(n) = Sum_{i=2..n} floor(2/A000005(n)). (End)
Let pf(n) denote the set of prime factors of an integer n. Then a(n) = card(pf(n!/floor(n/2)!)). - Peter Luschny, Mar 13 2011
a(n) = -Sum_{p <= n} mu(p). - Wesley Ivan Hurt, Jan 04 2013
a(n) = (1/2)*Sum_{p <= n} (mu(p)*d(p)*sigma(p)*phi(p)) + sum_{p <= n} p^2. - Wesley Ivan Hurt, Jan 04 2013
a(1) = 0 and then, for all k >= 1, repeat k A001223(k) times. - Jean-Christophe Hervé, Oct 29 2013
a(n) = n/(log(n) - 1 - Sum_{k=1..m} A233824(k)/log(n)^k + O(1/log(n)^{m+1})) for m > 0. - Jonathan Sondow, Dec 19 2013
a(n) = A001221(A003418(n)). - Eric Desbiaux, May 01 2014
a(n) = Sum_{j=2..n} H(-sin^2 (Pi*(Gamma(j)+1)/j)) where H(x) is the Heaviside step function, taking H(0)=1. - Keshav Raghavan, Jun 18 2016
a(A014076(n)) = (1/2) * (A014076(n) + 1) - n + 1. - Christopher Heiling, Mar 03 2017
From Steven Foster Clark, Sep 25 2018: (Start)
a(n) = Sum_{m=1..n} A143519(m) * floor(n/m).
a(n) = Sum_{m=1..n} A001221(m) * A002321(floor(n/m)) where A002321() is the Mertens function.
a(n) = Sum_{m=1..n} |A143519(m)| * A002819(floor(n/m)) where A002819() is the Liouville Lambda summatory function and |x| is the absolute value of x.
a(n) = Sum_{m=1..n} A137851(m)/m * H(floor(n/m)) where H(n) = Sum_{m=1..n} 1/m is the harmonic number function.
a(n) = Sum_{m=1..log_2(n)} A008683(m) * A025528(floor(n^(1/m))) where A008683() is the Moebius mu function and A025528() is the prime-power counting function.
(End)
Sum_{k=2..n} 1/a(k) ~ (1/2) * log(n)^2 + O(log(n)) (de Koninck and Ivić, 1980). - Amiram Eldar, Mar 08 2021
a(n) ~ 1/(n^(1/n)-1). - Thomas Ordowski, Jan 30 2023
a(n) = Sum_{j=2..n} floor(((j - 1)! + 1)/j - floor((j - 1)!/j)) [Mináč, unpublished] (see Ribenboim, pp. 132-133). - Stefano Spezia, Apr 13 2025
a(n) = n - 1 - Sum_{k=2..floor(log_2(n))} pi_k(n), where pi_k(n) is the number of k-almost primes <= n. - Daniel Suteu, Aug 27 2025

Extensions

Additional links contributed by Lekraj Beedassy, Dec 23 2003
Edited by M. F. Hasler, Apr 27 2018 and (links recovered) Dec 21 2018

A002110 Primorial numbers (first definition): product of first n primes. Sometimes written prime(n)#.

Original entry on oeis.org

1, 2, 6, 30, 210, 2310, 30030, 510510, 9699690, 223092870, 6469693230, 200560490130, 7420738134810, 304250263527210, 13082761331670030, 614889782588491410, 32589158477190044730, 1922760350154212639070, 117288381359406970983270, 7858321551080267055879090
Offset: 0

Views

Author

Keywords

Comments

See A034386 for the second definition of primorial numbers: product of primes in the range 2 to n.
a(n) is the least number N with n distinct prime factors (i.e., omega(N) = n, cf. A001221). - Lekraj Beedassy, Feb 15 2002
Phi(n)/n is a new minimum for each primorial. - Robert G. Wilson v, Jan 10 2004
Smallest number stroked off n times after the n-th sifting process in an Eratosthenes sieve. - Lekraj Beedassy, Mar 31 2005
Apparently each term is a new minimum for phi(x)*sigma(x)/x^2. 6/Pi^2 < sigma(x)*phi(x)/x^2 < 1 for n > 1. - Jud McCranie, Jun 11 2005
Let f be a multiplicative function with f(p) > f(p^k) > 1 (p prime, k > 1), f(p) > f(q) > 1 (p, q prime, p < q). Then the record maxima of f occur at n# for n >= 1. Similarly, if 0 < f(p) < f(p^k) < 1 (p prime, k > 1), 0 < f(p) < f(q) < 1 (p, q prime, p < q), then the record minima of f occur at n# for n >= 1. - David W. Wilson, Oct 23 2006
Wolfe and Hirshberg give ?, ?, ?, ?, ?, 30030, ?, ... as a puzzle.
Records in number of distinct prime divisors. - Artur Jasinski, Apr 06 2008
For n >= 2, the digital roots of a(n) are multiples of 3. - Parthasarathy Nambi, Aug 19 2009 [with corrections by Zak Seidov, Aug 30 2015]
Denominators of the sum of the ratios of consecutive primes (see A094661). - Vladimir Joseph Stephan Orlovsky, Oct 24 2009
Where record values occur in A001221. - Melinda Trang (mewithlinda(AT)yahoo.com), Apr 15 2010
It can be proved that there are at least T prime numbers less than N, where the recursive function T is: T = N - N*Sum_{i = 0..T(sqrt(N))} A005867(i)/A002110(i). This can show for example that at least 0.16*N numbers are primes less than N for 29^2 > N > 23^2. - Ben Paul Thurston, Aug 23 2010
The above comment from Parthasarathy Nambi follows from the observation that digit summing produces a congruent number mod 9, so the digital root of any multiple of 3 is a multiple of 3. prime(n)# is divisible by 3 for n >= 2. - Christian Schulz, Oct 30 2013
The peaks (i.e., local maximums) in a graph of the number of repetitions (i.e., the tally of values) vs. value, as generated by taking the differences of all distinct pairs of odd prime numbers within a contiguous range occur at regular periodic intervals given by the primorial numbers 6 and greater. Larger primorials yield larger (relative) peaks, however the range must be >50% larger than the primorial to be easily observed. Secondary peaks occur at intervals of those "near-primorials" divisible by 6 (e.g., 42). See A259629. Also, periodicity at intervals of 6 and 30 can be observed in the local peaks of all possible sums of two, three or more distinct odd primes within modest contiguous ranges starting from p(2) = 3. - Richard R. Forberg, Jul 01 2015
If a number k and a(n) are coprime and k < (prime(n+1))^b < a(n), where b is an integer, then k has fewer than b prime factors, counting multiplicity (i.e., bigomega(k) < b, cf. A001222). - Isaac Saffold, Dec 03 2017
If n > 0, then a(n) has 2^n unitary divisors (A034444), and a(n) is a record; i.e., if k < a(n) then k has fewer unitary divisors than a(n) has. - Clark Kimberling, Jun 26 2018
Unitary superabundant numbers: numbers k with a record value of the unitary abundancy index, A034448(k)/k > A034448(m)/m for all m < k. - Amiram Eldar, Apr 20 2019
Psi(n)/n is a new maximum for each primorial (psi = A001615) [proof in link: Patrick Sole and Michel Planat, proposition 1 page 2]; compare with comment 2004: Phi(n)/n is a new minimum for each primorial. - Bernard Schott, May 21 2020
The term "primorial" was coined by Harvey Dubner (1987). - Amiram Eldar, Apr 16 2021
a(n)^(1/n) is approximately (n log n)/e. - Charles R Greathouse IV, Jan 03 2023
Subsequence of A267124. - Frank M Jackson, Apr 14 2023

Examples

			a(9) = 23# = 2*3*5*7*11*13*17*19*23 = 223092870 divides the difference 5283234035979900 in the arithmetic progression of 26 primes A204189. - _Jonathan Sondow_, Jan 15 2012
		

References

  • A. Fletcher, J. C. P. Miller, L. Rosenhead and L. J. Comrie, An Index of Mathematical Tables. Vols. 1 and 2, 2nd ed., Blackwell, Oxford and Addison-Wesley, Reading, MA, 1962, Vol. 1, p. 50.
  • G. H. Hardy, Ramanujan: twelve lectures on subjects suggested by his life and work, Cambridge, University Press, 1940, p. 49.
  • P. Ribenboim, The Book of Prime Number Records. Springer-Verlag, NY, 2nd ed., 1989, p. 4.
  • 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).
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 114.
  • D. Wolfe and S. Hirshberg, Underspecified puzzles, in Tribute to A Mathemagician, Peters, 2005, pp. 73-74.

Crossrefs

A034386 gives the second version of the primorial numbers.
Subsequence of A005117 and of A064807. Apart from the first term, a subsequence of A083207.
Cf. A001615, A002182, A002201, A003418, A005235, A006862, A034444 (unitary divisors), A034448, A034387, A033188, A035345, A035346, A036691 (compositorial numbers), A049345 (primorial base representation), A057588, A060735 (and integer multiples), A061742 (squares), A072938, A079266, A087315, A094348, A106037, A121572, A053589, A064648, A132120, A260188.
Cf. A061720 (first differences), A143293 (partial sums).
Cf. also A276085, A276086.
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

  • Haskell
    a002110 n = product $ take n a000040_list
    a002110_list = scanl (*) 1 a000040_list
    -- Reinhard Zumkeller, Feb 19 2012, May 03 2011
    
  • Magma
    [1] cat [&*[NthPrime(i): i in [1..n]]: n in [1..20]]; // Bruno Berselli, Oct 24 2012
    
  • Magma
    [1] cat [&*PrimesUpTo(p): p in PrimesUpTo(60)]; // Bruno Berselli, Feb 08 2015
    
  • Maple
    A002110 := n -> mul(ithprime(i),i=1..n);
  • Mathematica
    FoldList[Times, 1, Prime[Range[20]]]
    primorial[n_] := Product[Prime[i], {i, n}]; Array[primorial,20] (* José María Grau Ribas, Feb 15 2010 *)
    Join[{1}, Denominator[Accumulate[1/Prime[Range[20]]]]] (* Harvey P. Dale, Apr 11 2012 *)
  • PARI
    a(n)=prod(i=1,n, prime(i)) \\ Washington Bomfim, Sep 23 2008
    
  • PARI
    p=1; for (n=0, 100, if (n, p*=prime(n)); write("b002110.txt", n, " ", p) )  \\ Harry J. Smith, Nov 13 2009
    
  • PARI
    a(n) = factorback(primes(n)) \\ David A. Corneth, May 06 2018
    
  • Python
    from sympy import primorial
    def a(n): return 1 if n < 1 else primorial(n)
    [a(n) for n in range(51)]  # Indranil Ghosh, Mar 29 2017
    
  • Sage
    [sloane.A002110(n) for n in (1..20)] # Giuseppe Coppoletta, Dec 05 2014
    
  • Scheme
    ; with memoization-macro definec
    (definec (A002110 n) (if (zero? n) 1 (* (A000040 n) (A002110 (- n 1))))) ;; Antti Karttunen, Aug 30 2016

Formula

Asymptotic expression for a(n): exp((1 + o(1)) * n * log(n)) where o(1) is the "little o" notation. - Dan Fux (dan.fux(AT)OpenGaia.com or danfux(AT)OpenGaia.com), Apr 08 2001
a(n) = A054842(A002275(n)).
Binomial transform = A136104: (1, 3, 11, 55, 375, 3731, ...). Equals binomial transform of A121572: (1, 1, 3, 17, 119, 1509, ...). - Gary W. Adamson, Dec 14 2007
a(0) = 1, a(n+1) = prime(n)*a(n). - Juri-Stepan Gerasimov, Oct 15 2010
a(n) = Product_{i=1..n} A000040(i). - Jonathan Vos Post, Jul 17 2008
a(A051838(n)) = A116536(n) * A007504(A051838(n)). - Reinhard Zumkeller, Oct 03 2011
A000005(a(n)) = 2^n. - Carlos Eduardo Olivieri, Jun 16 2015
a(n) = A035345(n) - A005235(n) for n > 0. - Jonathan Sondow, Dec 02 2015
For all n >= 0, a(n) = A276085(A000040(n+1)), a(n+1) = A276086(A143293(n)). - Antti Karttunen, Aug 30 2016
A054841(a(n)) = A002275(n). - Michael De Vlieger, Aug 31 2016
a(n) = A270592(2*n+2) - A270592(2*n+1) if 0 <= n <= 4 (conjectured for all n by Alon Kellner). - Jonathan Sondow, Mar 25 2018
Sum_{n>=1} 1/a(n) = A064648. - Amiram Eldar, Oct 16 2020
Sum_{n>=1} (-1)^(n+1)/a(n) = A132120. - Amiram Eldar, Apr 12 2021
Theta being Chebyshev's theta function, a(0) = exp(theta(1)), and for n > 0, a(n) = exp(theta(m)) for A000040(n) <= m < A000040(n+1) where m is an integer. - Miles Englezou, Nov 26 2024

A020639 Lpf(n): least prime dividing n (when n > 1); a(1) = 1. Or, smallest prime factor of n, or smallest prime divisor of n.

Original entry on oeis.org

1, 2, 3, 2, 5, 2, 7, 2, 3, 2, 11, 2, 13, 2, 3, 2, 17, 2, 19, 2, 3, 2, 23, 2, 5, 2, 3, 2, 29, 2, 31, 2, 3, 2, 5, 2, 37, 2, 3, 2, 41, 2, 43, 2, 3, 2, 47, 2, 7, 2, 3, 2, 53, 2, 5, 2, 3, 2, 59, 2, 61, 2, 3, 2, 5, 2, 67, 2, 3, 2, 71, 2, 73, 2, 3, 2, 7, 2, 79, 2, 3, 2, 83, 2, 5, 2, 3, 2, 89, 2, 7, 2, 3, 2, 5, 2, 97
Offset: 1

Views

Author

Keywords

Comments

Also, the largest number of distinct integers such that all their pairwise differences are coprime to n. - Max Alekseyev, Mar 17 2006
The unit 1 is not a prime number (although it has been considered so in the past). 1 is the empty product of prime numbers, thus 1 has no least prime factor. - Daniel Forgues, Jul 05 2011
a(n) = least m > 0 for which n! + m and n - m are not relatively prime. - Clark Kimberling, Jul 21 2012
For n > 1, a(n) = the smallest k > 1 that divides n. - Antti Karttunen, Feb 01 2014
For n > 1, records are at prime indices. - Zak Seidov, Apr 29 2015
The initials "lpf" might be mistaken for "largest prime factor" (A009190), using "spf" for "smallest prime factor" would avoid this. - M. F. Hasler, Jul 29 2015
n = 89 is the first index > 1 for which a(n) differs from the smallest k > 1 such that (2^k + n - 2)/k is an integer. - M. F. Hasler, Aug 11 2015
From Stanislav Sykora, Jul 29 2017: (Start)
For n > 1, a(n) is also the smallest k, 1 < k <= n, for which the binomial(n,k) is not divisible by n.
Proof: (A) When k and n are relatively prime then binomial(n,k) is divisible by n because k*binomial(n,k) = n*binomial(n-1,k-1). (B) When gcd(n,k) > 1, one of its prime factors is the smallest; let us denote it p, p <= k, and consider the binomial(n,p) = (1/p!)*Product_{i=0..p-1} (n-i). Since p is a divisor of n, it cannot be a divisor of any of the remaining numerator factors. It follows that, denoting as e the largest e > 0 such that p^e|n, the numerator is divisible by p^e but not by p^(e+1). Hence, the binomial is divisible by p^(e-1) but not by p^e and therefore not divisible by n. Applying (A), (B) to all considered values of k completes the proof. (End)
From Bob Selcoe, Oct 11 2017, edited by M. F. Hasler, Nov 06 2017: (Start)
a(n) = prime(j) when n == J (mod A002110(j)), n, j >= 1, where J is the set of numbers <= A002110(j) with smallest prime factor = prime(j). The number of terms in J is A005867(j-1). So:
a(n) = 2 when n == 0 (mod 2);
a(n) = 3 when n == 3 (mod 6);
a(n) = 5 when n == 5 or 25 (mod 30);
a(n) = 7 when n == 7, 49, 77, 91, 119, 133, 161 or 203 (mod 210);
etc. (End)
For n > 1, a(n) is the leftmost term, other than 0 or 1, in the n-th row of A127093. - Davis Smith, Mar 05 2019

References

  • D. S. Mitrinovic et al., Handbook of Number Theory, Kluwer, Section IV.1.

Crossrefs

Cf. A090368 (bisection).
Cf. A046669 (partial sums), A072486 (partial products).
Cf. A127093.

Programs

  • Haskell
    a020639 n = spf a000040_list where
      spf (p:ps) | n < p^2      = n
                 | mod n p == 0 = p
                 | otherwise    = spf ps
    -- Reinhard Zumkeller, Jul 13 2011
    
  • Maple
    A020639 := proc(n) if n = 1 then 1; else min(op(numtheory[factorset](n))) ; end if; end proc: seq(A020639(n),n=1..20) ; # R. J. Mathar, Oct 25 2010
  • Mathematica
    f[n_]:=FactorInteger[n][[1,1]]; Join[{1}, Array[f,120,2]]  (* Robert G. Wilson v, Apr 06 2011 *)
    Join[{1}, Table[If[EvenQ[n], 2, FactorInteger[n][[1,1]]], {n, 2, 120}]] (* Zak Seidov, Nov 17 2013 *)
    Riffle[Join[{1},Table[FactorInteger[n][[1,1]],{n,3,101,2}]],2] (* Harvey P. Dale, Dec 16 2021 *)
  • PARI
    A020639(n) = { vecmin(factor(n)[,1]) } \\ [Will yield an error for n = 1.] - R. J. Mathar, Mar 02 2012
    
  • PARI
    A020639(n)=if(n>1, if(n>n=factor(n,0)[1,1], n, factor(n)[1,1]), 1) \\ Avoids complete factorization if possible. Often the smallest prime factor can be found quickly even if it is larger than primelimit. If factoring takes too long for large n, use debugging level >= 3 (\g3) to display the smallest factor as soon as it is found. - M. F. Hasler, Jul 29 2015
    
  • Python
    from sympy import factorint
    def a(n): return 1 if n == 1 else min(factorint(n))
    print([a(n) for n in range(1, 98)]) # Michael S. Branicky, Dec 09 2021
  • Sage
    def A020639_list(n) : return [1] + [prime_divisors(n)[0] for n in (2..n)]
    A020639_list(97) # Peter Luschny, Jul 16 2012
    
  • Sage
    [trial_division(n) for n in (1..100)] # Giuseppe Coppoletta, May 25 2016
    
  • Scheme
    (define (A020639 n) (if (< n 2) n (let loop ((k 2)) (cond ((zero? (modulo n k)) k) (else (loop (+ 1 k))))))) ;; Antti Karttunen, Feb 01 2014
    

Formula

A014673(n) = a(A032742(n)); A115561(n) = a(A054576(n)). - Reinhard Zumkeller, Mar 10 2006
A028233(n) = a(n)^A067029(n). - Reinhard Zumkeller, May 13 2006
a(n) = A027746(n,1) = A027748(n,1). - Reinhard Zumkeller, Aug 27 2011
For n > 1: a(n) = A240694(n,2). - Reinhard Zumkeller, Apr 10 2014
a(n) = A000040(A055396(n)) = n / A032742(n). - Antti Karttunen, Mar 07 2017
a(n) has average order n/(2 log n) [Brouwer] - N. J. A. Sloane, Sep 03 2017

Extensions

Deleted wrong comment from M. Lagneau in 2012, following an observation by Gionata Neri. - M. F. Hasler, Aug 11 2015
Edited by M. F. Hasler, Nov 06 2017
Expanded definition to make this easier to find. - N. J. A. Sloane, Sep 21 2020
Showing 1-10 of 106 results. Next