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

A035346 Let F(n) = Q(n) - P(n) be the Fortunate numbers (A005235); sequence gives n such that F(n) = prime(n+1).

Original entry on oeis.org

1, 2, 3, 6, 7, 8, 14, 16, 17, 21, 73, 801, 1971, 3332, 3469, 3509, 4318, 7986, 41292
Offset: 1

Views

Author

Keywords

Comments

Positive n such that A002110(n) + A000040(n+1) is prime. - Robert Israel, Dec 02 2015
Subsequence of A265109. - Altug Alkan, Dec 02 2015

Examples

			a(10) = 21 because A002110(21) + prime(22) = 40729680599249024150621323549 = 2*3*5*...*67*71*73 + 79 is prime.
		

Crossrefs

Programs

  • Maple
    p:= 3:
    A[1]:= 1:
    count:= 1:
    Primorial:= 2:
    for n from 2 to 1000 do
      Primorial:= Primorial*p;
      p:= nextprime(p);
      if isprime(Primorial + p) then
        count:= count+1;
        A[count]:= n;
      fi
    od:
    seq(A[i],i=1..count); # Robert Israel, Dec 02 2015
  • Mathematica
    Select[Range@ 801, PrimeQ[Product[Prime@ k, {k, #}] + Prime[# + 1]] &] (* Michael De Vlieger, Dec 02 2015 *)
  • PARI
    lista(nn) = {s = 1; for(k=1, nn, s *= prime(k); if(ispseudoprime(s + prime(k+1)), print1(k, ", ")); ); } \\ Altug Alkan, Dec 02 2015

Extensions

a(10)-a(11) were found by Labos Elemer, May 02 2000
a(12) from Ralf Stephan, Oct 20 2002
Offset changed by Altug Alkan, Dec 02 2015
a(13) from Michael De Vlieger, Dec 02 2015
a(14)-a(18) from Altug Alkan, Dec 02 2015
a(19) from Henri Lifchitz, Nov 08 2024

A046066 Fortunate primes (A005235) in numerical order with duplicates removed.

Original entry on oeis.org

3, 5, 7, 13, 17, 19, 23, 37, 47, 59, 61, 67, 71, 79, 89, 101, 103, 107, 109, 127, 151, 157, 163, 167, 191, 197, 199, 223, 229, 233, 239, 271, 277, 283, 293, 307, 311, 313, 331, 353, 373, 379, 383, 397, 401, 409, 419, 421, 439, 443, 457, 461, 491, 499, 509
Offset: 1

Views

Author

Keywords

References

  • R. K. Guy, Unsolved Problems in Number Theory, A2.

Crossrefs

Cf. A005235.

A087200 a(n) is the smallest m such that m > A005235(n) and A002110(n)+m is prime.

Original entry on oeis.org

5, 7, 11, 17, 29, 29, 41, 37, 47, 89, 83, 101, 107, 67, 109, 73, 89, 167, 139, 229, 163, 193, 269, 157, 173, 523, 233, 157, 251, 193, 179, 383, 647, 311, 223, 317, 509, 457, 211, 503, 251, 479, 617, 1019, 347, 863, 827, 349, 389, 563, 601, 419, 367, 349, 449
Offset: 1

Views

Author

Farideh Firoozbakht, Aug 26 2003

Keywords

Comments

a(n) is the second m (first m is A005235(n)) such that m > 1 and A002110(n)+m is prime. I guess every term of this sequence (compare the conjecture about A005235) is prime. I checked this conjecture for n < 373.

References

  • R. K. Guy, Unsolved Problems in Number Theory, Section A2.

Crossrefs

Programs

  • Mathematica
    A005235[n_] := (For[m=2, !PrimeQ[Product[Prime[k], {k, n}]+m], m++ ]; m); a[n_] := (For[m=A005235[n]+1, !PrimeQ[Product[Prime[k], {k, n}]+m], m++ ]; m); Table[a[n], {n, 60}]

A098168 Prime index j such that prime(j) = the n-th fortunate number, A005235(n).

Original entry on oeis.org

2, 3, 4, 6, 9, 7, 8, 9, 12, 18, 19, 18, 20, 15, 28, 17, 18, 29, 24, 27, 22, 36, 45, 26, 27, 51, 48, 31, 48, 43, 38, 50, 117, 52, 37, 39, 85, 52, 46, 43, 46, 76, 51, 133, 65, 137, 111, 65, 76, 62, 86, 67, 61, 59, 58, 79, 63, 67, 75, 94, 67, 64, 78, 67, 71, 81, 82, 153, 101, 221
Offset: 1

Views

Author

Pierre CAMI, Aug 30 2004

Keywords

Crossrefs

Programs

  • Mathematica
    NextPrime[n_Integer] := Block[{k}, k = n + 1; While[ !PrimeQ[k], k++ ]; k]; Fortunate[n_Integer] := Block[{p = Product[Prime[i], {i, 1, n}] + 1, q}, q = NextPrime[p]; q - p + 1]; Table[ PrimePi[ Fortunate[n]], {n, 70}] (* Robert G. Wilson v, Sep 04 2004 *)

Extensions

More terms from Robert G. Wilson v, Sep 04 2004
Better definition from R. J. Mathar, Oct 28 2007

A097587 a(n)= floor(P(k)/P(n)) with P(k)=Fortunate prime numbers for P(n)# (A005235).

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 2, 1, 2, 1, 1, 1, 4, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 2, 1, 3, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1
Offset: 1

Views

Author

Pierre CAMI, Aug 29 2004

Keywords

Comments

Conjecture : a(n) is always < 8.

Crossrefs

Cf. A005235.

A097589 a(n) = Sum_{i=1..n} A005235(i).

Original entry on oeis.org

3, 8, 15, 28, 51, 68, 87, 110, 147, 208, 275, 336, 407, 454, 561, 620, 681, 790, 879, 982, 1061, 1212, 1409, 1510, 1613, 1846, 2069, 2196, 2419, 2610, 2773, 3002, 3645, 3884, 4041, 4208, 4647, 4886, 5085, 5276, 5475, 5858, 6091, 6842, 7155, 7928, 8535, 8848
Offset: 1

Views

Author

Pierre CAMI, Aug 29 2004

Keywords

Comments

The primes and fortunate numbers in the partial sum of the fortunate numbers (A005235): primes begin: 3, 1061, 1409, 1613, 2069, 6091; fortunate numbers in partial sum begin: 3, 1061, 1409, 1613, 6091, and these subsequences are not disjoint. [Jonathan Vos Post, Jan 27 2010]

Crossrefs

Programs

  • Mathematica
    NextPrime[ n_Integer] := Block[{k}, k = n + 1; While[ !PrimeQ[ k ], k++ ]; k ]; Fortunate[ n_Integer] := Block[{p = Product[ Prime[i], {i, 1, n} ] + 1, q}, q = NextPrime[p]; q - p + 1 ]; t = Table[ Fortunate[ n ], {n, 1, 48}]; Table[Plus @@ Take[t, n], {n, 48}] (* Robert G. Wilson v, Sep 04 2004 *)
    Accumulate[NextPrime[#]-#+1&/@(Rest[FoldList[Times,1,Prime[Range[ 60]]]]+ 1)] (* Harvey P. Dale, May 27 2014 *)

Formula

Let F(n) := a(n)/A007504(n). Conjecture: as n tends to infinity F(n) tends to Pi/2 with Pi=3.14159......

Extensions

More terms from Robert G. Wilson v, Sep 04 2004

A317479 Primes with record values of corresponding Fortunate numbers (A005235).

Original entry on oeis.org

2, 3, 5, 7, 11, 23, 29, 31, 41, 47, 61, 79, 83, 101, 137, 193, 199, 337, 349, 557, 677, 977, 1069, 1087, 1279, 1483, 1579, 1877, 2053, 2591, 2713, 2843, 3359, 3823, 4243, 6011, 7393, 7411, 7459, 8179, 8389, 15313, 18287, 19463, 21323, 22153, 23011, 27067
Offset: 1

Views

Author

Amiram Eldar, Jul 29 2018

Keywords

Comments

The corresponding record values of the Fortunate numbers are 3, 5, 7, 13, 23, 37, 61, 67, 71, 107, 109, 151, 197, 233, 643, 751, 773, 883, 1381, 1423, 2087, 2243, 2357, 3559, 3739, 5323, 5689, 6271, 7187, 7309, 8713, 11069, 11411, 19699, 20249, 25621, 28351, 28817, 32443, 39769, 59981, 78059, 82339, 86293, 89657, 90127, 101021, 129589, ...
Primes that are in both of these 2 sequences: 3, 5, 7, 23, 61, ...

Examples

			23 is in the sequence since the prime next to 23#+1 is 23#+37 and 37 is larger than all the Fortunate numbers before it (3, 5, 7, 13, 23, 17, 19, 23).
		

Crossrefs

Cf. A005235.

Programs

  • Mathematica
    primorial[n_] := Times @@ Prime[Range[n]]; gap[n_] := NextPrime[n + 1] - n; fort[n_] := gap[primorial[n]]; fm=0; s={}; Do[f = fort[n]; If[f > fm, AppendTo[s, Prime[n]]; fm = f], {n, 1, 30}]; s

A002110 Primorial numbers (first definition): product of first n primes. Sometimes written prime(n)#.

Original entry on oeis.org

1, 2, 6, 30, 210, 2310, 30030, 510510, 9699690, 223092870, 6469693230, 200560490130, 7420738134810, 304250263527210, 13082761331670030, 614889782588491410, 32589158477190044730, 1922760350154212639070, 117288381359406970983270, 7858321551080267055879090
Offset: 0

Views

Author

Keywords

Comments

See A034386 for the second definition of primorial numbers: product of primes in the range 2 to n.
a(n) is the least number N with n distinct prime factors (i.e., omega(N) = n, cf. A001221). - Lekraj Beedassy, Feb 15 2002
Phi(n)/n is a new minimum for each primorial. - Robert G. Wilson v, Jan 10 2004
Smallest number stroked off n times after the n-th sifting process in an Eratosthenes sieve. - Lekraj Beedassy, Mar 31 2005
Apparently each term is a new minimum for phi(x)*sigma(x)/x^2. 6/Pi^2 < sigma(x)*phi(x)/x^2 < 1 for n > 1. - Jud McCranie, Jun 11 2005
Let f be a multiplicative function with f(p) > f(p^k) > 1 (p prime, k > 1), f(p) > f(q) > 1 (p, q prime, p < q). Then the record maxima of f occur at n# for n >= 1. Similarly, if 0 < f(p) < f(p^k) < 1 (p prime, k > 1), 0 < f(p) < f(q) < 1 (p, q prime, p < q), then the record minima of f occur at n# for n >= 1. - David W. Wilson, Oct 23 2006
Wolfe and Hirshberg give ?, ?, ?, ?, ?, 30030, ?, ... as a puzzle.
Records in number of distinct prime divisors. - Artur Jasinski, Apr 06 2008
For n >= 2, the digital roots of a(n) are multiples of 3. - Parthasarathy Nambi, Aug 19 2009 [with corrections by Zak Seidov, Aug 30 2015]
Denominators of the sum of the ratios of consecutive primes (see A094661). - Vladimir Joseph Stephan Orlovsky, Oct 24 2009
Where record values occur in A001221. - Melinda Trang (mewithlinda(AT)yahoo.com), Apr 15 2010
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
The above comment from Parthasarathy Nambi follows from the observation that digit summing produces a congruent number mod 9, so the digital root of any multiple of 3 is a multiple of 3. prime(n)# is divisible by 3 for n >= 2. - Christian Schulz, Oct 30 2013
The peaks (i.e., local maximums) in a graph of the number of repetitions (i.e., the tally of values) vs. value, as generated by taking the differences of all distinct pairs of odd prime numbers within a contiguous range occur at regular periodic intervals given by the primorial numbers 6 and greater. Larger primorials yield larger (relative) peaks, however the range must be >50% larger than the primorial to be easily observed. Secondary peaks occur at intervals of those "near-primorials" divisible by 6 (e.g., 42). See A259629. Also, periodicity at intervals of 6 and 30 can be observed in the local peaks of all possible sums of two, three or more distinct odd primes within modest contiguous ranges starting from p(2) = 3. - Richard R. Forberg, Jul 01 2015
If a number k and a(n) are coprime and k < (prime(n+1))^b < a(n), where b is an integer, then k has fewer than b prime factors, counting multiplicity (i.e., bigomega(k) < b, cf. A001222). - Isaac Saffold, Dec 03 2017
If n > 0, then a(n) has 2^n unitary divisors (A034444), and a(n) is a record; i.e., if k < a(n) then k has fewer unitary divisors than a(n) has. - Clark Kimberling, Jun 26 2018
Unitary superabundant numbers: numbers k with a record value of the unitary abundancy index, A034448(k)/k > A034448(m)/m for all m < k. - Amiram Eldar, Apr 20 2019
Psi(n)/n is a new maximum for each primorial (psi = A001615) [proof in link: Patrick Sole and Michel Planat, proposition 1 page 2]; compare with comment 2004: Phi(n)/n is a new minimum for each primorial. - Bernard Schott, May 21 2020
The term "primorial" was coined by Harvey Dubner (1987). - Amiram Eldar, Apr 16 2021
a(n)^(1/n) is approximately (n log n)/e. - Charles R Greathouse IV, Jan 03 2023
Subsequence of A267124. - Frank M Jackson, Apr 14 2023

Examples

			a(9) = 23# = 2*3*5*7*11*13*17*19*23 = 223092870 divides the difference 5283234035979900 in the arithmetic progression of 26 primes A204189. - _Jonathan Sondow_, Jan 15 2012
		

References

  • 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.
  • G. H. Hardy, Ramanujan: twelve lectures on subjects suggested by his life and work, Cambridge, University Press, 1940, p. 49.
  • P. Ribenboim, The Book of Prime Number Records. Springer-Verlag, NY, 2nd ed., 1989, p. 4.
  • 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, page 114.
  • D. Wolfe and S. Hirshberg, Underspecified puzzles, in Tribute to A Mathemagician, Peters, 2005, pp. 73-74.

Crossrefs

A034386 gives the second version of the primorial numbers.
Subsequence of A005117 and of A064807. Apart from the first term, a subsequence of A083207.
Cf. A001615, A002182, A002201, A003418, A005235, A006862, A034444 (unitary divisors), A034448, A034387, A033188, A035345, A035346, A036691 (compositorial numbers), A049345 (primorial base representation), A057588, A060735 (and integer multiples), A061742 (squares), A072938, A079266, A087315, A094348, A106037, A121572, A053589, A064648, A132120, A260188.
Cf. A061720 (first differences), A143293 (partial sums).
Cf. also A276085, A276086.
The following fractions are all related to each other: Sum 1/n: A001008/A002805, Sum 1/prime(n): A024451/A002110 and A106830/A034386, Sum 1/nonprime(n): A282511/A282512, Sum 1/composite(n): A250133/A296358.

Programs

  • Haskell
    a002110 n = product $ take n a000040_list
    a002110_list = scanl (*) 1 a000040_list
    -- Reinhard Zumkeller, Feb 19 2012, May 03 2011
    
  • Magma
    [1] cat [&*[NthPrime(i): i in [1..n]]: n in [1..20]]; // Bruno Berselli, Oct 24 2012
    
  • Magma
    [1] cat [&*PrimesUpTo(p): p in PrimesUpTo(60)]; // Bruno Berselli, Feb 08 2015
    
  • Maple
    A002110 := n -> mul(ithprime(i),i=1..n);
  • Mathematica
    FoldList[Times, 1, Prime[Range[20]]]
    primorial[n_] := Product[Prime[i], {i, n}]; Array[primorial,20] (* José María Grau Ribas, Feb 15 2010 *)
    Join[{1}, Denominator[Accumulate[1/Prime[Range[20]]]]] (* Harvey P. Dale, Apr 11 2012 *)
  • PARI
    a(n)=prod(i=1,n, prime(i)) \\ Washington Bomfim, Sep 23 2008
    
  • PARI
    p=1; for (n=0, 100, if (n, p*=prime(n)); write("b002110.txt", n, " ", p) )  \\ Harry J. Smith, Nov 13 2009
    
  • PARI
    a(n) = factorback(primes(n)) \\ David A. Corneth, May 06 2018
    
  • Python
    from sympy import primorial
    def a(n): return 1 if n < 1 else primorial(n)
    [a(n) for n in range(51)]  # Indranil Ghosh, Mar 29 2017
    
  • Sage
    [sloane.A002110(n) for n in (1..20)] # Giuseppe Coppoletta, Dec 05 2014
    
  • Scheme
    ; with memoization-macro definec
    (definec (A002110 n) (if (zero? n) 1 (* (A000040 n) (A002110 (- n 1))))) ;; Antti Karttunen, Aug 30 2016

Formula

Asymptotic expression for a(n): exp((1 + o(1)) * n * log(n)) where o(1) is the "little o" notation. - Dan Fux (dan.fux(AT)OpenGaia.com or danfux(AT)OpenGaia.com), Apr 08 2001
a(n) = A054842(A002275(n)).
Binomial transform = A136104: (1, 3, 11, 55, 375, 3731, ...). Equals binomial transform of A121572: (1, 1, 3, 17, 119, 1509, ...). - Gary W. Adamson, Dec 14 2007
a(0) = 1, a(n+1) = prime(n)*a(n). - Juri-Stepan Gerasimov, Oct 15 2010
a(n) = Product_{i=1..n} A000040(i). - Jonathan Vos Post, Jul 17 2008
a(A051838(n)) = A116536(n) * A007504(A051838(n)). - Reinhard Zumkeller, Oct 03 2011
A000005(a(n)) = 2^n. - Carlos Eduardo Olivieri, Jun 16 2015
a(n) = A035345(n) - A005235(n) for n > 0. - Jonathan Sondow, Dec 02 2015
For all n >= 0, a(n) = A276085(A000040(n+1)), a(n+1) = A276086(A143293(n)). - Antti Karttunen, Aug 30 2016
A054841(a(n)) = A002275(n). - Michael De Vlieger, Aug 31 2016
a(n) = A270592(2*n+2) - A270592(2*n+1) if 0 <= n <= 4 (conjectured for all n by Alon Kellner). - Jonathan Sondow, Mar 25 2018
Sum_{n>=1} 1/a(n) = A064648. - Amiram Eldar, Oct 16 2020
Sum_{n>=1} (-1)^(n+1)/a(n) = A132120. - Amiram Eldar, Apr 12 2021
Theta being Chebyshev's theta function, a(0) = exp(theta(1)), and for n > 0, a(n) = exp(theta(m)) for A000040(n) <= m < A000040(n+1) where m is an integer. - Miles Englezou, Nov 26 2024

A037153 a(n) = p-n!, where p is the smallest prime > n!+1.

Original entry on oeis.org

2, 3, 5, 5, 7, 7, 11, 23, 17, 11, 17, 29, 67, 19, 43, 23, 31, 37, 89, 29, 31, 31, 97, 131, 41, 59, 47, 67, 223, 107, 127, 79, 37, 97, 61, 131, 311, 43, 97, 53, 61, 97, 71, 47, 239, 101, 233, 53, 83, 61, 271, 53, 71, 223, 71, 149, 107, 283, 293, 271, 769, 131, 271, 67, 193
Offset: 1

Views

Author

Keywords

Comments

Analogous to Fortunate numbers and like them, the entries appear to be primes. In fact, the first 1200 terms are primes. Are all terms prime?
a(n) is the first (smallest) m such that m > 1 and n!+ m is prime. The second such m is A087202(n). a(n) must be greater than nextprime(n)-1. - Farideh Firoozbakht, Sep 01 2003
Sequence A069941, which counts the primes between n! and n!+n^2, provides numerical evidence that the smallest prime p greater than n!+1 is a prime distance from n!; that is, p-n! is a prime number. For p-n! to be a composite number, p would have to be greater than n!+n^2, which would imply that A069941(n)=0. - T. D. Noe, Mar 06 2010
The first 4003 terms are prime. - Dana Jacobsen, May 10 2015

Crossrefs

Programs

  • Magma
    z:=125; [p-f where p is NextPrime(f+1) where f is Factorial(n): n in [1..z]]; // Klaus Brockhaus, Mar 02 2010
    
  • Mathematica
    NextPrime[ n_Integer ] := (k=n+1; While[ !PrimeQ[ k ], k++ ]; Return[ k ]); f[ n_Integer ] := (p = n! + 1; q = NextPrime[ p ]; Return[ q - p + 1 ]); Table[ f[ n ], {n, 1, 75} ] (* Robert G. Wilson v *)
  • MuPAD
    for n from 1 to 65 do f := n!:a := nextprime(f+2)-f:print(a) end_for; // Zerinvary Lajos, Feb 22 2007
    
  • PARI
    a(n)=nextprime(n!+2)-n! \\ Charles R Greathouse IV, Jul 02 2013; Corrected by Dana Jacobsen, May 10 2015
    
  • Perl
    use ntheory ":all"; for my $n (1..1000) { my $f=factorial($n); say "$n ",next_prime($f+1)-$f; } # Dana Jacobsen, May 10 2015
    
  • Python
    from sympy import factorial, nextprime
    def a(n): fn = factorial(n); return nextprime(fn+1) - fn
    print([a(n) for n in range(1, 66)]) # Michael S. Branicky, May 22 2022

Extensions

Edited by N. J. A. Sloane, Mar 06 2010

A055211 Lesser Fortunate numbers.

Original entry on oeis.org

3, 7, 11, 13, 17, 29, 23, 43, 41, 73, 59, 47, 89, 67, 73, 107, 89, 101, 127, 97, 83, 89, 97, 251, 131, 113, 151, 263, 251, 223, 179, 389, 281, 151, 197, 173, 239, 233, 191, 223, 223, 293, 593, 293, 457, 227, 311, 373, 257, 307, 313, 607, 347, 317, 307, 677, 467
Offset: 2

Views

Author

Robert G. Wilson v, Jul 04 2000

Keywords

Comments

a(1) is not defined. The first 1000 terms are all prime and it is conjectured that all terms are primes.
a(n) is the smallest m such that m > 1 and A002110(n) - m is prime. For n > 2, a(n) must be greater than prime(n+1) - 1. - Farideh Firoozbakht, Aug 20 2003

Examples

			a(3) = 7 since 2*3*5 = 30, 30-1 = 29, previous prime is 23, 30-23 = 7.
		

Crossrefs

Programs

  • Maple
    for n from 2 to 60 do printf(`%d,`,product(ithprime(j), j=1..n) - prevprime(product(ithprime(j), j=1..n)-1)) od:
  • Mathematica
    PrevPrime[ n_Integer ] := Module[ {k = n - 1}, While[ ! PrimeQ[ k ], k-- ]; k ]; Primorial[ n_Integer ] := Module[ {k = Product[ Prime[ j ], {j, 1, n} ]}, k ]; LF[ n_Integer ] := (p = Primorial[ n ] - 1; q = PrevPrime[ p ]; p - q + 1); Table[ LF[ n ], {n, 2, 60} ]
    a[2]=3; a[n_] := (For[m=(Prime[n+1]+1)/2, !PrimeQ[Product[Prime[k], {k, n}] - 2m+1], m++ ]; 2m-1); Table[a[n], {n, 2, 60}]

Formula

a(n) = 1 + the difference between the n-th primorial less one and the previous prime.
From Pierre CAMI, Aug 19 2017: (Start)
Limit_{N->oo} (Sum_{n=2..N} a(n)) / (Sum_{n=2..N} prime(n)) = Pi/2.
Floor(a(n) / prime(n)) is always < 8. (End)
Conjecture: Limit_{N->oo} (Sum_{n=2..N} a(n)) / (Sum_{n=2..N} prime(n)) = 3/2. - Alain Rocchelli, Nov 07 2022
Showing 1-10 of 57 results. Next