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

A091312 Erroneous version of A018239.

Original entry on oeis.org

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

Views

Author

Keywords

A096350 Duplicate of A018239.

Original entry on oeis.org

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

Views

Author

Keywords

A172239 Partial sums of primorial primes A018239.

Original entry on oeis.org

2, 5, 12, 43, 254, 2565, 200560492696, 1719620105458406433483340568317543019584575635895742560438771105058321655238562613083979651479555788009994557822024565226932906295208262756822476224186807
Offset: 1

Views

Author

Jonathan Vos Post, Jan 29 2010

Keywords

Comments

The subsequence of primes in this sequence begin: a(1) = 2, a(2) = 5, a(4) = 43. The subsubsequence of primorial prime partial sums of primorial primes begins 2, 5. Will someone extend these subsequences?

Examples

			a(4) = 2 + 3 + 7 + 31 = 43, which is prime, but not primorial prime.
		

Crossrefs

Formula

a(n) = SUM[i=1..n] A018239(i) = SUM[i=1..n] {p in A006862 and p prime} = SUM[i=1..n] (1 + Product[j=1..i] A000040(i)).

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)

A006862 Euclid numbers: 1 + product of the first n primes.

Original entry on oeis.org

2, 3, 7, 31, 211, 2311, 30031, 510511, 9699691, 223092871, 6469693231, 200560490131, 7420738134811, 304250263527211, 13082761331670031, 614889782588491411, 32589158477190044731, 1922760350154212639071, 117288381359406970983271, 7858321551080267055879091
Offset: 0

Views

Author

Keywords

Comments

It is an open question whether all terms of this sequence are squarefree.
a(n) is the smallest x > 1 such that x^prime(n) == 1 (mod prime(i)) i=1,2,3,...,n-1. - Benoit Cloitre, May 30 2002
Numbers n such that n/phi(n-1) is a record. - Arkadiusz Wesolowski, Nov 22 2012
Nyblom (theorem 2.3) proves that this sequence contains no proper powers, e.g., is a subsequence of A007916. - Charles R Greathouse IV, Mar 02 2016
It is an open question if there are an infinite number of prime Euclid numbers. - Mike Winkler, Feb 05 2017
These numbers are not pairwise relatively prime; the first example is gcd(a(7), a(17)) = 277. Also gcd(a(47), a(131)) = 1051, which is probably the second example (wrt. greater index which is here 131). It is easy to find other primes like 277 and 1051. - Jeppe Stig Nielsen, Mar 24 2017
Subsequence of A048103. Proof: For all primes p, when i >= A000720(p), neither p itself nor p^p divides a(i), but neither does p^p divide a(i) when i < A000720(p), as p^p > 1 + A034386(p). - Antti Karttunen, Nov 17 2024

Examples

			It is a universal convention that an empty product is 1 (just as an empty sum is 0), and since this sequence has offset 0, the first term is 1+1 = 2. - _N. J. A. Sloane_, Dec 02 2015
		

References

  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See p. 134.
  • J.-M. De Koninck, Ces nombres qui nous fascinent, Entry 211, p. 61, Ellipses, Paris 2008.
  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 1990.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • F. Smarandache, Properties of numbers, Arizona State University Special Collections, 1973.
  • I. Vardi, Computational Recreations in Mathematica, Addison-Wesley, 1991, sections 5.1 and 5.2.
  • S. Wagon, Mathematica in Action, Freeman, NY, 1991, p. 35.

Crossrefs

Cf. A005867, A007916, A014545, A018239 (primes in sequence), A034386, A057588, A377871.
Subsequence of A048103.

Programs

  • Magma
    [2] cat [&*PrimesUpTo(p)+1: p in PrimesUpTo(70)]; // Vincenzo Librandi, Dec 03 2015
    
  • Maple
    with(numtheory): A006862 := proc(n) local i; if n=0 then 2 else 1+product('ithprime(i)','i'=1..n); fi; end;
    # second Maple program:
    a:= proc(n) option remember; `if`(n=0, 2,
          1+ithprime(n)*(a(n-1)-1))
        end:
    seq(a(n), n=0..20);  # Alois P. Heinz, Feb 06 2021
  • Mathematica
    Table[Product[Prime[k], {k, 1, n}] + 1, {n, 1, 18}]
    1 + FoldList[Times, 1, Prime@ Range@ 19] (* Harvey P. Dale, Dec 02 2015 and modified by Robert G. Wilson v, Mar 25 2017 *)
  • PARI
    a(n)=my(v=primes(n)); prod(i=1,#v,v[i])+1 \\ Charles R Greathouse IV, Nov 20 2012
    
  • Python
    from sympy import primorial
    def A006862(n):
        if n == 0: return 2
        else: return 1 + primorial(n) # Karl-Heinz Hofmann, Aug 21 2024

Formula

a(n) = A002110(n) + 1.
For n >= 1, a(n) = A057588(n) + 2. - Antti Karttunen, Nov 17 2024

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

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

A005234 Primes p such that 1 + product of primes up to p is prime.

Original entry on oeis.org

2, 3, 5, 7, 11, 31, 379, 1019, 1021, 2657, 3229, 4547, 4787, 11549, 13649, 18523, 23801, 24029, 42209, 145823, 366439, 392113, 4328927, 5256037, 6369619, 7351117, 9562633
Offset: 1

Views

Author

Keywords

Comments

Conjecture: if p# + 1 is a prime number, then the next prime is less than p# + exp(1)*p. - Arkadiusz Wesolowski, Feb 20 2013
Conjecture: if p# + 1 is a prime, then the next prime is less than p# + p^2. - Thomas Ordowski, Apr 07 2013

References

  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See p. 134.
  • J.-M. De Koninck, Ces nombres qui nous fascinent, Entry 211, p. 61, Ellipses, Paris 2008.
  • H. Dubner, A new primorial prime, J. Rec. Math., 21 (No. 4, 1989), 276.
  • R. K. Guy, Unsolved Problems in Number Theory, Section A2.
  • F. Le Lionnais, Les Nombres Remarquables, Paris, Hermann, 1983, p. 109, 1983.
  • Paulo Ribenboim, The New Book of Prime Number Records, p. 13.
  • 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. 112.

Crossrefs

Cf. A006862 (Euclid numbers).
Cf. A014545 (Primorial plus 1 prime indices: n such that 1 + (Product of first n primes) is prime).
Cf. A018239 (Primorial plus 1 primes).

Programs

  • Magma
    [p:p in PrimesUpTo(3000)|IsPrime(&*PrimesUpTo(p)+1)]; // Marius A. Burtea, Mar 25 2019
  • Maple
    N:= 5000: # to get all terms <= N
    Primes:= select(isprime, [$2..N]):
    P:= 1: count:= 0:
    for n from 1 to nops(Primes) do
       P:= P*Primes[n];
       if isprime(P+1) then
         count:= count+1; A[count]:= Primes[n]
       fi
    od:
    seq(A[i],i=1..count); # Robert Israel, Nov 03 2015
  • Mathematica
    (* This program is not convenient for large values of p *) p = pp = 1; Reap[While[p < 5000, p = NextPrime[p]; pp = pp*p; If[PrimeQ[1 + pp], Print[p]; Sow[p]]]][[2, 1]] (* Jean-François Alcover, Dec 31 2012 *)
    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, Feb 20 2013
    
  • PARI
    is(n)=isprime(n) && ispseudoprime(factorback(primes([2,n]))+1) \\ M. F. Hasler, May 31 2018
    

Formula

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

Extensions

42209 sent in by Chris Nash (chrisnash(AT)cwix.com).
145823 discovered and sent in by Arlin Anderson (starship1(AT)gmail.com) and Don Robinson (donald.robinson(AT)itt.com), Jun 01 2000
366439, 392113 from Eric W. Weisstein, Mar 13 2004 (based on information in A014545)
a(23) from Jeppe Stig Nielsen, Aug 08 2024
a(24) from Jeppe Stig Nielsen, Sep 01 2024
a(25) from Jeppe Stig Nielsen, Sep 24 2024
a(26) from Jeppe Stig Nielsen, Nov 10 2024
a(27) from Jeppe Stig Nielsen, Aug 21 2025

A057705 Primorial primes: primes p such that p+1 is a primorial number (A002110).

Original entry on oeis.org

5, 29, 2309, 30029, 304250263527209, 23768741896345550770650537601358309, 19361386640700823163471425054312320082662897612571563761906962414215012369856637179096947335243680669607531475629148240284399976569
Offset: 1

Views

Author

Labos Elemer, Oct 24 2000

Keywords

Crossrefs

See A006794 and A057704 (the main entries for this sequence) for more terms.
Subsequence of A057588.

Programs

  • Haskell
    a057705 n = a057705_list !! (n-1)
    a057705_list = filter ((== 1) . a010051) a057588_list
    -- Reinhard Zumkeller, Mar 27 2013
  • Mathematica
    Select[FoldList[Times, 1, Prime[Range[70]]], PrimeQ[# - 1] &] - 1 (* Harvey P. Dale, Jan 27 2014 *)

Formula

a(n) = A002110(A057704(n)) - 1.
Showing 1-10 of 28 results. Next