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!)
A171751 Maximum k with 1 <= k <= n such that nk + 1 is prime (or 0 if no such prime exists). 1
1, 2, 2, 4, 2, 6, 6, 5, 8, 10, 8, 9, 12, 14, 14, 16, 14, 17, 12, 20, 20, 21, 20, 24, 24, 26, 20, 27, 18, 27, 22, 29, 30, 33, 30, 36, 34, 32, 38, 40, 38, 41, 40, 33, 40, 43, 44, 45, 34, 47, 50, 49, 44, 54, 54, 56, 54, 57, 54, 59, 58, 59, 62, 54, 54, 66, 66, 65, 58, 69, 60, 71, 64 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
It is conjectured that nonzero terms exist for each n: see A089727, the main entry.
a(n) = n iff n is a term of A005574.
LINKS
MATHEMATICA
mk[n_]:=Module[{k=n}, While[!PrimeQ[n*k+1], k--]; If[k<1, 0, k]]; Array[mk, 80] (* Harvey P. Dale, Sep 24 2017 *)
PROG
(PARI) {A171751(n) = local(k); k=n; while(!isprime(n*k+1) && k>0, k--); k}
CROSSREFS
Cf. A089727 (corresponding primes), A005574.
Sequence in context: A078429 A360523 A358039 * A124676 A076249 A062170
KEYWORD
nonn
AUTHOR
Rick L. Shepherd, Dec 17 2009
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 April 19 19:02 EDT 2024. Contains 371798 sequences. (Running on oeis4.)