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 12 results. Next

A058256 a(n) = A058254(n+1)/A058254(n).

Original entry on oeis.org

2, 2, 3, 5, 1, 4, 3, 11, 7, 1, 1, 1, 1, 23, 13, 29, 1, 1, 1, 1, 1, 41, 1, 2, 5, 17, 53, 3, 1, 1, 1, 1, 1, 37, 1, 1, 3, 83, 43, 89, 1, 19, 2, 7, 1, 1, 1, 113, 1, 1, 1, 1, 5, 4, 131, 67, 1, 1, 1, 47, 73, 1, 31, 1, 79, 1, 1, 173, 1, 1, 179, 61, 1, 1, 191, 97, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 1

Views

Author

Labos Elemer, Dec 06 2000

Keywords

Comments

a(n) = 1 if in prime(n+1)-1 no new prime divisor or new power of a prime appear, like LCM[{1, 2, 4, 6, 10, 12, 16, 22}]= LCM[{1, 2, 4, 6, 10, 12, 16, 22, 28}].
a(n) > 1 if in prime(n+1)-1 new prime divisor(s) or new power(s) of a prime arise, like in A058254(15) compared with A058254(14), where the new prime divisor is 23 only, so a(14)=23. Such sites of increase do not correspond to the natural order of primes and prime-powers like in A054451.

Crossrefs

Programs

  • PARI
    f(n) = lcm(apply(p->p-1, primes(n))); \\ A058254
    a(n) = f(n+1)/f(n); \\ Michel Marcus, Mar 22 2020

Formula

a(n) = lcm{i=1..n+1} (prime(i)-1) / lcm{i=1..n} (prime(i)-1).

Extensions

Offset corrected by Amiram Eldar, Sep 24 2019

A000040 The prime numbers.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271
Offset: 1

Views

Author

Keywords

Comments

See A065091 for comments, formulas etc. concerning only odd primes. For all information concerning prime powers, see A000961. For contributions concerning "almost primes" see A002808.
A number p is prime if (and only if) it is greater than 1 and has no positive divisors except 1 and p.
A natural number is prime if and only if it has exactly two (positive) divisors.
A prime has exactly one proper positive divisor, 1.
The paper by Kaoru Motose starts as follows: "Let q be a prime divisor of a Mersenne number 2^p-1 where p is prime. Then p is the order of 2 (mod q). Thus p is a divisor of q - 1 and q > p. This shows that there exist infinitely many prime numbers." - Pieter Moree, Oct 14 2004
1 is not a prime, for if the primes included 1, then the factorization of a natural number n into a product of primes would not be unique, since n = n*1.
Prime(n) and pi(n) are inverse functions: A000720(a(n)) = n and a(n) is the least number m such that a(A000720(m)) = a(n). a(A000720(n)) = n if (and only if) n is prime.
Second sequence ever computed by electronic computer, on EDSAC, May 09 1949 (see Renwick link). - Russ Cox, Apr 20 2006
Every prime p > 3 is a linear combination of previous primes prime(n) with nonzero coefficients c(n) and |c(n)| < prime(n). - Amarnath Murthy, Franklin T. Adams-Watters and Joshua Zucker, May 17 2006; clarified by Chayim Lowen, Jul 17 2015
The Greek transliteration of 'Prime Number' is 'Protos Arithmos'. - Daniel Forgues, May 08 2009 [Edited by Petros Hadjicostas, Nov 18 2019]
A number n is prime if and only if it is different from zero and different from a unit and each multiple of n decomposes into factors such that n divides at least one of the factors. This applies equally to the integers (where a prime has exactly four divisors (the definition of divisors is relaxed such that they can be negative)) and the positive integers (where a prime has exactly two distinct divisors). - Peter Luschny, Oct 09 2012
Motivated by his conjecture on representations of integers by alternating sums of consecutive primes, for any positive integer n, Zhi-Wei Sun conjectured that the polynomial P_n(x) = Sum_{k=0..n} a(k+1)*x^k is irreducible over the field of rational numbers with the Galois group S_n, and moreover P_n(x) is irreducible mod a(m) for some m <= n(n+1)/2. It seems that no known criterion on irreducibility of polynomials implies this conjecture. - Zhi-Wei Sun, Mar 23 2013
Questions on a(2n) and Ramanujan primes are in A233739. - Jonathan Sondow, Dec 16 2013
From Hieronymus Fischer, Apr 02 2014: (Start)
Natural numbers such that there is exactly one base b such that the base-b alternate digital sum is 0 (see A239707).
Equivalently: Numbers p > 1 such that b = p-1 is the only base >= 1 for which the base-b alternate digital sum is 0.
Equivalently: Numbers p > 1 such that the base-b alternate digital sum is <> 0 for all bases 1 <= b < p-1. (End)
An integer n > 1 is a prime if and only if it is not the sum of positive integers in arithmetic progression with common difference 2. - Jean-Christophe Hervé, Jun 01 2014
Conjecture: Numbers having prime factors <= prime(n+1) are {k|k^f(n) mod primorial(n)=1}, where f(n) = lcm(prime(i)-1, i=1..n) = A058254(n) and primorial(n) = A002110(n). For example, numbers with no prime divisor <= prime(7) = 17 are {k|k^60 mod 30030=1}. - Gary Detlefs, Jun 07 2014
Cramer conjecture prime(n+1) - prime(n) < C log^2 prime(n) is equivalent to the inequality (log prime(n+1)/log prime(n))^n < e^C, as n tend to infinity, where C is an absolute constant. - Thomas Ordowski, Oct 06 2014
I conjecture that for any positive rational number r there are finitely many primes q_1,...,q_k such that r = Sum_{j=1..k} 1/(q_j-1). For example, 2 = 1/(2-1) + 1/(3-1) + 1/(5-1) + 1/(7-1) + 1/(13-1) with 2, 3, 5, 7 and 13 all prime, 1/7 = 1/(13-1) + 1/(29-1) + 1/(43-1) with 13, 29 and 43 all prime, and 5/7 = 1/(3-1) + 1/(7-1) + 1/(31-1) + 1/(71-1) with 3, 7, 31 and 71 all prime. - Zhi-Wei Sun, Sep 09 2015
I also conjecture that for any positive rational number r there are finitely many primes p_1,...,p_k such that r = Sum_{j=1..k} 1/(p_j+1). For example, 1 = 1/(2+1) + 1/(3+1) + 1/(5+1) + 1/(7+1) + 1/(11+1) + 1/(23+1) with 2, 3, 5, 7, 11 and 23 all prime, and 10/11 = 1/(2+1) + 1/(3+1) + 1/(5+1) + 1/(7+1) + 1/(43+1) + 1/(131+1) + 1/(263+1) with 2, 3, 5, 7, 43, 131 and 263 all prime. - Zhi-Wei Sun, Sep 13 2015
Numbers k such that ((k-2)!!)^2 == +-1 (mod k). - Thomas Ordowski, Aug 27 2016
Does not satisfy Benford's law [Diaconis, 1977; Cohen-Katz, 1984; Berger-Hill, 2017]. - N. J. A. Sloane, Feb 07 2017
Prime numbers are the integer roots of 1 - sin(Pi*Gamma(s)/s)/sin(Pi/s). - Peter Luschny, Feb 23 2018
Conjecture: log log a(n+1) - log log a(n) < 1/n. - Thomas Ordowski, Feb 17 2023

Examples

			From _David A. Corneth_, Oct 22 2024: (Start)
7 is a prime number as it has exactly two divisors, 1 and 7.
8 is not a prime number as it does not have exactly two divisors (it has 1, 2, 4 and 8 as divisors though it is sufficient to find one other divisor than 1 and 8)
55 is not a prime number as it does not have exactly two divisors. One other divisor than 1 and 55 is 5.
59 is a prime number as it has exactly two divisors; 1 and 59. (End)
		

References

  • M. Aigner and G. M. Ziegler, Proofs from The Book, Springer-Verlag, Berlin, 2nd. ed., 2001; see p. 3.
  • T. M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, page 2.
  • E. Bach and Jeffrey Shallit, Algorithmic Number Theory, I, Chaps. 8, 9.
  • D. M. Bressoud, Factorization and Primality Testing, Springer-Verlag NY 1989.
  • M. Cipolla, "La determinazione asintotica dell'n-mo numero primo.", Rend. d. R. Acc. di sc. fis. e mat. di Napoli, s. 3, VIII (1902), pp. 132-166.
  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See pp. 127-149.
  • R. Crandall and C. Pomerance, Prime Numbers: A Computational Perspective, Springer, NY, 2001; see p. 1.
  • Martin Davis, "Algorithms, Equations, and Logic", pp. 4-15 of S. Barry Cooper and Andrew Hodges, Eds., "The Once and Future Turing: Computing the World", Cambridge 2016.
  • J.-P. Delahaye, Merveilleux nombres premiers, Pour la Science-Belin Paris, 2000.
  • J.-P. Delahaye, Savoir si un nombre est premier: facile, Pour La Science, 303(1) 2003, pp. 98-102.
  • M. Dietzfelbinger, Primality Testing in Polynomial Time, Springer NY 2004.
  • M. du Sautoy, The Music of the Primes, Fourth Estate / HarperCollins, 2003; see p. 5.
  • J. Elie, "L'algorithme AKS", in 'Quadrature', No. 60, pp. 22-32, 2006 EDP-sciences, Les Ulis (France);
  • W. & F. Ellison, Prime Numbers, Hermann Paris 1985
  • T. Estermann, Introduction to Modern Prime Number Theory, Camb. Univ. Press, 1969.
  • J. M. Gandhi, Formulae for the nth prime. Proc. Washington State Univ. Conf. on Number Theory, 96-106. Wash. St. Univ., Pullman, Wash., 1971.
  • Jan Gullberg, Mathematics from the Birth of Numbers, W. W. Norton & Co., NY & London, 1997, §3.2 Prime Numbers, pp. 77-78.
  • R. K. Guy, Unsolved Problems Number Theory, Section A.
  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers. 3rd ed., Oxford Univ. Press, 1954, p. 2.
  • Peter Hilton and Jean Pedersen, A Mathematical Tapestry: Demonstrating the Beautiful Unity of Mathematics, Cambridge University Press, 2010, pp. (260-264).
  • H. D. Huskey, Derrick Henry Lehmer [1905-1991]. IEEE Ann. Hist. Comput. 17 (1995), no. 2, 64-68. Math. Rev. 96b:01035, cf. http://www.ams.org/mathscinet-getitem?mr=1336709
  • M. N. Huxley, The Distribution of Prime Numbers, Oxford Univ. Press, 1972.
  • D. S. Jandu, Prime Numbers And Factorization, Infinite Bandwidth Publishing, N. Hollywood CA 2007.
  • E. Landau, Handbuch der Lehre von der Verteilung der Primzahlen, Chelsea, NY, 1974.
  • D. H. Lehmer, The sieve problem for all-purpose computers. Math. Tables and Other Aids to Computation, Math. Tables and Other Aids to Computation, 7, (1953). 6-14. Math. Rev. 14:691e
  • D. N. Lehmer, "List of Prime Numbers from 1 to 10,006,721", Carnegie Institute, Washington, D.C. 1909.
  • W. J. LeVeque, Topics in Number Theory. Addison-Wesley, Reading, MA, 2 vols., 1956, Vol. 1, Chap. 6.
  • H. Lifchitz, Table des nombres premiers de 0 à 20 millions (Tomes I & II), Albert Blanchard, Paris 1971.
  • R. F. Lukes, C. D. Patterson and H. C. Williams, Numerical sieving devices: their history and some applications. Nieuw Arch. Wisk. (4) 13 (1995), no. 1, 113-139. Math. Rev. 96m:11082, cf http://www.ams.org/mathscinet-getitem?mr=96m:11082
  • P. Ribenboim, The New Book of Prime Number Records, Springer-Verlag NY 1995.
  • P. Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004.
  • H. Riesel, Prime Numbers and Computer Methods for Factorization, Birkhäuser Boston, Cambridge MA 1994.
  • B. Rittaud, "31415879. Ce nombre est-il premier?" ['Is this number prime?'], La Recherche, Vol. 361, pp. 70-73, Feb 15 2003, Paris.
  • D. Shanks, Solved and Unsolved Problems in Number Theory, 2nd. ed., Chelsea, 1978, Chap. 1.
  • 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, pages 107-119.
  • D. Wells, Prime Numbers: The Most Mysterious Figures In Math, J. Wiley NY 2005.
  • H. C. Williams and Jeffrey Shallit, Factoring integers before computers. Mathematics of Computation 1943-1993: a half-century of computational mathematics (Vancouver, BC, 1993), 481-531, Proc. Sympos. Appl. Math., 48, AMS, Providence, RI, 1994. Math. Rev. 95m:11143

Crossrefs

For is_prime and next_prime, see A010051 and A151800.
Cf. A000720 ("pi"), A001223 (differences between primes), A002476, A002808, A003627, A006879, A006880, A008578, A080339, A233588.
Cf. primes in lexicographic order: A210757, A210758, A210759, A210760, A210761.
Cf. A003558, A179480 (relating to the Quasi-order theorem of Hilton and Pedersen).
Boustrophedon transforms: A000747, A000732, A230953.
a(2n) = A104272(n) - A233739(n).
Related sequences:
Primes (p) and composites (c): 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

  • GAP
    A000040:=Filtered([1..10^5],IsPrime); # Muniru A Asiru, Sep 04 2017
    
  • Haskell
    -- See also Haskell Wiki Link.
    import Data.List (genericIndex)
    a000040 n = genericIndex a000040_list (n - 1)
    a000040_list = base ++ larger where
    base = [2,3,5,7,11,13,17]
    larger = p : filter prime more
    prime n = all ((> 0) . mod n) $ takeWhile (\x -> x*x <= n) larger
    _ : p : more = roll $ makeWheels base
    roll (Wheel n rs) = [n * k + r | k <- [0..], r <- rs]
    makeWheels = foldl nextSize (Wheel 1 [1])
    nextSize (Wheel size bs) p = Wheel (size * p)
    [r | k <- [0..p-1], b <- bs, let r = size*k+b, mod r p > 0]
    data Wheel = Wheel Integer [Integer]
    -- Reinhard Zumkeller, Apr 07 2014
    
  • Magma
    [n : n in [2..500] | IsPrime(n)];
    
  • Magma
    a := func< n | NthPrime(n) >;
    
  • Maple
    A000040 := n->ithprime(n); [ seq(ithprime(i),i=1..100) ];
    # For illustration purposes only:
    isPrime := s -> is(1 = sin(Pi*GAMMA(s)/s)/sin(Pi/s)):
    select(isPrime, [$2..100]); # Peter Luschny, Feb 23 2018
  • Mathematica
    Prime[Range[60]]
  • Maxima
    A000040(n) := block(
    if n = 1 then return(2),
    return( next_prime(A000040(n-1)))
    )$ /* recursive, to be replaced if possible - R. J. Mathar, Feb 27 2012 */
    
  • PARI
    {a(n) = if( n<1, 0, prime(n))};
    
  • PARI
    /* The following functions provide asymptotic approximations, one based on the asymptotic formula cited above (slight overestimate for n > 10^8), the other one based on pi(x) ~ li(x) = Ei(log(x)) (slight underestimate): */
    prime1(n)=n*(log(n)+log(log(n))-1+(log(log(n))-2)/log(n)-((log(log(n))-6)*log(log(n))+11)/log(n)^2/2)
    prime2(n)=solve(X=n*log(n)/2,2*n*log(n),real(eint1(-log(X)))+n)
    \\ M. F. Hasler, Oct 21 2013
    
  • PARI
    forprime(p=2, 10^3, print1(p, ", ")) \\ Felix Fröhlich, Jun 30 2014
    
  • PARI
    primes(10^5) \\ Altug Alkan, Mar 26 2018
    
  • Python
    from sympy import primerange
    print(list(primerange(2, 272))) # Michael S. Branicky, Apr 30 2022
  • Sage
    a = sloane.A000040
    a.list(58)  # Jaap Spies, 2007
    
  • Sage
    prime_range(1, 300)  # Zerinvary Lajos, May 27 2009
    

Formula

The prime number theorem is the statement that a(n) ~ n * log n as n -> infinity (Hardy and Wright, page 10).
For n >= 2, n*(log n + log log n - 3/2) < a(n); for n >= 20, a(n) < n*(log n + log log n - 1/2). [Rosser and Schoenfeld]
For all n, a(n) > n log n. [Rosser]
n log(n) + n (log log n - 1) < a(n) < n log n + n log log n for n >= 6. [Dusart, quoted in the Wikipedia article]
a(n) = n log n + n log log n + (n/log n)*(log log n - log n - 2) + O( n (log log n)^2/ (log n)^2). [Cipolla, see also Cesàro or the "Prime number theorem" Wikipedia article for more terms in the expansion]
a(n) = 2 + Sum_{k = 2..floor(2n*log(n)+2)} (1-floor(pi(k)/n)), for n > 1, where the formula for pi(k) is given in A000720 (Ruiz and Sondow 2002). - Jonathan Sondow, Mar 06 2004
I conjecture that Sum_{i>=1} (1/(prime(i)*log(prime(i)))) = Pi/2 = 1.570796327...; Sum_{i=1..100000} (1/(prime(i)*log(prime(i)))) = 1.565585514... It converges very slowly. - Miklos Kristof, Feb 12 2007
The last conjecture has been discussed by the math.research newsgroup recently. The sum, which is greater than Pi/2, is shown in sequence A137245. - T. D. Noe, Jan 13 2009
A000005(a(n)) = 2; A002033(a(n+1)) = 1. - Juri-Stepan Gerasimov, Oct 17 2009
A001222(a(n)) = 1. - Juri-Stepan Gerasimov, Nov 10 2009
From Gary Detlefs, Sep 10 2010: (Start)
Conjecture:
a(n) = {n| n! mod n^2 = n(n-1)}, n <> 4.
a(n) = {n| n!*h(n) mod n = n-1}, n <> 4, where h(n) = Sum_{k=1..n} 1/k. (End)
For n = 1..15, a(n) = p + abs(p-3/2) + 1/2, where p = m + int((m-3)/2), and m = n + int((n-2)/8) + int((n-4)/8). - Timothy Hopper, Oct 23 2010
a(2n) <= A104272(n) - 2 for n > 1, and a(2n) ~ A104272(n) as n -> infinity. - Jonathan Sondow, Dec 16 2013
Conjecture: Sequence = {5 and n <> 5| ( Fibonacci(n) mod n = 1 or Fibonacci(n) mod n = n - 1) and 2^(n-1) mod n = 1}. - Gary Detlefs, May 25 2014
Conjecture: Sequence = {5 and n <> 5| ( Fibonacci(n) mod n = 1 or Fibonacci(n) mod n = n - 1) and 2^(3*n) mod 3*n = 8}. - Gary Detlefs, May 28 2014
Satisfies a(n) = 2*n + Sum_{k=1..(a(n)-1)} cot(k*Pi/a(n))*sin(2*k*n^a(n)*Pi/a(n)). - Ilya Gutkovskiy, Jun 29 2016
Sum_{n>=1} 1/a(n)^s = P(s), where P(s) is the prime zeta function. - Eric W. Weisstein, Nov 08 2016
a(n) = floor(1 - log(-1/2 + Sum_{ d | A002110(n-1) } mu(d)/(2^d-1))/log(2)) where mu(d) = A008683(d) [Ghandi, 1971] (see Ribenboim). Golomb gave a proof in 1974: Give each positive integer a probability of W(n) = 1/2^n, then the probability M(d) of the integer multiple of number d equals 1/(2^d-1). Suppose Q = a(1)*a(2)*...*a(n-1) = A002110(n-1), then the probability of random integers that are mutually prime with Q is Sum_{ d | Q } mu(d)*M(d) = Sum_{ d | Q } mu(d)/(2^d-1) = Sum_{ gcd(m, Q) = 1 } W(m) = 1/2 + 1/2^a(n) + 1/2^a(n+1) + 1/2^a(n+2) + ... So ((Sum_{ d | Q } mu(d)/(2^d-1)) - 1/2)*2^a(n) = 1 + x(n), which means that a(n) is the only integer so that 1 < ((Sum_{ d | Q } mu(d)/(2^d-1)) - 1/2)*2^a(n) < 2. - Jinyuan Wang, Apr 08 2019
Conjecture: n * (log(n)+log(log(n))-1+((log(log(n))-A)/log(n))) is asymptotic to a(n) if and only if A=2. - Alain Rocchelli, Feb 12 2025
From Stefano Spezia, Apr 13 2025: (Start)
a(n) = 1 + Sum_{m=1..2^n} floor(floor(n/Sum_{j=1..m} A080339(j))^(1/n)) [Willans, 1964].
a(n) = 1 + Sum_{m=1..2^n} floor(floor(n/(1 + A000720(m)))^(1/n)) [Willans, 1964]. (End)

A005867 a(0) = 1; for n > 0, a(n) = (prime(n)-1)*a(n-1).

Original entry on oeis.org

1, 1, 2, 8, 48, 480, 5760, 92160, 1658880, 36495360, 1021870080, 30656102400, 1103619686400, 44144787456000, 1854081073152000, 85287729364992000, 4434961926979584000, 257227791764815872000, 15433667505888952320000
Offset: 0

Views

Author

Keywords

Comments

Local minima of Euler's phi function. - Walter Nissen
Number of potential primes in a modulus primorial(n+1) sieve. - Robert G. Wilson v, Nov 20 2000
Let p=prime(n) and let p# be the primorial (A002110), then it can be shown that any p# consecutive numbers have exactly a(n-1) numbers whose lowest prime factor is p. For a proof, see the "Proofs Regarding Primorial Patterns" link. For example, if we let p=7 and consider the interval [101,310] containing 210 numbers, we find the 8 numbers 119, 133, 161, 203, 217, 259, 287, 301. - Dennis Martin (dennis.martin(AT)dptechnology.com), Jul 16 2006
From Gary W. Adamson, Apr 21 2009: (Start)
Equals (-1)^n * (1, 1, 1, 2, 8, 48, ...) dot (-1, 2, -3, 5, -7, 11, ...).
a(6) = 480 = (1, 1, 1, 2, 8, 48) dot (-1, 2, -3, 5, -7, 11) = (-1, 2, -3, 10, -56, 528). (End)
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
First column of A096294. - Eric Desbiaux, Jun 20 2013
Conjecture: The g.f. for the prime(n+1)-rough numbers (A000027, A005408, A007310, A007775, A008364, A008365, A008366, A166061, A166063) is x*P(x)/(1-x-x^a(n)+x^(a(n)+1)), where P(x) is an order a(n) polynomial with symmetric coefficients (i.e., c(0)=c(n), c(1)=c(n-1), ...). - Benedict W. J. Irwin, Mar 18 2016
a(n)/A002110(n+1) (primorial(n+1)) is the ratio of natural numbers whose smallest prime factor is prime(n+1); i.e., prime(n+1) coprime to A002110(n). So the ratio of even numbers to natural numbers = 1/2; odd multiples of 3 = 1/6; multiples of 5 coprime to 6 (A084967) = 2/30 = 1/15; multiples of 7 coprime to 30 (A084968) = 8/210 = 4/105; etc. - Bob Selcoe, Aug 11 2016
The 2-adic valuation of a(n) is A057773(n), being sum of the 2-adic valuations of the product terms here. - Kevin Ryde, Jan 03 2023
For n > 1, a(n) is the number of prime(n+1)-rough numbers in [1, primorial(prime(n))]. - Alexandre Herrera, Aug 29 2023

Examples

			a(3): the mod 30 prime remainder set sieve representation yields the remainder set: {1, 7, 11, 13, 17, 19, 23, 29}, 8 elements.
		

References

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

Crossrefs

Cf. A057773 (2-adic valuation).
Column 1 of A281890.

Programs

  • Haskell
    a005867 n = a005867_list !! n
    a005867_list = scanl (*) 1 a006093_list
    -- Reinhard Zumkeller, May 01 2013
  • Maple
    A005867 := proc(n)
        mul(ithprime(j)-1,j=1..n) ;
    end proc: # Zerinvary Lajos, Aug 24 2008, R. J. Mathar, May 03 2017
  • Mathematica
    Table[ Product[ EulerPhi[ Prime[ j ] ], {j, 1, n} ], {n, 1, 20} ]
    RecurrenceTable[{a[0]==1,a[n]==(Prime[n]-1)a[n-1]},a,{n,20}] (* Harvey P. Dale, Dec 09 2013 *)
    EulerPhi@ FoldList[Times, 1, Prime@ Range@ 18] (* Michael De Vlieger, Mar 18 2016 *)
  • PARI
    for(n=0, 22, print1(prod(k=1,n, prime(k)-1), ", "))
    

Formula

a(n) = phi(product of first n primes) = A000010(A002110(n)).
a(n) = Product_{k=1..n} (prime(k)-1) = Product_{k=1..n} A006093(n).
Sum_{n>=0} a(n)/A002110(n+1) = 1. - Bob Selcoe, Jan 09 2015
a(n) = A002110(n)-((1/A000040(n+1) - A038110(n+1)/A038111(n+1))*A002110(n+1)). - Jamie Morken, Mar 27 2019
a(n) = |Sum_{k=0..n} A070918(n,k)|. - Alois P. Heinz, Aug 18 2019
a(n) = A058251(n)/A060753(n+1). - Jamie Morken, Apr 25 2022
a(n) = A002110(n) - A016035(A002110(n)) - 1 for n >= 1. - David James Sycamore, Sep 07 2024
Sum_{n>=0} 1/a(n) = A345974. - Amiram Eldar, Jun 26 2025

Extensions

Offset changed to 0, Name changed, and Comments and Examples sections edited by T. D. Noe, Apr 04 2010

A058255 Distinct values of lcm_{i=1..n} (p(i)-1), where p() are the primes.

Original entry on oeis.org

1, 2, 4, 12, 60, 240, 720, 7920, 55440, 1275120, 16576560, 480720240, 19709529840, 39419059680, 197095298400, 3350620072800, 177582863858400, 532748591575200, 19711697888282400, 59135093664847200
Offset: 1

Views

Author

Labos Elemer, Dec 06 2000

Keywords

Comments

The prime A095365(n) is the least prime yielding an LCM of a(n). This sequence and A095365 are related to A095366. - T. D. Noe, Jun 04 2004

Examples

			For p = 29, 31, 37, 41, 43 these LCMs are equal to 55440 = 11*7! = lcm[1, 2, 4, 6, 10, 12, 16, 22, 28, 30, 36, 40, 42] = lcm[1, 2, 4, 6, 10, 12, 16, 22, 28]. The values was put on the stage only once. Repetitions skipped.
		

Crossrefs

A058254 with duplicates removed.
Cf. A095366 (least k > 1 such that k divides 1^n + 2^n + ... + (k-1)^n).

Programs

  • Mathematica
    Union@ Table[LCM @@ (Prime@ Range[1, n] - 1), {n, 38}] (* Michael De Vlieger, Dec 06 2018 *)

A342996 The number of partitions of the n-th primorial.

Original entry on oeis.org

1, 2, 11, 5604, 9275102575355, 21565010821742923705373368869534441911701199887419
Offset: 0

Views

Author

Alois P. Heinz, Apr 01 2021

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n) b(n):= `if`(n=0, 1, b(n-1)*ithprime(n)) end:
    a:= n-> combinat[numbpart](b(n)):
    seq(a(n), n=0..5);
  • Mathematica
    b[n_] := b[n] = If[n == 0, 1, b[n - 1]*Prime[n]];
    a[n_] := PartitionsP[b[n]];
    Table[a[n], {n, 0, 5}] (* Jean-François Alcover, Jul 07 2021, from Maple *)
  • PARI
    a(n) = numbpart(prod(k=1, n, prime(k))); \\ Michel Marcus, Jul 07 2021
  • Python
    from sympy import primorial
    from sympy.functions import partition
    def A342996(n): return partition(primorial(n)) if n > 0 else 1 # Chai Wah Wu, Apr 03 2021
    

Formula

a(n) = A000041(A002110(n)).

A343147 The number of partitions of the n-th primorial into distinct parts.

Original entry on oeis.org

1, 1, 4, 296, 884987529, 41144767887910339859917073881177514
Offset: 0

Views

Author

Alois P. Heinz, Apr 06 2021

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n) b(n):= `if`(n=0, 1, b(n-1)*ithprime(n)) end:
    g:= proc(n) option remember; `if`(n=0, 1, add(g(n-j)*add(
         `if`(d::odd, d, 0), d=numtheory[divisors](j)), j=1..n)/n)
        end:
    a:= n-> g(b(n)):
    seq(a(n), n=0..5);
  • Mathematica
    $RecursionLimit = 2^13;
    b[n_] := b[n] = If[n == 0, 1, b[n - 1]*Prime[n]];
    g[n_] := g[n] = If[n == 0, 1, Sum[g[n - j]*Sum[
         If[OddQ[d], d, 0], {d, Divisors[j]}], {j, 1, n}]/n];
    a[n_] := g[b[n]];
    Table[a[n], {n, 0, 5}] (* Jean-François Alcover, May 02 2022, after Alois P. Heinz *)

Formula

a(n) = A000009(A002110(n)).

A085272 a(n) = lcm_{k=1..n} (prime(k) + 1).

Original entry on oeis.org

3, 12, 12, 24, 24, 168, 504, 2520, 2520, 2520, 10080, 191520, 191520, 2106720, 2106720, 6320160, 6320160, 195924960, 3330724320, 3330724320, 123236799840, 123236799840, 123236799840, 123236799840, 862657598880, 862657598880
Offset: 1

Views

Author

Reinhard Zumkeller, Aug 12 2003

Keywords

Examples

			a(6) = lcm(2+1, 3+1, 5+1, 7+1, 11+1, 13+1) = lcm(3, 2^2, 2*3, 2^3, 3*2^2, 2*7) = 7*3*2^3 = 168.
		

Crossrefs

Programs

  • PARI
    a(n) = lcm(vector(n, k, prime(k)+1)); \\ Michel Marcus, Mar 15 2018

A272590 a(n) is the smallest number m such that the multiplicative group modulo m is the direct product of n cyclic groups.

Original entry on oeis.org

2, 8, 24, 120, 840, 9240, 120120, 2042040, 38798760, 892371480, 25878772920, 802241960520, 29682952539240, 1217001054108840, 52331045326680120, 2459559130353965640, 130356633908760178920, 7691041400616850556280, 469153525437627883933080, 31433286204321068223516360
Offset: 1

Views

Author

Joerg Arndt, May 05 2016

Keywords

Comments

Arguably a(1)=3, as the multiplicative group mod 2 has only one element, hence its factorization is the empty product. - Joerg Arndt, May 18 2018
For n >= 2, positions of records of A046072. - Joerg Arndt, May 18 2018

Crossrefs

Numbers n such that the multiplicative group modulo n is the direct product of k cyclic groups: A033948 (k=1), A272593 (k=2), A272593 (k=3), A272594 (k=4), A272595 (k=5), A272596 (k=6), A272597 (k=7), A272598 (k=8), A272599 (k=9).

Programs

  • PARI
    a(n)=if(n==1,2,4*prod(k=1,n-1,prime(k)));

Formula

a(1) = 2, a(n) = 4 * prod(k=1..n-1, prime(k) ) for n >= 2.
a(n) = A102476(n) for n >= 2.
A002322(a(n)) = A058254(n).

A343119 Number of compositions (ordered partitions) of the n-th primorial into distinct parts.

Original entry on oeis.org

1, 1, 11, 41867, 517934206090276988507, 42635439758725572299058305546953458030363703549127905691758491973278624456679699932948789006991639715987
Offset: 0

Views

Author

Alois P. Heinz, Apr 09 2021

Keywords

Comments

All terms are odd.

Crossrefs

Programs

  • Maple
    b:= proc(n) b(n):= `if`(n=0, 1, b(n-1)*ithprime(n)) end:
    g:= proc(n, k) option remember; `if`(k<0 or n<0, 0,
         `if`(k=0, `if`(n=0, 1, 0), g(n-k, k)+k*g(n-k, k-1)))
        end:
    a:= n-> add(g(b(n), k), k=0..floor((sqrt(8*b(n)+1)-1)/2)):
    seq(a(n), n=0..5);
  • Mathematica
    $RecursionLimit = 5000;
    b[n_] := If[n == 0, 1, b[n - 1]*Prime[n]];
    g[n_, k_] := g[n, k] = If[k < 0 || n < 0, 0,
         If[k == 0, If[n == 0, 1, 0], g[n - k, k] + k*g[n - k, k - 1]]];
    a[n_] := Sum[g[b[n], k], {k, 0, Floor[(Sqrt[8*b[n] + 1] - 1)/2]}];
    Table[a[n], {n, 0, 5}] (* Jean-François Alcover, Apr 14 2022, after Alois P. Heinz *)

Formula

a(n) = A032020(A002110(n)).

A362266 Triangle read by rows: T(n,k) = LCM({p_j-1 : j=1..n})/(p_k-1) for prime p.

Original entry on oeis.org

1, 2, 1, 4, 2, 1, 12, 6, 3, 2, 60, 30, 15, 10, 6, 60, 30, 15, 10, 6, 5, 240, 120, 60, 40, 24, 20, 15, 720, 360, 180, 120, 72, 60, 45, 40, 7920, 3960, 1980, 1320, 792, 660, 495, 440, 360, 55440, 27720, 13860, 9240, 5544, 4620, 3465, 3080, 2520, 1980
Offset: 1

Views

Author

Michael De Vlieger, Jul 10 2023

Keywords

Examples

			First 10 rows of the triangle:
   1:      1
   2:      2      1
   3:      4      2      1
   4:     12      6      3     2
   5:     60     30     15    10     6
   6:     60     30     15    10     6     5
   7:    240    120     60    40    24    20    15
   8:    720    360    180   120    72    60    45    40
   9:   7920   3960   1980  1320   792   660   495   440   360
  10:  55440  27720  13860  9240  5544  4620  3465  3080  2520  1980
  ...
		

Crossrefs

Programs

  • Mathematica
    nn = 10; Array[Set[s[#], Prime[#] - 1] &, nn + 1]; Flatten@ Table[Table[#/s[k], {k, n}] &[LCM @@ Array[s, n]], {n, nn}]
  • PARI
    row(n) = my(L=lcm(apply(p->p-1, primes(n)))); vector(n, k, L/(prime(k)-1)); \\ Michel Marcus, Jul 15 2023

Formula

T(n,1) = A058254(n), T(n,k) = A058254(n)/A006093(k).
Showing 1-10 of 12 results. Next