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.

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

Original entry on oeis.org

2, 2, 3, 2, 19, 2, 5, 17, 13, 7, 1129, 59, 47, 7, 19, 7, 31, 79, 11, 37, 199, 5, 907, 43, 5, 43, 3, 13, 919, 2, 13, 2, 263, 127, 241, 3, 131, 71, 11, 421, 223, 2, 31, 3, 7, 89, 3673, 61, 293, 5, 131, 919, 3, 3, 349, 457, 1091, 461, 67, 7, 331, 7177, 571, 43, 1621, 109, 2521, 3, 1061, 5, 967, 1093, 1423
Offset: 1

Views

Author

Robert Israel, Mar 07 2017

Keywords

Comments

a(n) is the least prime p such that p^n is in A280257.
The generalized Dickson conjecture would imply that a(n) exists for all n.
a(n) = 2 for n in A046847.

Examples

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

Crossrefs

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]);
  • Mathematica
    Table[p=2; While[!PrimeQ[n (p^n-1)+1], p=NextPrime@p]; p, {n, 100}] (* Vincenzo Librandi, Oct 11 2017 *)
  • PARI
    a(n)=forprime(p=2,, if(ispseudoprime(n*(p^n-1)+1), return(p))) \\ Charles R Greathouse IV, Mar 07 2017