login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A089727 Largest prime of the form n*k+1, k <= n. 3
2, 5, 7, 17, 11, 37, 43, 41, 73, 101, 89, 109, 157, 197, 211, 257, 239, 307, 229, 401, 421, 463, 461, 577, 601, 677, 541, 757, 523, 811, 683, 929, 991, 1123, 1051, 1297, 1259, 1217, 1483, 1601, 1559, 1723, 1721, 1453, 1801, 1979, 2069, 2161, 1667, 2351, 2551 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
EXAMPLE
a(5)=11 because 5*2+1=11 is prime, whereas 5*5+1=26, 5*4+1=21 and 5*3+1=16 are composite.
MATHEMATICA
f[n_] := Block[{k = n}, While[ !PrimeQ[k*n + 1], k-- ]; k*n + 1]; Array[f, 51] (* Robert G. Wilson v, Dec 17 2009 *)
PROG
(PARI) A089727(n) = {local(k); k=n; while(!isprime(n*k+1), k--); n*k+1} \\ Michael B. Porter, Dec 17 2009
CROSSREFS
Cf. A089726.
Sequence in context: A082088 A075881 A208241 * A113514 A145674 A067161
KEYWORD
nonn,easy
AUTHOR
Amarnath Murthy, Nov 18 2003
EXTENSIONS
More terms from Hugo Pfoertner, Apr 01 2004
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 28 16:58 EDT 2024. Contains 371254 sequences. (Running on oeis4.)