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

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)

A057588 Kummer numbers: -1 + product of first n consecutive primes.

Original entry on oeis.org

1, 5, 29, 209, 2309, 30029, 510509, 9699689, 223092869, 6469693229, 200560490129, 7420738134809, 304250263527209, 13082761331670029, 614889782588491409, 32589158477190044729, 1922760350154212639069, 117288381359406970983269, 7858321551080267055879089
Offset: 1

Views

Author

Mario Velucchi (mathchess(AT)velucchi.it), Oct 05 2000

Keywords

Comments

a(n) is congruent to -1 modulo the first n primes. - Michael Engling, Mar 31 2011
Named after the German mathematician Ernst Eduard Kummer (1810-1893). - Amiram Eldar, Jun 19 2021
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

Crossrefs

Subsequence of A048103.

Programs

  • Haskell
    a057588 = (subtract 1) . product . (flip take a000040_list)
    -- Reinhard Zumkeller, Mar 27 2013
    
  • Maple
    seq(mul(ithprime(k), k=1..n) - 1, n=1..100); # Muniru A Asiru, Jan 19 2018
  • Mathematica
    Table[Product[Prime[k], {k, 1, n}] - 1, {n, 1, 18}] (* Artur Jasinski, Jan 01 2007 *)
    FoldList[Times,1,Prime[Range[20]]]-1  (* Harvey P. Dale, Apr 17 2011 *)
    Table[ChineseRemainder[PadRight[{},n,-1],Prime[Range[n]]],{n,20}] (* Harvey P. Dale, Jul 01 2017 *)
  • PARI
    a(n) = prod(k=1, n, prime(k)) - 1; \\ Michel Marcus, Oct 02 2015
    
  • Python
    from sympy import primorial
    def A057588(n): return primorial(n)-1 # Chai Wah Wu, Feb 25 2023

Formula

a(n) = A002110(n) - 1. - Altug Alkan, Oct 02 2015
a(n) = A006862(n) - 2. - Antti Karttunen, Nov 17 2024

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Oct 05 2000

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

A136349 Numbers k of the form Product_{j=1..m} prime(j) such that k-1 is prime.

Original entry on oeis.org

6, 30, 2310, 30030, 304250263527210, 23768741896345550770650537601358310
Offset: 1

Views

Author

Enoch Haga, Dec 25 2007

Keywords

Comments

This sequence is different from A121069 and A002110.
Compute the product of k consecutive sequences of prime factors 2,3,5,7, etc. where k=1,2,3,4,5, etc. When N is preceded by prime N-1 add N to the sequence.
a(7) = 1 9361386640 7008231634 7142505431 2320082662 8976125715 6376190696 2414215012 3698566371 7909694733 5243680669 6075314756 2914824028 4399976570 - copied from Data field by Michael B. Porter, Mar 30 2013
Next term (a(8)) is too large to be included: see A006794. - M. F. Hasler, May 02 2008
The next 7 terms in the sequence are a(7) = p# 2..89 (shown in full above), a(8) = p# 2..317, a(9) = p# 2..337, a(10) = p# 2..991, a(11) = p# 2..1873, a(12) = p# 2..2053, a(13) = p# 2..2377, where p# indicates a primorial. - Jeff Hall, Apr 05 2021

Examples

			a(3)=30 where the prime factors are 2,3,5; since N-1=29, prime, N=30 is added to the sequence.
		

Crossrefs

Programs

  • Mathematica
    Select[FoldList[Times,1,Prime[Range[70]]],PrimeQ[#-1]&]  (* Harvey P. Dale, Jan 09 2011 *)
  • PARI
    c=0;t=1;vector(7,n,until( ispseudoprime( -1+t*=prime(c++)),);t)

Formula

a(n) = A057705(n) + 1 = A034386( A006794(n) ). - M. F. Hasler, May 02 2008

Extensions

Edited by M. F. Hasler, May 02 2008, May 30 2008

A104364 Primes of the form A104350(k) - 1.

Original entry on oeis.org

5, 11, 59, 179, 1259, 7559, 37799, 415799, 1135133999, 5499724229999, 29220034833989999, 1408101540804746673385499999, 43673268652925265723884051023987499999
Offset: 1

Views

Author

Reinhard Zumkeller, Mar 06 2005

Keywords

Crossrefs

Intersection of A104357 and A000040.

Programs

  • Mathematica
    Select[FoldList[Times, Array[FactorInteger[#][[-1, 1]] &, 100]] - 1, PrimeQ] (* Amiram Eldar, Apr 08 2024 *)
  • PARI
    gpf(n) = {my(p = factor(n)[, 1]); if(n == 1, 1, p[#p]);}
    lista(nmax) = {my(r = 1); for(k = 1, nmax, r * = gpf(k); if(isprime(r-1), print1(r-1, ", ")));} \\ Amiram Eldar, Apr 08 2024

A007014 Largest prime <= Product prime(k).

Original entry on oeis.org

2, 5, 29, 199, 2309, 30029, 510481, 9699667, 223092827, 6469693189, 200560490057, 7420738134751, 304250263527209, 13082761331669941, 614889782588491343, 32589158477190044657, 1922760350154212638963, 117288381359406970983181, 7858321551080267055878989
Offset: 1

Views

Author

Keywords

Comments

A057705 contains terms of a(n) such that A002110(n) - a(n) = 1. -Michael De Vlieger, May 15 2017

Examples

			From _Michael De Vlieger_, May 15 2017: (Start)
a(1) = 2 since A002110(1) = 2. 2 is prime thus the largest prime <= 2 = 2.
a(2) = 5 since A002110(2) = 6. 5 is the largest prime <= 6. (End)
		

References

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

Crossrefs

Programs

  • Mathematica
    Array[Abs@ NextPrime[Product[Prime@ i, {i, #}], -1] &, 14] (* Michael De Vlieger, May 15 2017 *)
  • PARI
    lista(n) = {prd = 1; for (i=1, n, prd *= prime(i); print1(precprime(prd), ", "););} \\ Michel Marcus, Jun 17 2013
    
  • PARI
    a(n)=precprime(prod(i=1,n,prime(i))) \\ Charles R Greathouse IV, Jun 17 2013

Formula

From Michael De Vlieger, May 15 2017: (Start)
a(n) = prime(A000849(n)).
a(n) = A151799(A002110(n)). (End)

Extensions

Corrected by Jud McCranie, Jan 03 2001
More terms from Michael De Vlieger, May 15 2017

A103515 Primes of the form primorial P(k)*2^n-1 with minimal n, n>=0, k>=2.

Original entry on oeis.org

5, 29, 419, 2309, 30029, 1021019, 19399379, 892371479, 51757545839, 821495767572479, 14841476269619, 304250263527209, 54873078184468933509119, 2459559130353965639, 521426535635040715679, 15751252788463309939261439
Offset: 1

Views

Author

Lei Zhou, Feb 15 2005

Keywords

Comments

Conjecture: sequence is defined for all k>=2

Examples

			P(2)*2^0-1=3*2-1=5 is prime, so a(2)=5;
P(4)*2^1-1=7*5*3*2*2-1=419 is prime, so a(4)=419;
		

Crossrefs

Programs

  • Mathematica
    nmax = 2^2048; npd = 2; n = 2; npd = npd*Prime[n]; While[npd < nmax, tt = 1; cp = npd*tt - 1; While[ ! (PrimeQ[cp]), tt = tt*2; cp = npd*tt - 1]; Print[cp]; n = n + 1; npd = npd*Prime[n]]

A344384 Prime numbers p such that p-1 or p+1 is a number of least prime signature (A025487).

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 23, 29, 31, 37, 47, 59, 61, 71, 73, 97, 127, 179, 181, 191, 193, 211, 239, 241, 257, 359, 383, 419, 421, 431, 433, 479, 577, 719, 769, 839, 863, 1151, 1153, 1259, 1297, 1439, 1801, 2161, 2309, 2311, 2521, 2591, 2593, 2879, 3359, 3361
Offset: 1

Views

Author

Hal M. Switkay, May 16 2021

Keywords

Comments

The corresponding numbers of least prime signature are A344385.
19 is the first prime not in this sequence.
This sequence unites many familiar sequences of primes, including Fermat primes (A019434), Mersenne primes (A000668), primorial primes (A018239 and A057705), factorial primes (A088054), A007505, and A039687.
Questions: 1) Is this sequence infinite? 2) Is log(a(n)) = O(log(n)^2)?

Examples

			17 is a term because 17 - 1 = 16 is a number of least prime signature.
		

Crossrefs

Programs

  • Mathematica
    {2}~Join~Select[Prime@ Range[2, 900], AnyTrue[# + {-1, 1}, Times @@ MapIndexed[Prime[First[#2]]^#1 &, Sort[FactorInteger[#][[All, -1]], Greater] ] == # &] &] (* Michael De Vlieger, May 16 2021 *)
Showing 1-10 of 20 results. Next