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-4 of 4 results.

A064819 a(n) = p(1)*p(2)*...*p(n) - p(n+1)^2, where p(i) = i-th prime.

Original entry on oeis.org

-7, -19, -19, 89, 2141, 29741, 510149, 9699161, 223092029, 6469692269, 200560488761, 7420738133129, 304250263525361, 13082761331667821, 614889782588488601, 32589158477190041249, 1922760350154212635349, 117288381359406970978781
Offset: 1

Views

Author

N. J. A. Sloane, Oct 23 2001

Keywords

Comments

It is known that a(n) > 0 for n >= 4.

References

  • R. Honsberger, Mathematical Diamonds, MAA, 2003, see p. 79. [Added by N. J. A. Sloane, Jul 05 2009]
  • H. Rademacher & O. Toeplitz, The Enjoyment of Mathematics, pp. 187-192 Dover NY 1990.
  • J. V. Uspensky and M. A. Heaslet, Elementary Number Theory, McGraw-Hill, NY, 1939.

Crossrefs

Programs

  • Mathematica
    FoldList[Times, Most[#]] - Rest[#]^2 & [Prime[Range[25]]] (* Paolo Xausa, Nov 06 2024 *)
  • PARI
    { p=1; for (n=1, 100, p*=prime(n); write("b064819.txt", n, " ", p - prime(n + 1)^2) ) } \\ Harry J. Smith, Sep 27 2009
    
  • PARI
    a(n) = prod(k=1, n, prime(k)) - prime(n+1)^2; \\ Michel Marcus, Jun 19 2018
    
  • Python
    from sympy import prime, primorial
    def A064819(n): return primorial(n)-prime(n+1)**2 # Chai Wah Wu, Feb 24 2023

A060881 n-th primorial (A002110) + prime(n + 1).

Original entry on oeis.org

3, 5, 11, 37, 221, 2323, 30047, 510529, 9699713, 223092899, 6469693261, 200560490167, 7420738134851, 304250263527253, 13082761331670077, 614889782588491463, 32589158477190044789, 1922760350154212639131
Offset: 0

Views

Author

N. J. A. Sloane, May 05 2001

Keywords

Comments

Terms are pairwise coprime with very high probability. I didn't find terms which are pairwise noncoprime, although it may be a case of the "strong law of small numbers." - Daniel Forgues, Apr 23 2012
All numbers in the range [primorial(n)+2, a(n)-1] are guaranteed to be a multiple of a prime p whose index is <= n. There are prime(n+1)-2 = A040976(n+1) such numbers. - Jamie Morken and Michel Marcus, Feb 01 2018

Examples

			a(2) = 2*3 + 5 = 11.
		

Crossrefs

Programs

  • Maple
    a:= n-> mul(ithprime(k), k=1..n)+ithprime(n+1): seq(a(n), n=0..20);  # Muniru A Asiru, Feb 01 2018
  • Mathematica
    Module[{nn=20,pr},pr=Prime[Range[nn+1]];Join[{3},FoldList[ Times,Most[ pr]] + Rest[pr]]] (* Harvey P. Dale, Feb 19 2016 *)
    Total /@ Fold[Append[#1, {Prime[#2] #1[[-1, 1]], Prime[#2 + 1]}] &, {{1, 2}}, Range@ 17] (* Michael De Vlieger, Feb 21 2018 *)
  • PARI
    { n=-1; m=1; forprime (p=2, prime(101), write("b060881.txt", n++, " ", m + p); m*=p; ) } \\ Harry J. Smith, Jul 19 2009
    
  • PARI
    a(n) = prod(i=1, n, prime(i)) + prime(n+1); \\ Michel Marcus, Feb 01 2018

Formula

a(n) = A002110(n) + A000040(n+1). - Michel Marcus, Feb 01 2018

Extensions

Name changed by David A. Corneth, Mar 25 2018

A367182 Primes of the form (k-th primorial) - (k+1)st prime.

Original entry on oeis.org

23, 199, 2297, 30013, 9699667, 3217644767340672907899084554047, 267064515689275851355624017992701, 23768741896345550770650537601358213, 1492182350939279320058875736615841068547583863326864530259
Offset: 1

Views

Author

Daniel D Gibson, Nov 08 2023

Keywords

Comments

Conjecture: sequence is infinite.

Examples

			primorial(4) - prime(4+1) = 2*3*5*7 - prime(5) = 210 - 11 = 199, which is prime, so 199 is a term.
		

Crossrefs

Cf. A002110, A093078, A249798 (corresponding k's).
The prime numbers in A060882.
A038708 with subtraction instead of addition.

A309671 Primes prime(m) such that G = prime(m-1)# - prime(m) is prime.

Original entry on oeis.org

7, 11, 13, 17, 23, 83, 89, 97, 151, 373, 433, 857, 4013, 8821, 12959
Offset: 1

Views

Author

Mohamed Sami Gattoufi, Aug 11 2019

Keywords

Comments

G = prime(n-1)# - prime(n) where G is a prime is a special case of A090188 where (k=1).

Examples

			7 is a term because 23 = 2*3*5 - 7 is prime.
		

Crossrefs

Programs

  • PARI
    primo(p) = my(ip=primepi(p)); factorback(primes(ip)); \\ A002110
    isok(p) = isprime(p) && isprime(primo(precprime(p-1)) - p);
Showing 1-4 of 4 results.