OFFSET
3,1
COMMENTS
The discriminant D of the quadratic equation n^2 + p*n + q = 0 is D = p^2 - 4*q. Let p = q = prime(n) then a(n) = D. 0 < n <= 2, D < 0, is the « casus irreducibilis ». So the offset is set to n = 3 to get positive integers as real solutions. Remark: a(0) is not defined, a(1) = -4, a(2) = -3.
LINKS
Jens Kruse Andersen, Table of n, a(n) for n = 3..10000
EXAMPLE
For n = 6, prime(6) = 13, so a(6) = 13^2 - 4*13 = 169 - 52 = 117.
MAPLE
MATHEMATICA
Table[Prime[n]^2 - 4 Prime[n], {n, 3, 50}] (* Wesley Ivan Hurt, Jul 12 2014 *)
#^2-4#&/@Prime[Range[3, 50]] (* Harvey P. Dale, Apr 03 2022 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Freimut Marschner, Jul 10 2014
STATUS
approved