OFFSET
1,2
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..2000
FORMULA
a(n) = A086801(n+1). - R. J. Mathar, May 09 2010
EXAMPLE
a(2) = 2 since (2 + 2)^2 - (2 + 1)^2 - 2 = 5.
MAPLE
A154115 := proc(n) ithprime(n+1)-3 ; end proc: # R. J. Mathar, May 09 2010
MATHEMATICA
a[n_]:=(n+2)^2-(n+1)^2-n; lst={}; Do[If[PrimeQ[a[n]], AppendTo[lst, n]], {n, 6!}]; lst
Select[Range[0, 300], PrimeQ[(#+2)^2-(#+1)^2-#]&] (* Harvey P. Dale, Nov 06 2013 *)
Prime[Range[2, 100]]-3 (* Harvey P. Dale, Jul 15 2017 *)
PROG
(Magma) [n: n in [0..500] | IsPrime((n+2)^2-(n+1)^2-n)] # Vincenzo Librandi, Nov 26 2010
(PARI) is(n)=isprime(n+3) \\ Charles R Greathouse IV, Sep 02 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vladimir Joseph Stephan Orlovsky, Jan 04 2009
EXTENSIONS
New name based on a comment by Franklin T. Adams-Watters, Jan 30 2009
STATUS
approved