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.

Showing 1-3 of 3 results.

A076845 Least k>0 such that n^k + n - 1 is prime.

Original entry on oeis.org

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
Offset: 2

Views

Author

Benoit Cloitre, Nov 20 2002

Keywords

Comments

From Robert Israel, Apr 07 2025: (Start)
No terms == 5 (mod 6), as x^k + x - 1 is divisible by x^2 - x - 1 when k == 5 (mod 6).
a(113) > 7000 if it exists. (End)

Crossrefs

Programs

  • Haskell
    a076845 n = head [k | k <- [1..], a010051'' (n ^ k + n - 1) == 1]
    -- Reinhard Zumkeller, Jul 17 2014
  • Maple
    f:= proc(n) local k;
        for k from 1 do if isprime(n^k+n-1) then return k fi od
    end proc:
    map(f, [$2..112]); # Robert Israel, Apr 07 2025
  • Mathematica
    lk[n_]:=Module[{k=1},While[!PrimeQ[n^k+n-1],k++];k]; Array[lk,100,2] (* Harvey P. Dale, Jun 29 2017 *)
  • PARI
    a(n) = {my(k=1); while(!isprime(n^k+n-1), k++); k;} \\ Michel Marcus, Nov 29 2013
    

A078179 a(n) is the smallest prime of the form n^k + n - 1 with k >= 2.

Original entry on oeis.org

5, 11, 19, 29, 41, 349, 71, 89, 109, 131, 20747, 181, 2177953337809371149, 239, 271, 83537, 5849, 379, 419, 461, 2494357909, 279863, 599, 15649, 701, 19709, 811, 420707233300229, 929, 991
Offset: 2

Views

Author

Reinhard Zumkeller, Nov 20 2002

Keywords

Examples

			349 = A000040(70) = 7^3+7-1 and 7^2+7-1 = 5*11, therefore a(7) = 349.
		

Crossrefs

Programs

Formula

a(n) = n^A078178(n) + n - 1.

Extensions

More terms from Benoit Cloitre, Nov 20 2002
Offset corrected by Reinhard Zumkeller, Jul 16 2014

A343589 Smallest prime of the form n^k-(n-1) or 0 if no such prime exists.

Original entry on oeis.org

3, 7, 13, 3121, 31, 43, 549755813881, 73, 991, 1321, 248821, 157, 2731, 211, 241, 34271896307617, 307, 6841, 13107199999999999999981, 421, 463, 141050039560662968926081, 331753, 601, 17551, 7625597484961, 757, 1816075630094014572464024421543167816955354437761
Offset: 2

Views

Author

Blake Branstool, Apr 20 2021

Keywords

Comments

All values up to n=70 have been found and proved to be primes. n=71 has k=3019 and gives a probable prime.
See A113516, which gives the k values and is the main entry for these primes, for more extensively researched information. - Peter Munn, Nov 20 2021

Examples

			For n=2 and k=2, 2^2-(2-1)=3 thus a(2)=3. k is 2 as well for n=3,4.
For n=5 the first k to result in a prime is 5, 5^5-(5-1)=3121 thus a(5)=3121.
		

Crossrefs

A113516 gives the k values.

Programs

  • PARI
    a(n) = my(k=1, p); while (!isprime(p=n^k-(n-1)), k++); p; \\ Michel Marcus, Nov 17 2021

Extensions

Name revised by Peter Munn, Nov 16 2021
Showing 1-3 of 3 results.