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-1 of 1 results.

A293559 Least prime p such that n*(p^n-1)-1 is prime.

Original entry on oeis.org

5, 2, 11, 2, 5, 29, 7, 2, 47, 71, 167, 2, 571, 23, 59, 2, 73, 53, 349, 5, 59, 1259, 769, 17, 1021, 1117, 73, 5, 1049, 5, 109, 137, 947, 29, 89, 1019, 67, 29, 97, 2, 2111, 569, 271, 53, 191, 5, 251, 113, 2029, 569, 17, 1453, 1049, 1151, 211, 7, 47, 677, 29
Offset: 1

Views

Author

Vincenzo Librandi, Oct 12 2017

Keywords

Comments

Note that f_n(p) = n*(p^n-1)-1 = n*p^n-(n+1) is irreducible over the rationals as a polynomial in p: if n <> 8 Eisenstein's criterion applies to either f_n(p) or its reversal -(n+1)*p^n+n, using Mihailescu's theorem. Thus the generalized Bunyakovsky conjecture implies a(n) always exists. - Robert Israel, Oct 24 2017

Examples

			For n=5, 5*(5^5-1)-1 = 15619 is prime, but 5*(p^5-1)-1 is not prime for primes p < 5, so a(5)=5.
		

Crossrefs

Cf. A283450.

Programs

  • Maple
    f:= proc(n) local p;
      p:= 2;
      while not isprime(n*(p^n-1)-1) do p:= nextprime(p) od:
      p
    end proc:
    map(f, [$1..100]); # Robert Israel, Oct 24 2017
  • Mathematica
    Table[p=2; While[!PrimeQ[n (p^n - 1) - 1], p=NextPrime@p]; p, {n, 100}]
  • PARI
    a(n) = forprime(p=2, , if(ispseudoprime(n*(p^n-1)-1), return(p))) \\ Iain Fox, Oct 23 2017
Showing 1-1 of 1 results.