[go: up one dir, main page]

login
Search: a002982 -id:a002982
     Sort: relevance | references | number | modified | created      Format: long | short | data
Number of primes < 10^n.
(Formerly M3608)
+10
229
0, 4, 25, 168, 1229, 9592, 78498, 664579, 5761455, 50847534, 455052511, 4118054813, 37607912018, 346065536839, 3204941750802, 29844570422669, 279238341033925, 2623557157654233, 24739954287740860, 234057667276344607, 2220819602560918840, 21127269486018731928, 201467286689315906290
OFFSET
0,2
COMMENTS
Number of primes with at most n digits; or pi(10^n).
Partial sums of A006879. - Lekraj Beedassy, Jun 25 2004
Also omega( (10^n)! ), where omega(x): number of distinct prime divisors of x. - Cino Hilliard, Jul 04 2007
This sequence also gives a good approximation for the sum of primes less than 10^(n/2). This is evident from the fact that the number of primes less than 10^2n closely approximates the sum of primes less than 10^n. See link on Sum of Primes for the derivation. - Cino Hilliard, Jun 08 2008
It appears that (10^n)/log((n+3)!) is a lower bound close to a(n), see A025201. - Eric Desbiaux, Jul 20 2010, edited by M. F. Hasler, Dec 03 2018
REFERENCES
Richard Crandall and Carl B. Pomerance, Prime Numbers: A Computational Perspective, Springer, NY, 2001; p. 11.
Keith Devlin, Mathematics: The New Golden Age, new and revised edition. New York: Columbia University Press (1993): p. 6, Table 1.
Marcus du Sautoy, The Music of the Primes, Fourth Estate / HarperCollins, 2003; p. 48.
Calvin T. Long, Elementary Introduction to Number Theory. Prentice-Hall, Englewood Cliffs, NJ, 1987, p. 77.
Paulo Ribenboim, The Book of Prime Number Records. Springer-Verlag, NY, 2nd ed., 1989, p. 179.
H. Riesel, "Prime numbers and computer methods for factorization," Progress in Mathematics, Vol. 57, Birkhauser, Boston, 1985, page 38.
D. Shanks, Solved and Unsolved Problems in Number Theory. Chelsea, NY, 2nd edition, 1978, p. 15.
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 entry 455052511 at p. 190.
LINKS
David Baugh, Table of n, a(n) for n = 0..29 (terms n = 1..27 from Charles R Greathouse IV).
Chris K. Caldwell, How Many Primes Are There?
Chris K. Caldwell, Mark Deleglise's work
Muhammed Hüsrev Cilasun, An Analytical Approach to Exponent-Restricted Multiple Counting Sequences, arXiv preprint arXiv:1412.3265 [math.NT], 2014.
Muhammed Hüsrev Cilasun, Generalized Multiple Counting Jacobsthal Sequences of Fermat Pseudoprimes, Journal of Integer Sequences, Vol. 19, 2016, #16.2.3.
Jens Franke, Thorsten Kleinjung, Jan Büthe, and Alexander Jost, A practical analytic method for calculating pi(x), Math. Comp. 86 (2017), 2889-2909.
Andrew Granville and Greg Martin, Prime number races, Amer. Math. Monthly, 113 (No. 1, 2006), 1-33.
Andrew Granville and Greg Martin, Prime number races, arXiv:math/0408319 [math.NT], 2004.
Cino Hilliard, Sum of primes [unusable link]
Ronald K. Hoeflin, Titan Test
D. S. Kluk and N. J. A. Sloane, Correspondence, 1979, [see p. 6 of the pdf].
Rishi Kumar, Kepler Sets of Second-Order Linear Recurrence Sequences Over Q_p, arXiv:2406.05890 [math.NT], 2024. See p. 7.
J. C. Lagarias, V. S. Miller, and A. M. Odlyzko, Computing pi(x): The Meissel-Lehmer method, Math. Comp., 44 (1985), pp. 537-560.
J. C. Lagarias and Andrew M. Odlyzko, Computing pi(x): An analytic method, J. Algorithms, 8 (1987), pp. 173-191.
Pieter Moree, Izabela Petrykiewicz, and Alisa Sedunova, A computational history of prime numbers and Riemann zeros, arXiv:1810.05244 [math.NT], 2018. See Table 1 p. 6.
Tomás Oliveira e Silva, Computing pi(x): the combinatorial method, Revista do Detua, Vol. 4, N 6, March 2006.
David J. Platt, Computing pi(x) analytically, arXiv:1203.5712 [math.NT], 2012-2013.
Vladimir Pletser, Conjecture on the value of Pi(10^26), the number of primes less than 10^26, arXiv:1307.4444 [math.NT], 2013.
Douglas B. Staple, The combinatorial algorithm for computing pi(x), arXiv:1503.01839 [math.NT], 2015.
Eric Weisstein's World of Mathematics, Prime Counting Function
FORMULA
a(n) = A000720(10^n). - M. F. Hasler, Dec 03 2018
MATHEMATICA
Table[PrimePi[10^n], {n, 0, 14}] (* Jean-François Alcover, Nov 08 2016, corrected Sep 29 2020, a(14) being the maximum computable with certain implementations *)
PROG
(PARI) a(n)=primepi(10^n) \\ Charles R Greathouse IV, Nov 08 2011
(Haskell) a006880 = a000720 . (10 ^) -- Reinhard Zumkeller, Mar 17 2015
KEYWORD
nonn,hard,nice
EXTENSIONS
Lehmer gave the incorrect value 455052512 for the 10th term. More terms May 1996. Jud McCranie points out that the 11th term is not 4188054813 but rather 4118054813.
a(22) from Robert G. Wilson v, Sep 04 2001
a(23) (see Gourdon and Sebah) has yet to be verified and the assumed error is +-1. - Robert G. Wilson v, Jul 10 2002 [The actual error was 14037804. - N. J. A. Sloane, Nov 28 2007]
a(23) corrected by N. J. A. Sloane from the web page of Tomás Oliveira e Silva, Nov 28 2007
a(25) from J. Buethe, J. Franke, A. Jost, T. Kleinjung, Jun 01 2013, who said: "We have calculated pi(10^25) = 176846309399143769411680 unconditionally, using an analytic method based on Weil's explicit formula".
a(26) from Douglas B. Staple, Dec 02 2014
a(27) in the b-file from David Baugh and Kim Walisch via Charles R Greathouse IV, Jun 01 2016
a(28) in the b-file from David Baugh and Kim Walisch, Oct 26 2020
a(29) in the b-file from David Baugh and Kim Walisch, Feb 28 2022
STATUS
approved
Numbers k such that k! + 1 is prime.
(Formerly M0908)
+10
112
0, 1, 2, 3, 11, 27, 37, 41, 73, 77, 116, 154, 320, 340, 399, 427, 872, 1477, 6380, 26951, 110059, 150209, 288465, 308084, 422429
OFFSET
1,3
COMMENTS
If n + 1 is prime then (by Wilson's theorem) n + 1 divides n! + 1. Thus for n > 2 if n + 1 is prime n is not in the sequence. - Farideh Firoozbakht, Aug 22 2003
For n > 2, n! + 1 is prime <==> nextprime((n+1)!) > (n+1)nextprime(n!) and we can conjecture that for n > 2 if n! + 1 is prime then (n+1)! + 1 is not prime. - Mohammed Bouayoun (bouyao(AT)wanadoo.fr), Mar 03 2004
The prime members are in A093804 (numbers n such that Sum_{d|n} d! is prime) since Sum_{d|n} d! = n! + 1 if n is prime. - Jonathan Sondow
150209 is also in the sequence, cf. the link to Caldwell's prime pages. - M. F. Hasler, Nov 04 2011
REFERENCES
J.-M. De Koninck, Ces nombres qui nous fascinent, Entry 116, p. 40, Ellipses, Paris 2008.
Harvey Dubner, Factorial and primorial primes, J. Rec. Math., 19 (No. 3, 1987), 197-203.
Richard K. Guy, Unsolved Problems in Number Theory, Section A2.
F. Le Lionnais, Les Nombres Remarquables, Paris, Hermann, 1983, p. 100.
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. 70.
LINKS
A. Borning, Some results for k!+-1 and 2.3.5...p+-1, Math. Comp., 26 (1972), 567-570.
Chris K. Caldwell, Factorial Primes.
Chris K. Caldwell, 110059! + 1 on the Prime Pages.
Chris K. Caldwell, 150209! + 1 on the Prime Pages (Oct 31, 2011).
Chris K. Caldwell, 288465! + 1 on the Prime Pages (Jan 12, 2022).
Chris K. Caldwell and Y. Gallot, On the primality of n!+-1 and 2*3*5*...*p+-1, Math. Comp., 71 (2001), 441-448.
Antonín Čejchan, Michal Křížek, and Lawrence Somer, On Remarkable Properties of Primes Near Factorials and Primorials, Journal of Integer Sequences, Vol. 25 (2022), Article 22.1.4.
H. Dubner, Factorial and primorial primes, J. Rec. Math., 19 (No. 3, 1987), 197-203. (Annotated scanned copy)
H. Dubner and N. J. A. Sloane, Correspondence, 1991.
R. K. Guy and N. J. A. Sloane, Correspondence, 1985.
N. Kuosa, Source for 6380.
Des MacHale and Joseph Manning, Maximal runs of strictly composite integers, The Mathematical Gazette, 99, pp 213-219 (2015).
Romeo Mestrovic, Euclid's theorem on the infinitude of primes: a historical survey of its proofs (300 BC--2012) and another new proof, arXiv preprint arXiv:1202.3670 [math.HO], 2012. - From N. J. A. Sloane, Jun 13 2012
Hisanori Mishima, Factors of N!+1.
PrimePages, Factorial Primes.
Eric Weisstein's World of Mathematics, Factorial Prime.
Eric Weisstein's World of Mathematics, Integer Sequence Primes.
EXAMPLE
3! + 1 = 7 is prime, so 3 is in the sequence.
MATHEMATICA
v = {0, 1, 2}; Do[If[ !PrimeQ[n + 1] && PrimeQ[n! + 1], v = Append[v, n]; Print[v]], {n, 3, 29651}]
Select[Range[100], PrimeQ[#! + 1] &] (* Alonso del Arte, Jul 24 2014 *)
PROG
(PARI) for(n=0, 500, if(ispseudoprime(n!+1), print1(n", "))) \\ Charles R Greathouse IV, Jun 16 2011
(Magma) [n: n in [0..800] | IsPrime(Factorial(n)+1)]; // Vincenzo Librandi, Oct 31 2018
(Python)
from sympy import factorial, isprime
for n in range(0, 800):
if isprime(factorial(n)+1):
print(n, end=', ') # Stefano Spezia, Jan 10 2019
CROSSREFS
Cf. A002982 (n!-1 is prime), A064295. A088332 gives the primes.
Equals A090660 - 1.
Cf. A093804.
KEYWORD
nonn,nice,hard,more
EXTENSIONS
a(19) sent in by Jud McCranie, May 08 2000
a(20) from Ken Davis (kraden(AT)ozemail.com.au), May 24 2002
a(21) found by PrimeGrid around Jun 11 2011, submitted by Eric W. Weisstein, Jun 13 2011
a(22) from Rene Dohmen, Jun 09 2012
a(23) from Rene Dohmen, Jan 12 2022
a(24)-a(25) from Dmitry Kamenetsky, Jun 19 2024
STATUS
approved
a(n) = n! - 1.
(Formerly N1614)
+10
97
0, 0, 1, 5, 23, 119, 719, 5039, 40319, 362879, 3628799, 39916799, 479001599, 6227020799, 87178291199, 1307674367999, 20922789887999, 355687428095999, 6402373705727999, 121645100408831999, 2432902008176639999, 51090942171709439999, 1124000727777607679999
OFFSET
0,4
COMMENTS
a(n) gives the index number in any table of permutations of the entry in which the last n + 1 items are reversed. - Eugene McDonnell (eemcd(AT)mac.com), Dec 03 2004
a(n), n >= 1, has the factorial representation [n - 1, n - 2, ..., 1, 0]. The (unique) factorial representation of a number m from {0, 1, ... n! - 1} is m = sum(m_j(n)*j!, j = 0 .. n - 1) with m_j(n) from {0, 1, .., j}, n>=1. This is encoded as [m_{n-1},m_{n-2},...,m+1,m_0] with m_0=0. This can be interpreted as (D. N.) Lehmer code for the lexicographic rank of permutations of the symmetric group S_n (see the W. Lang link under A136663). The Lehmer code [n - 1, n - 2, ..., 1, 0] stands for the permutation [n, n - 1, ..., 1] (the last in lexicographic order). - Wolfdieter Lang, May 21 2008
For n >= 3: a(n) = numbers m for which there is one iteration {floor (r / k)} for k = n, n - 1, n - 2, ... 2 with property r mod k = k - 1 starting at r = m. For n = 5: a(5) = 119; floor (119 / 5) = 23, 119 mod 5 = 4; floor (23 / 4) = 5, 23 mod 4 = 3; floor (5 / 3) = 1, 5 mod 3 = 2; floor (1 / 2) = 0; 1 mod 2 = 1. - Jaroslav Krizek, Jan 23 2010
For n = 4, define the sum of all possible products of 1, 2, 3, 4 to be 1 + 2 + 3 + 4 add 1*2 + 1*3 + 1*4 add 2*3 + 2*4 + 3*4 add 1*2*3 + 1*2*4 + 1*3*4 + 2*3*4 add 1*2*3*4. The sum of this is 119 = (4 + 1)! - 1. For n = 5 I get the sum 719 = (5 + 1)! - 1. The proof for the general case seems to follow by induction. - J. M. Bergot, Jan 10 2011
REFERENCES
Arthur T. Benjamin and Jennifer J. Quinn, Proofs that really count: the art of combinatorial proof, M.A.A. 2003, identity 181, p. 92.
Michael Doob, The Canadian Mathematical Olympiad & L'Olympiade Mathématique du Canada 1969-1993, Canadian Mathematical Society & Société Mathématique du Canada, Problem 6, 1969, p. 3, 1993.
Problem 598, J. Rec. Math., 11 (1978), 68-69.
N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
LINKS
Jonathan Beagley and Lara Pudwell, Colorful Tilings and Permutations, Journal of Integer Sequences, Vol. 24 (2021), Article 21.10.4.
The IMO Compendium, Problem 6, 1st Canadian Mathematical Olympiad 1969.
Stéphane Legendre and Philippe Paclet, On the Permutations Generated by Cyclic Shift , J. Int. Seq. 14 (2011) # 11.3.2.
Gerard P. Michon, Wilson's Theorem.
Michael Penn, Make it look like a simple calculus problem., YouTube video, 2021.
Andrew Walker, Factors of n! +- 1.
Eric Weisstein's World of Mathematics, Factorial.
Eric Weisstein's World of Mathematics, Permutation Pattern.
FORMULA
a(n) = Sum_{k = 1 .. n} (k-1)*(k-1)!.
a(n) = a(n - 1)*(n - 1) + a(n - 1) + n - 1, a(0) = 0. - Reinhard Zumkeller, Feb 03 2003
a(0) = a(1) = 0, a(n) = a(n - 1) * n + (n - 1) for n >= 2. - Jaroslav Krizek, Jan 23 2010
E.g.f.: 1/(1 - x) - exp(x). - Sergei N. Gladkovskii, Jun 29 2012
0 = 1 + a(n)*(+a(n+1) - a(n+2)) + a(n+1)*(+3 + a(n+1)) + a(n+2)*(-1) for n>=0. - Michael Somos, Feb 24 2017
Sum_{n>=2} 1/a(n) = A331373. - Amiram Eldar, Nov 11 2020
EXAMPLE
G.f. = x^2 + 5*x^3 + 23*x^4 + 119*x^5 + 719*x^6 + 5039*x^7 + 40319*x^8 + ...
MATHEMATICA
FoldList[#1*#2 + #2 - 1 &, 0, Range[19]] (* Robert G. Wilson v, Jul 07 2012 *)
Range[0, 19]! - 1 (* Alonso del Arte, Jan 24 2013 *)
PROG
(PARI) a(n)=n!-1 \\ Charles R Greathouse IV, Jul 19 2011
(Magma) [Factorial(n)-1: n in [0..25]]; // Vincenzo Librandi, Jul 20 2011
(Maxima) A033312(n):= n!-1$
makelist(A033312(n), n, 0, 30); /* Martin Ettl, Nov 03 2012 */
CROSSREFS
Cf. A000142, A001563 (first differences), A002582, A002982, A038507 (factorizations), A054415, A056110, A331373.
Row sums of A008291.
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane. This sequence appeared in the 1973 "Handbook", but was then dropped from the database. Resubmitted by Eric W. Weisstein. Entry revised by N. J. A. Sloane, Jun 12 2012
STATUS
approved
Hyperfactorials: Product_{k = 1..n} k^k.
(Formerly M3706 N1514)
+10
82
1, 1, 4, 108, 27648, 86400000, 4031078400000, 3319766398771200000, 55696437941726556979200000, 21577941222941856209168026828800000, 215779412229418562091680268288000000000000000, 61564384586635053951550731889313964883968000000000000000
OFFSET
0,3
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.
LINKS
Christian Aebi and Grant Cairns, Generalizations of Wilson's Theorem for Double-, Hyper-, Sub-and Superfactorials, The American Mathematical Monthly 122.5 (2015): 433-443.
Mohammad K. Azarian, On the Hyperfactorial Function, Hypertriangular Function, and the Discriminants of Certain Polynomials, International Journal of Pure and Applied Mathematics 36(2), 2007, pp. 251-257. MR2312537. Zbl 1133.11012.
blackpenredpen, What is a Hyperfactorial? Youtube video (2018).
CreativeMathProblems, A beautiful integral | Raabe's integral, Youtube Video (2021).
Steven R. Finch, Glaisher-Kinkelin Constant (gives asymptotic expressions for A002109, A000178) [Broken link]
Steven R. Finch, Glaisher-Kinkelin Constant (gives asymptotic expressions for A002109, A000178) [From the Wayback machine]
A. M. Ibrahim, Extension of factorial concept to negative numbers, Notes on Number Theory and Discrete Mathematics, Vol. 19, 2013, 2, 30-42.
Jeffrey C. Lagarias and Harsh Mehta, Products of binomial coefficients and unreduced Farey fractions, arXiv:1409.4145 [math.NT], 2014.
Jean-Christophe Pain, Series representations for the logarithm of the Glaisher-Kinkelin constant, arXiv:2304.07629 [math.NT], 2023.
Jean-Christophe Pain, Bounds on the p-adic valuation of the factorial, hyperfactorial and superfactorial, arXiv:2408.00353 [math.NT], 2024. See p. 5.
Vignesh Raman, The Generalized Superfactorial, Hyperfactorial and Primorial functions, arXiv:2012.00882 [math.NT], 2020.
Jonathan Sondow and Petros Hadjicostas, The generalized-Euler-constant function gamma(z) and a generalization of Somos's quadratic recurrence constant, J. Math. Anal. Appl., 332 (2007), 292-314; see Section 5.
László Tóth, Weighted gcd-sum functions, J. Integer Sequences, 14 (2011), Article 11.7.7.
Eric Weisstein's World of Mathematics, Hyperfactorial.
Eric Weisstein's World of Mathematics, K-Function.
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)
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 *)
PROG
(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
(Haskell)
a002109 n = a002109_list !! n
a002109_list = scanl1 (*) a000312_list -- Reinhard Zumkeller, Jul 07 2012
(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
CROSSREFS
Cf. A074962 [Glaisher-Kinkelin constant, also gives an asymptotic approximation for the hyperfactorials].
Cf. A246839 (trailing 0's).
Cf. A261175 (number of digits).
KEYWORD
nonn,easy,nice
STATUS
approved
Numbers k such that (k! + 3)/3 is prime.
+10
57
3, 5, 6, 8, 11, 17, 23, 36, 77, 93, 94, 109, 304, 497, 1330, 1996, 3027, 3053, 4529, 5841, 20556, 26558, 28167
OFFSET
1,1
COMMENTS
a(21) > 20000. The PFGW program has been used to certify all the terms up to a(20), using the "N-1" deterministic test. - Giovanni Resta, Mar 31 2014
MATHEMATICA
Select[Range[0, 1400], PrimeQ[(#!+3)/3] &] (* Vladimir Joseph Stephan Orlovsky, Apr 29 2008 *)
PROG
(Magma) [n: n in [0..500] | IsPrime((Factorial(n)+3) div 3)]; // Vincenzo Librandi, Dec 12 2011
(PARI) is(n)=ispseudoprime(n!\3+1) \\ Charles R Greathouse IV, Mar 21 2013
CROSSREFS
Cf. A089131.
Cf. n!/m-1 is a prime: A002982, A082671, A139056, A139199-A139205; n!/m+1 is a prime: A002981, A082672, A089085, A139061, A139058, A139063, A139065, A151913, A137390, A139071 (1<=m<=10).
KEYWORD
nonn
AUTHOR
Cino Hilliard, Dec 05 2003
EXTENSIONS
More terms from Don Reble, Dec 06 2003
1330 from Herman Jamke (hermanjamke(AT)fastmail.fm), Jan 03 2008
Typo in Mma program corrected by Vincenzo Librandi, Dec 12 2011
a(16)-a(20) from Giovanni Resta, Mar 31 2014
a(21)-a(23) from Serge Batalov, Feb 17 2015
STATUS
approved
Numbers n such that (n! + 2)/2 is a prime.
+10
56
2, 4, 5, 7, 8, 13, 16, 30, 43, 49, 91, 119, 213, 1380, 1637, 2258, 4647, 9701, 12258
OFFSET
1,1
MATHEMATICA
Select[Range[10^2], PrimeQ[(#!+2)/2] &] (* Vladimir Joseph Stephan Orlovsky, Apr 29 2008 *)
PROG
(PARI) \\ x such that (x!+2)/2 is prime
xfactpk(n, k=2) = { for(x=2, n, y = (x!+k)/k; if(isprime(y), print1(x, ", ")) ) }
(Magma) [ n: n in [1..300] | IsPrime((Factorial(n)+2) div 2) ];
CROSSREFS
Cf. A089130.
Cf. n!/m-1 is a prime: A002982, A082671, A139056, A139199-A139205; n!/m+1 is a prime: A002981, A082672, A089085, A139061, A139058, A139063, A139065, A151913, A137390, A139071 (1<=m<=10).
KEYWORD
easy,nonn
AUTHOR
Cino Hilliard, May 18 2003
EXTENSIONS
More terms from Don Reble, Dec 08 2003
More terms from Herman Jamke (hermanjamke(AT)fastmail.fm), Jan 03 2008
STATUS
approved
Numbers k for which (k!-3)/3 is prime.
+10
56
4, 6, 12, 16, 29, 34, 43, 111, 137, 181, 528, 2685, 39477, 43697
OFFSET
1,1
COMMENTS
Corresponding primes (k!-3)/3 are in A139057.
a(13) > 10000. The PFGW program has been used to certify all the terms up to a(12), using a deterministic test which exploits the factorization of a(n) + 1. - Giovanni Resta, Mar 28 2014
98166 is a member of the sequence but its index is not yet determined. The interval where sieving and tests were not run is [60000,90000]. - Serge Batalov, Feb 24 2015
LINKS
C. Caldwell. The Prime database entry for the prime generated by a(i)=98166.
MATHEMATICA
a = {}; Do[If[PrimeQ[(-3 + n!)/3], AppendTo[a, n]], {n, 1, 1000}]; a
PROG
(PARI) for(n=1, 1000, if(floor(n!/3-1)==n!/3-1, if(ispseudoprime(n!/3-1), print(n)))) \\ Derek Orr, Mar 28 2014
CROSSREFS
Cf. n!/m-1 is a prime: A002982, A082671, A139056, A139199-A139205.
Cf. m*n!-1 is a prime: A076133, A076134, A099350, A099351, A180627-A180631.
Cf. m*n!+1 is a prime: A051915, A076679-A076683, A178488, A180626, A126896.
KEYWORD
nonn,more
AUTHOR
Artur Jasinski, Apr 07 2008
EXTENSIONS
Definition corrected by Derek Orr, Mar 28 2014
a(8)-a(11) from Derek Orr, Mar 28 2014
a(12) from Giovanni Resta, Mar 28 2014
a(13)-a(14) from Serge Batalov, Feb 24 2015
STATUS
approved
Primes of the form n!! - 1.
+10
51
2, 7, 47, 383, 10321919, 51011754393599, 1130138339199322632554990773529330319359999999, 73562883979319395645666688474019139929848516028923903999999999
OFFSET
1,1
REFERENCES
G. Balzarotti and P. P. Lava, Le sequenze di numeri interi, Hoepli, 2008, p. 158.
LINKS
FORMULA
a(n) = A093173(n-1) for n>1. - Alexander Adamchuk, Apr 18 2007
EXAMPLE
6!! - 1 = 6*4*2 - 1 = 48 - 1 = 47, which is prime.
8!! - 1 = 8*6*4*2 - 1 = 384 - 1 = 383, which is prime.
MAPLE
SFACT:= proc(n) local i, j, k; for k from 1 by 1 to n do i:=k; j:=k-2; while j >0 do i:=i*j; j:=j-2; od: if isprime(i-1) then print(i-1); fi; od: end: SFACT(100);
MATHEMATICA
lst={}; Do[p=n!!-1; If[PrimeQ[p], AppendTo[lst, p]], {n, 0, 5!, 1}]; lst (* Vladimir Joseph Stephan Orlovsky, Jan 27 2009 *)
Select[Table[n!!-1, {n, 1, 100}], PrimeQ] (* Vincenzo Librandi, Dec 07 2011 *)
PROG
(PARI) print1(2); for(n=1, 1e3, if(ispseudoprime(t=n!<<n-1), print1(", "t))) \\ Charles R Greathouse IV, Jun 16 2011
CROSSREFS
Cf. A093173 = primes of the form (2^n * n!) - 1.
KEYWORD
nonn
AUTHOR
STATUS
approved
Numbers k for which (9 + k!)/9 is prime.
+10
50
8, 46, 87, 168, 259, 262, 292, 329, 446, 1056, 3562, 11819, 26737
OFFSET
1,1
COMMENTS
No other k exists, for k <= 6000. - Dimitris Zygiridis (dmzyg70(AT)gmail.com), Jul 25 2008
The next number in the sequence, if one exists, is greater than 10944. - Robert Price, Mar 16 2010
Borrowing from A139074 another term in this sequence is 26737. There may be others between 10944 and 26737. - Robert Price, Dec 13 2011
There are no other terms for k < 26738. - Robert Price, Feb 10 2012
EXAMPLE
a(11) = 3562 because 3562 is the 11th natural number for which k!/9 + 1 is prime. 3562 is the new term.
MATHEMATICA
a = {}; Do[If[PrimeQ[(n! + 9)/9], AppendTo[a, n]], {n, 1, 500}]; a
PROG
(PARI) for(n=6, 1e4, if(ispseudoprime(n!/9+1), print1(n", "))) \\ Charles R Greathouse IV, Jul 15 2011
(PFGW) ABC2 $a!/9+1
a: from 6 to 1000 // Jinyuan Wang, Feb 04 2020
CROSSREFS
Cf. A139068 (primes of the form (9 + k!)/9).
Cf. k!/m - 1 is a prime: A002982, A082671, A139056, A139199-A139205.
Cf. (m + k!)/m is a prime: A002981, A082672, A089085, A139061, A139058, A139063, A139065, A151913, A139071.
KEYWORD
nonn,more
AUTHOR
Artur Jasinski, Apr 09 2008
EXTENSIONS
Edited by N. J. A. Sloane, May 15 2008 at the suggestion of R. J. Mathar
a(10) corrected from 1053 to 1056 by Dmitry Kamenetsky, Jul 12 2008
a(11) from Dimitris Zygiridis (dmzyg70(AT)gmail.com), Jul 25 2008
a(12)-a(13) from Robert Price, Feb 10 2012
STATUS
approved
a(n) = (10^n)-th prime.
(Formerly M2151)
+10
46
2, 29, 541, 7919, 104729, 1299709, 15485863, 179424673, 2038074743, 22801763489, 252097800623, 2760727302517, 29996224275833, 323780508946331, 3475385758524527, 37124508045065437, 394906913903735329, 4185296581467695669, 44211790234832169331
OFFSET
0,1
COMMENTS
Check the b-file for terms beyond those listed above.
REFERENCES
R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 1990, p. 111.
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
Marc Deleglise et al., Table of n, a(n) for n = 0..24 (a(23) corrected and a(24) added using Kim Walisch's primecount program, by David Baugh, Nov 11 2015)
Eric Weisstein's World of Mathematics, Prime Number
EXAMPLE
a(0) = 10^0-th prime = first prime = 2.
MAPLE
A006988:=n->ithprime(10^n): seq(A006988(n), n=0..7); # Wesley Ivan Hurt, Nov 21 2014
MATHEMATICA
Table[Prime[10^n], {n, 0, 12}]
PROG
(PARI) a(n)=prime(10^n) \\ Charles R Greathouse IV, Jul 21 2011
CROSSREFS
Cf. A099260, A274767 ((leading) digits of 103-digit a(100)).
KEYWORD
nonn,nice
EXTENSIONS
More terms from Paul Zimmermann
a(19) from Marc Deleglise, Jun 29 2008
a(20) found by Andrey V. Kulsha using a program by Xavier Gourdon, Oct 05 2011
a(21) from Henri Lifchitz, Sep 09 2014
a(22) from Henri Lifchitz, Nov 21 2014
STATUS
approved

Search completed in 0.039 seconds