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

 

Logo

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 59th year, we have over 358,000 sequences, and we’ve crossed 10,300 citations (which often say “discovered thanks to the OEIS”).

Other ways to Give
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A076845 Least k>0 such that n^k + n - 1 is prime. 4
1, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 2, 16, 1, 1, 4, 3, 1, 2, 1, 1, 4, 1, 3, 2, 1, 2, 10, 1, 1, 108, 3, 1, 2, 1, 1, 2, 2, 1, 2, 1, 3, 2, 1, 2, 20, 2, 1, 2, 1, 1, 2, 1, 1, 2, 1, 4, 2, 2, 7, 8, 3, 1, 2, 1, 24, 2, 1, 1, 12, 4, 3, 8, 1, 1, 4, 3, 1, 194, 3, 1, 2, 1, 2, 2, 1, 8, 2, 1, 1, 4, 2, 2, 54, 1, 1, 4, 1, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET

2,4

LINKS

Table of n, a(n) for n=2..100.

MATHEMATICA

lk[n_]:=Module[{k=1}, While[!PrimeQ[n^k+n-1], k++]; k]; Array[lk, 100, 2] (* Harvey P. Dale, Jun 29 2017 *)

PROG

(PARI) a(n) = {my(k=1); while(!isprime(n^k+n-1), k++); k; } \\ Michel Marcus, Nov 29 2013

(Haskell)

a076845 n = head [k | k <- [1..], a010051'' (n ^ k + n - 1) == 1]

-- Reinhard Zumkeller, Jul 17 2014

CROSSREFS

Cf. A078178, A076846.

Cf. A010051.

Sequence in context: A111178 A279187 A254434 * A161906 A319135 A338884

Adjacent sequences: A076842 A076843 A076844 * A076846 A076847 A076848

KEYWORD

nonn

AUTHOR

Benoit Cloitre, Nov 20 2002

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 December 28 19:31 EST 2022. Contains 359109 sequences. (Running on oeis4.)