OFFSET
1,3
COMMENTS
a(n) is never a perfect square for n>=5. [Proof: assume on the contrary n^2 - prime(n) = k^2, equivalent to (n+k)*(n-k) = prime(n). Since prime(n) cannot be the product of two nontrivial factors, this equation can only hold for k=n-1, i.e., prime(n)=2n-1. This contradicts the assumption and completes the proof.] - Alexander R. Povolotsky, Oct 01 2008
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..1000
MATHEMATICA
Table[n^2 - Prime[n], {n, 1, 55}]
PROG
(PARI) for(n=1, 51, print1(n*n-prime(n), ", "))
(Magma) [n^2 - NthPrime(n): n in [1..100] ]; // Vincenzo Librandi, Apr 12 2011
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Werner D. Sand, Aug 27 2002
EXTENSIONS
More terms from Klaus Brockhaus and Robert G. Wilson v, Aug 28 2002
STATUS
approved