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

A068488 m for which p(m) is the least prime dividing #p(n) + 1, i.e., primorial n-th prime augmented by 1 (A005234).

Original entry on oeis.org

2, 4, 11, 47, 344, 17, 8, 69, 66, 67, 8028643011, 42, 18, 39, 162, 21, 59, 48, 2311331257, 179, 369, 2477, 23289, 32, 172011, 75668, 342, 35, 28757, 356411, 243, 297, 152
Offset: 1

Views

Author

Lekraj Beedassy, Mar 11 2002

Keywords

Comments

Since #P34 + 1 has two rather large factors, we need the number of primes less than or equal to 678279959005528882498681487.

Crossrefs

Cf. A068489.

Programs

  • Mathematica
    Do[ Print[ PrimePi[ FactorInteger[ Product[ Prime[k], {k, 1, n}] + 1] [[1, 1]]]], {n, 1, 20} ]

Formula

a(n) = PrimePi(A051342).

Extensions

Edited and extended by Robert G. Wilson v, Mar 12 2002

A002109 Hyperfactorials: Product_{k = 1..n} k^k.

Original entry on oeis.org

1, 1, 4, 108, 27648, 86400000, 4031078400000, 3319766398771200000, 55696437941726556979200000, 21577941222941856209168026828800000, 215779412229418562091680268288000000000000000, 61564384586635053951550731889313964883968000000000000000
Offset: 0

Views

Author

Keywords

Comments

A054374 gives the discriminants of the Hermite polynomials in the conventional (physicists') normalization, and A002109 (this sequence) gives the discriminants of the Hermite polynomials in the (in my opinion more natural) probabilists' normalization. See refs Wikipedia and Szego, eq. (6.71.7). - Alan Sokal, Mar 02 2012
a(n) = (-1)^n/det(M_n) where M_n is the n X n matrix m(i,j) = (-1)^i/i^j. - Benoit Cloitre, May 28 2002
a(n) = determinant of the n X n matrix M(n) where m(i,j) = B(n,i,j) and B(n,i,x) denote the Bernstein polynomial: B(n,i,x) = binomial(n,i)*(1-x)^(n-i)*x^i. - Benoit Cloitre, Feb 02 2003
Partial products of A000312. - Reinhard Zumkeller, Jul 07 2012
Number of trailing zeros (A246839) increases every 5 terms since the exponent of the factor 5 increases every 5 terms and the exponent of the factor 2 increases every 2 terms. - Chai Wah Wu, Sep 03 2014
Also the number of minimum distinguishing labelings in the n-triangular honeycomb rook graph. - Eric W. Weisstein, Jul 14 2017
Also shows up in a term in the solution to the generalized version of Raabe's integral. - Jibran Iqbal Shah, Apr 24 2021

References

  • Steven R. Finch, Mathematical Constants, Cambridge, 2003, pp. 135-145.
  • 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.
  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 1990, p. 477.
  • 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).
  • G. Szego, Orthogonal Polynomials, American Mathematical Society, 1981 edition, 432 Pages.

Crossrefs

Cf. A074962 [Glaisher-Kinkelin constant, also gives an asymptotic approximation for the hyperfactorials].
Cf. A246839 (trailing 0's).
Cf. A261175 (number of digits).

Programs

  • Haskell
    a002109 n = a002109_list !! n
    a002109_list = scanl1 (*) a000312_list  -- Reinhard Zumkeller, Jul 07 2012
    
  • Maple
    f := proc(n) local k; mul(k^k,k=1..n); end;
    A002109 := n -> exp(Zeta(1,-1,n+1)-Zeta(1,-1));
    seq(simplify(A002109(n)),n=0..11); # Peter Luschny, Jun 23 2012
  • Mathematica
    Table[Hyperfactorial[n], {n, 0, 11}] (* Zerinvary Lajos, Jul 10 2009 *)
    Hyperfactorial[Range[0, 11]] (* Eric W. Weisstein, Jul 14 2017 *)
    Join[{1},FoldList[Times,#^#&/@Range[15]]] (* Harvey P. Dale, Nov 02 2023 *)
  • PARI
    a(n)=prod(k=2,n,k^k) \\ Charles R Greathouse IV, Jan 12 2012
    
  • PARI
    a(n)=polcoeff(1-sum(k=0, n-1, a(k)*x^k/prod(j=1,k+1,(1+j^j*x+x*O(x^n)) )), n) \\ Paul D. Hanna, Oct 02 2013
    
  • Python
    A002109 = [1]
    for n in range(1, 10):
        A002109.append(A002109[-1]*n**n) # Chai Wah Wu, Sep 03 2014
    
  • Sage
    a = lambda n: prod(falling_factorial(n,k) for k in (1..n))
    [a(n) for n in (0..10)]  # Peter Luschny, Nov 29 2015

Formula

a(n)*A000178(n-1) = (n!)^n = A036740(n) for n >= 1.
Determinant of n X n matrix m(i, j) = binomial(i*j, i). - Benoit Cloitre, Aug 27 2003
a(n) = exp(zeta'(-1, n + 1) - zeta'(-1)) where zeta(s, z) is the Hurwitz zeta function. - Peter Luschny, Jun 23 2012
G.f.: 1 = Sum_{n>=0} a(n)*x^n / Product_{k=1..n+1} (1 + k^k*x). - Paul D. Hanna, Oct 02 2013
a(n) = A240993(n) / A000142(n+1). - Reinhard Zumkeller, Aug 31 2014
a(n) ~ A * n^(n*(n+1)/2 + 1/12) / exp(n^2/4), where A = 1.2824271291006226368753425... is the Glaisher-Kinkelin constant (see A074962). - Vaclav Kotesovec, Feb 20 2015
a(n) = Product_{k=1..n} ff(n,k) where ff denotes the falling factorial. - Peter Luschny, Nov 29 2015
log a(n) = (1/2) n^2 log n - (1/4) n^2 + (1/2) n log n + (1/12) log n + log(A) + o(1), where log(A) = A225746 is the logarithm of Glaisher's constant. - Charles R Greathouse IV, Mar 27 2020
From Amiram Eldar, Apr 30 2023: (Start)
Sum_{n>=1} 1/a(n) = A347345.
Sum_{n>=1} (-1)^(n+1)/a(n) = A347352. (End)
From Andrea Pinos, Apr 04 2024: (Start)
a(n) = e^(Integral_{x=1..n+1} (x - 1/2 - log(sqrt(2*Pi)) + (n+1-x)*Psi(x)) dx), where Psi(x) is the digamma function.
a(n) = e^(Integral_{x=1..n} (x + 1/2 - log(sqrt(2*Pi)) + log(Gamma(x+1))) dx). (End)

A014545 Numbers k such that the k-th Euclid number A006862(k) = 1 + (Product of first k primes) is prime.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 11, 75, 171, 172, 384, 457, 616, 643, 1391, 1613, 2122, 2647, 2673, 4413, 13494, 31260, 33237, 304723, 365071, 436504, 498865, 637491
Offset: 1

Views

Author

Keywords

Examples

			a(1) = 0 because the (empty) product of 0 primes is 1, plus 1 yields the prime 2.
prime(4413) = 42209 and Primorial(4413) + 1 = 42209# + 1 is a 18241-digit prime.
prime(13494) = 145823 and Primorial(13494) + 1 = 145823# + 1 is a 63142-digit prime.
		

References

  • J.-M. De Koninck, Ces nombres qui nous fascinent, Entry 211, p. 61, Ellipses, Paris 2008.
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 114.

Crossrefs

Cf. A005234 (values of p such that 1 + product of primes <= p is prime).
Cf. A018239 (primorial plus 1 primes).

Programs

  • Maple
    P:= 1:
    p:= 1:
    count:= 0:
    for n from 1 to 1000 do
      p:= nextprime(p);
      P:= P*p;
      if isprime(P+1) then
        count:= count+1;
        A[count]:= n;
      fi
    od:
    seq(A[i], i=1..count); # Robert Israel, Nov 04 2015
  • Mathematica
    Flatten[Position[Rest[FoldList[Times,1,Prime[Range[180]]]]+1,?PrimeQ]] (* _Harvey P. Dale, May 04 2012 *) (* this program generates the first 9 positive terms of the sequence; changing the Range constant to 33237 will generate all 23 terms above, but it will take a long time to do so *)
  • PARI
    is(n)=ispseudoprime(prod(i=1,n,prime(i))+1) \\ Charles R Greathouse IV, Mar 21 2013
    
  • PARI
    P=1; n=0; forprime(p=1, 10^5, if(ispseudoprime(P+1), print1(n", ")); n=n+1; P*=p;) \\ Hans Loeblich, May 10 2019

Formula

a(n+1) = A000720(A005234(n)). - M. F. Hasler, May 31 2018

Extensions

More terms from Labos Elemer
a(21) from Arlin Anderson (starship1(AT)gmail.com), Oct 20 2000
a(22)-a(23) from Eric W. Weisstein, Mar 13 2004 (based on information in A057704)
Offset and first term changed by Altug Alkan, Nov 27 2015
a(24) from Jeppe Stig Nielsen, Aug 08 2024
a(25) from Jeppe Stig Nielsen, Sep 01 2024
a(26) from Jeppe Stig Nielsen, Sep 24 2024
a(27) from Jeppe Stig Nielsen, Nov 10 2024
a(28) from Jeppe Stig Nielsen, Aug 21 2025

A018239 Primorial primes: primes of the form 1 + product of first k primes, for some k.

Original entry on oeis.org

2, 3, 7, 31, 211, 2311, 200560490131
Offset: 1

Views

Author

Keywords

Comments

Prime numbers that are the sum of two primorial numbers. - Juri-Stepan Gerasimov, Nov 08 2010

Examples

			From _M. F. Hasler_, Jun 23 2019: (Start)
a(1) = 2 = 1 + product of the first 0 primes (i.e., the empty product = 1).
a(2) = 3 = 1 + 2 = 1 + product of the first prime (= 2).
a(3) = 7 = 1 + 2*3 = 1 + product of the first two primes.
a(4) = 31 = 1 + 2*3*5 = 1 + product of the first three primes.
a(5) = 211 = 1 + 2*3*5*7 = 1 + product of the first four primes.
a(6) = 2311 = 1 + 2*3*5*7*11 = 1 + product of the first five primes.
Then the product of the first 6, 7, ..., 9 or 10 primes does not yield a primorial prime, the next one is:
a(7) = 200560490131 = 1 + 2*3*5*7*11*13*17*19*23*29*31 = 1 + product of the first eleven primes,
and so on. See A014545 = (0, 1, 2, 3, 4, 5, 11, 75, 171, 172, ...) for the k's that yield a term. (End)
		

References

  • F. Iacobescu, Smarandache Partition Type and Other Sequences, Bull. Pure Appl. Sciences, Vol. 16E, No. 2 (1997), pp. 237-240.

Crossrefs

Primes in A006862 (primorials plus 1).
A005234 and A014545 (which are the main entries for this sequence) give more terms.
Cf. A002110.

Programs

  • Mathematica
    Select[FoldList[Times, 1, Prime[Range[200]]] + 1, PrimeQ] (* Loreno Heer (helohe(AT)bluewin.ch), Jun 29 2004 *)
  • PARI
    P=1;print1(2); forprime(p=2,1e6, if(isprime(1+P*=p), print1(", "P+1))) \\ Charles R Greathouse IV, Apr 28 2015

Formula

a(n) = 1 + A002110(A014545(n)), where A002110(k) is the product of the first k primes. - M. F. Hasler, Jun 23 2019

Extensions

Edited by N. J. A. Sloane at the suggestion of Vladeta Jovovic, Jun 18 2007
Name edited by M. F. Hasler, Jun 23 2019

A006794 Primorial -1 primes: primes p such that -1 + product of primes up to p is prime.

Original entry on oeis.org

3, 5, 11, 13, 41, 89, 317, 337, 991, 1873, 2053, 2377, 4093, 4297, 4583, 6569, 13033, 15877, 843301, 1098133, 3267113, 4778027, 6354977, 6533299
Offset: 1

Views

Author

Keywords

Comments

Or, p such that primorial(p) - 1 is prime.
Conjecture: if p# - 1 is a prime number, then the previous prime is greater than p# - exp(1)*p. - Arkadiusz Wesolowski, Jun 19 2016

References

  • H. Dubner, Factorial and primorial primes, J. Rec. Math., 19 (No. 3, 1987), 197-203.
  • R. K. Guy, Unsolved Problems in Number Theory, Section A2.
  • Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See pp. 4-5.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • David Wells, The Penguin Dictionary of Curious and Interesting Numbers. Penguin Books, NY, 1986, Revised edition 1987. See p. 111.

Crossrefs

Cf. A057704 (Primorial - 1 prime indices: integers n such that the n-th primorial minus 1 is prime).

Programs

  • Mathematica
    primorial[p_] := Product[Prime[k], {k, 1, PrimePi[p]}]; Select[Prime[Range[1900]], PrimeQ[primorial[#] - 1] &] (* Jean-François Alcover, Mar 16 2011 *)
    Transpose[With[{pr=Prime[Range[2000]]},Select[Thread[{Rest[FoldList[ Times,1,pr]], pr}], PrimeQ[ First[#]-1]&]]][[2]] (* Harvey P. Dale, Jun 21 2011 *)
    With[{p = Prime[Range[200]]}, p[[Flatten[Position[Rest[FoldList[Times, 1, p]] - 1, ?PrimeQ]]]]] (* _Eric W. Weisstein, Nov 03 2015 *)
  • PARI
    is(n)=isprime(n) && ispseudoprime(prod(i=1,primepi(n),prime(i))-1) \\ Charles R Greathouse IV, Apr 29 2015
    
  • Python
    from sympy import nextprime, isprime
    A006794_list, p, q = [], 2, 2
    while p < 10**5:
        if isprime(q-1):
            A006794_list.append(p)
        p = nextprime(p)
        q *= p # Chai Wah Wu, Apr 03 2021

Formula

a(n) = A000040(A057704(n)).
a(n) = prime(A057704(n)).

Extensions

Stated incorrectly in CRC Standard Mathematical Tables and Formulae, 30th ed., 1996, p. 101; corrected in 2nd printing.
Corrected by Arlin Anderson (starship1(AT)gmail.com), who reports that he and Don Robinson have checked this sequence through about 63000 digits without finding another term (Jul 04 2000).
a(19)-a(20) from Eric W. Weisstein, Dec 08 2015 (Mark Rodenkirch confirms based on saved log files that all p < 700000 have been tested)
a(21) from Jeppe Stig Nielsen, Oct 19 2021
a(22)-a(24) from Jeppe Stig Nielsen, Dec 16 2024

A103514 a(n) is the smallest m such that primorial(n)/2 - 2^m is prime.

Original entry on oeis.org

0, 1, 1, 1, 1, 1, 1, 1, 3, 1, 2, 1, 25, 2, 1, 6, 6, 19, 1, 13, 3, 3, 11, 29, 2, 1, 6, 3, 4, 2, 6, 4, 15, 6, 4, 20, 4, 1, 7, 16, 4, 7, 22, 3, 12, 13, 9, 35, 2, 3, 3, 52, 35, 3, 32, 15, 13, 10, 53, 56, 9, 16, 36, 5, 8, 5, 22, 3, 14, 2, 64, 37, 8, 22, 42, 11, 22, 22, 12, 11, 26, 1, 54, 187, 20, 9
Offset: 2

Views

Author

Lei Zhou, Feb 15 2005

Keywords

Examples

			P(2)/2-2^0=2 is prime, so a(2)=0;
P(10)/2-2^3=3234846607 is Prime, so a(10)=3.
		

Crossrefs

Programs

  • Mathematica
    nmax = 2^8192; npd = 1; n = 2; npd = npd*Prime[n]; While[npd < nmax, tn = 1; tt = 2; cp = npd - tt; While[(cp > 1) && (! (PrimeQ[cp])), tn = tn + 1; tt = tt*2; cp = npd - tt]; If[cp < 2, Print["*"], Print[tn]]; n = n + 1; npd = npd*Prime[n]]
    (* Second program: *)
    k = 1; a = {}; Do[k = k*Prime[n]; m = 1; While[ ! PrimeQ[k - 2^m], m++ ]; Print[m]; AppendTo[a, m], {n, 2, 200}]; a (* Artur Jasinski, Apr 21 2008 *)
  • PARI
    a(n)=my(t=prod(i=2,n,prime(i)),m); while(!isprime(t-2^m),m++); m \\ Charles R Greathouse IV, Apr 28 2015

Extensions

Edited by N. J. A. Sloane, May 16 2008 at the suggestion of R. J. Mathar

A057704 Primorial - 1 prime indices: integers m such that the m-th primorial minus 1 is prime.

Original entry on oeis.org

2, 3, 5, 6, 13, 24, 66, 68, 167, 287, 310, 352, 564, 590, 620, 849, 1552, 1849, 67132, 85586, 234725, 334023, 435582, 446895
Offset: 1

Views

Author

Labos Elemer, Oct 24 2000

Keywords

Comments

There are two versions of "primorial": this is using the definition in A002110. - Robert Israel, Dec 30 2014
As of 28 February 2012, the largest known primorial prime is A002110(85586) - 1 with 476311 digits, found by the PrimeGrid project (see link). - Dmitry Kamenetsky, Aug 11 2015

Examples

			The 6th primorial is A002110(6) = 2*3*5*7*11*13 = 30030, and 30030 - 1 = 30029 is a prime, so 6 is in the sequence.
		

References

  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 114.

Crossrefs

Cf. A006794 (Primorial -1 primes: Primes p such that -1 + product of primes up to p is prime).

Programs

  • Maple
    P:= 1:
    p:= 1:
    count:= 0:
    for n from 1 to 1000 do
      p:= nextprime(p);
      P:= P*p;
      if isprime(P-1) then
        count:= count+1;
        A[count]:= n;
      fi
    od:
    seq(A[i],i=1..count); # Robert Israel, Dec 25 2014
  • Mathematica
    a057704[n_] :=
    Flatten@Position[
    Rest[FoldList[Times, 1, Prime[Range[n]]]] - 1, Integer?PrimeQ]; a057704[500] (* _Michael De Vlieger, Dec 25 2014 *)
  • PARI
    lista(nn) = {s = 1; for(k=1, nn, s *= prime(k); if(ispseudoprime(s - 1), print1(k, ", ")); ); } \\ Altug Alkan, Dec 08 2015
    
  • PARI
    is(n) = ispseudoprime(prod(k=1, n, prime(k)) - 1); \\ Altug Alkan, Dec 08 2015

Formula

a(n) = A000720(A006794(n)).
a(n) = primepi(A006794(n)).

Extensions

Corrected by Holzer Werner, Nov 28 2002
a(19)-a(20) from Eric W. Weisstein, Dec 08 2015 (Mark Rodenkirch confirms based on saved log files that all p < 700,000 have been tested)
a(21) from Jeppe Stig Nielsen, Oct 19 2021
a(22)-a(24) from Jeppe Stig Nielsen, Dec 16 2024

A057706 Smaller of twin primes whose average is a primorial number.

Original entry on oeis.org

5, 29, 2309
Offset: 1

Views

Author

Labos Elemer, Oct 24 2000

Keywords

Comments

According to Caldwell, the next term, if it exists, has more than 100000 digits. - T. D. Noe, May 08 2012

Examples

			(5+7)/2 = 6 = 2*3, (29+31)/2 = 30 = 2*3*5, (2309+2311)/2 = 2310 = 2*3*5*7*11.
		

Crossrefs

Cf. A000040 (primes), A002110 (primorials, p#).
Cf. A006862 (Euclid, p#+1), A005234 (prime p#+1), A014545 (index prime p#+1).
Cf. A057588 (Kummer, p#-1), A006794 (prime p#-1), A057704 (index prime p#-1).

Programs

  • Mathematica
    Select[FoldList[Times, Prime@ Range@ 40], AllTrue[# + {-1, 1}, PrimeQ] &] - 1 (* Michael De Vlieger, Jul 15 2017 *)
  • Python
    from sympy import isprime, prime, primerange
    def auptoprimorial(limit):
      phash, alst = 1, []
      for p in primerange(1, prime(limit)+1):
        phash *= p
        if isprime(phash-1) and isprime(phash+1): alst.append(phash-1)
      return alst
    print(auptoprimorial(5)) # Michael S. Branicky, May 29 2021

Extensions

Offset corrected by Arkadiusz Wesolowski, May 08 2012

A066266 Product of first n primorials + 1.

Original entry on oeis.org

3, 13, 361, 75601, 174636001, 5244319080001, 2677277333530800001, 25968760179275365452000001, 5793445238736255798985527240000001, 37481813439427687898244906452608585200000001, 7517370874372838151564668004911177464757864076000000001
Offset: 1

Views

Author

Patrick De Geest, Dec 16 2001

Keywords

Examples

			a(3)=361 since 361 = (2)*(2*3)*(2*3*5) + 1.
		

Crossrefs

Programs

  • Mathematica
    Table[Times@@Table[Times@@Prime[Range[n]],{n,k}]+1,{k,40}] (* Jayanta Basu, May 12 2013 *)
    Rest[FoldList[Times,1,Rest[FoldList[Times,1,Prime[Range[10]]]]]]+1 (* Harvey P. Dale, Sep 16 2013 *)
  • PARI
    a(n) = 1 + prod(k=1, n, prime(k)^(n-k+1)) \\ Andrew Howroyd, Dec 10 2024

Formula

a(n) = A006939(n) + 1. - Andrew Howroyd, Dec 10 2024

Extensions

Offset changed from 0 to 1 by Harry J. Smith, Feb 08 2010

A066267 Numbers k such that A066266(k) is prime.

Original entry on oeis.org

1, 2, 5, 12, 15, 35
Offset: 1

Views

Author

Patrick De Geest, Dec 16 2001

Keywords

Comments

The next term, if it exists, is greater than 120. - Dmitry Kamenetsky, May 11 2009
The next term, if it exists, is greater than 400. - Michael S. Branicky, Aug 08 2024

Crossrefs

Programs

  • Mathematica
    t={}; Do[If[PrimeQ[Times@@Table[Times@@Prime[Range[n]],{n,k}]+1],AppendTo[t,k]],{k,35}]; t (* Jayanta Basu, May 12 2013 *)

Extensions

Offset changed from 0 to 1 by Harry J. Smith, Feb 08 2010
Name simplified by Jon E. Schoenfield, Oct 25 2019
Showing 1-10 of 22 results. Next