cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A161550 Largest prime <= n^2+n.

This page as a plain text file.
%I A161550 #13 Mar 27 2014 22:04:32
%S A161550 2,5,11,19,29,41,53,71,89,109,131,151,181,199,239,271,293,337,379,419,
%T A161550 461,503,547,599,647,701,751,811,863,929,991,1051,1117,1187,1259,1327,
%U A161550 1399,1481,1559,1637,1721,1801,1889,1979,2069,2161,2251,2351,2447,2549,2647
%N A161550 Largest prime <= n^2+n.
%H A161550 Nathaniel Johnston, <a href="/A161550/b161550.txt">Table of n, a(n) for n = 1..10000</a>
%p A161550 A161550 := proc(n) return prevprime(n*(n+1)+1): end: seq(A161550(n),n=1..51); # _Nathaniel Johnston_, May 01 2011
%t A161550 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 *)
%t A161550 Join[{2},Table[NextPrime[n^2+n,-1],{n,2,60}]] (* _Harvey P. Dale_, May 01 2011 *)
%o A161550 (PARI) a(n)=precprime(n^2+n) \\ _Charles R Greathouse IV_, Mar 27 2014
%K A161550 easy,nonn
%O A161550 1,1
%A A161550 _Daniel Tisdale_, Jun 13 2009
%E A161550 More terms from _Vladimir Joseph Stephan Orlovsky_, Jun 13 2009