A060882 a(n) = n-th primorial (A002110) minus next prime.
-1, -1, 1, 23, 199, 2297, 30013, 510491, 9699667, 223092841, 6469693199, 200560490093, 7420738134769, 304250263527167, 13082761331669983, 614889782588491357, 32589158477190044671, 1922760350154212639009
Offset: 0
Keywords
References
- R. Honsberger, Mathematical Diamonds, MAA, 2003, see p. 79. [Added by N. J. A. Sloane, Jul 05 2009]
Links
- Harry J. Smith, Table of n, a(n) for n = 0..100
- Hisanori Mishima, P1 * Pn + NextPrime (n = 1 to 100)
- Hisanori Mishima, P1 * Pn - NextPrime (n = 1 to 100)
- Hisanori Mishima, P1 * Pn + 1 (n = 1 to 100)
- Hisanori Mishima, P1 * Pn - 1 (n = 1 to 100)
- Hisanori Mishima, WIFC (World Integer Factorization Center)
Programs
-
Maple
pp:=n->mul(ithprime(i),i=1..n); [seq(pp(n)-ithprime(n+1),n=1..20)];
-
Mathematica
Join[{-1},With[{nn=20},#[[1]]-#[[2]]&/@Thread[{FoldList[Times,1, Prime[ Range[nn]]],Prime[Range[nn+1]]}]]] (* Harvey P. Dale, May 10 2013 *)
-
PARI
{ n=-1; m=1; forprime (p=2, prime(101), write("b060882.txt", n++, " ", m - p); m*=p; ) } \\ Harry J. Smith, Jul 13 2009
-
Python
from sympy import prime, primorial def A060882(n): return primorial(n)-prime(n+1) if n else -1 # Chai Wah Wu, Feb 25 2023
Comments