login
A064819
a(n) = p(1)*p(2)*...*p(n) - p(n+1)^2, where p(i) = i-th prime.
4
-7, -19, -19, 89, 2141, 29741, 510149, 9699161, 223092029, 6469692269, 200560488761, 7420738133129, 304250263525361, 13082761331667821, 614889782588488601, 32589158477190041249, 1922760350154212635349, 117288381359406970978781
OFFSET
1,1
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.
LINKS
S. Bulman-Fleming and E. T. H. Wang, Problem 356, College Math. J., 20 (1989), 265.
MATHEMATICA
FoldList[Times, Most[#]] - Rest[#]^2 & [Prime[Range[25]]] (* _Paolo Xausa_, Nov 06 2024 *)
PROG
(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
CROSSREFS
KEYWORD
sign
AUTHOR
_N. J. A. Sloane_, Oct 23 2001
STATUS
approved