%I #14 Oct 11 2017 05:06:43
%S 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,
%T 43,3,13,919,2,13,2,263,127,241,3,131,71,11,421,223,2,31,3,7,89,3673,
%U 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
%N Least prime p such that n*(p^n-1)+1 is prime.
%C a(n) is the least prime p such that p^n is in A280257.
%C The generalized Dickson conjecture would imply that a(n) exists for all n.
%C a(n) = 2 for n in A046847.
%H Robert Israel, <a href="/A283450/b283450.txt">Table of n, a(n) for n = 1..600</a>
%e 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.
%p f:= proc(n) local p;
%p p:= 2:
%p while not isprime(n*(p^n-1)+1) do p:= nextprime(p) od;
%p p
%p end proc:
%p map(f, [$1..100]);
%t Table[p=2; While[!PrimeQ[n (p^n-1)+1], p=NextPrime@p]; p, {n, 100}] (* _Vincenzo Librandi_, Oct 11 2017 *)
%o (PARI) a(n)=forprime(p=2,, if(ispseudoprime(n*(p^n-1)+1), return(p))) \\ _Charles R Greathouse IV_, Mar 07 2017
%Y Cf. A046847, A280257.
%K nonn
%O 1,1
%A _Robert Israel_, Mar 07 2017