OFFSET
1,1
LINKS
Nathaniel Johnston, Table of n, a(n) for n = 1..10000
MAPLE
A161550 := proc(n) return prevprime(n*(n+1)+1): end: seq(A161550(n), n=1..51); # Nathaniel Johnston, May 01 2011
MATHEMATICA
PrimePrev[n_]:=Module[{k}, k=n-1; While[ !PrimeQ[k], k-- ]; k]; lst={}; Do[a=n^2+n; p=PrimePrev[a]; AppendTo[lst, p], {n, 2, 5!}]; lst (* Vladimir Joseph Stephan Orlovsky, Jun 13 2009 *)
Join[{2}, Table[NextPrime[n^2+n, -1], {n, 2, 60}]] (* Harvey P. Dale, May 01 2011 *)
PROG
(PARI) a(n)=precprime(n^2+n) \\ Charles R Greathouse IV, Mar 27 2014
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Daniel Tisdale, Jun 13 2009
EXTENSIONS
More terms from Vladimir Joseph Stephan Orlovsky, Jun 13 2009
STATUS
approved