%I #31 Jan 03 2019 07:02:55
%S 1,1,2,1,1242,1,34,5,2,1,10,1
%N Least number k such that k*n^k + 1 is prime, or 0 if no such number exists.
%C a(n) = 1 if and only if n + 1 is prime.
%C Next term a(13), if it exists, is greater than 1000000. Other unknown terms are at index: 25, 29, 41, 47, 49, 53, 55, 69, 73, 79. (See links). - _Jeppe Stig Nielsen_, Aug 08 2014
%H Guenter Loeh, <a href="http://guenter.loeh.name/gc/status.html">Generalized Cullen primes n b^n + 1</a>
%H Jeppe Stig Nielsen, <a href="/A240234/a240234.txt">Table of a(n) for n = 1..100, with unknown entries denoted by question marks</a>
%e 1*3^1 + 1 = 4 is not prime. 2*3^2 + 1 = 19 is prime. Thus, a(3) = 2.
%o (PARI) a(n) = for(k=1,4000,if(ispseudoprime(k*n^k+1),return(k)))
%o n=1;while(n<100,print1(a(n),", ");n++)
%Y Cf. A089001, A116954.
%K nonn,hard,more
%O 1,3
%A _Derek Orr_, Apr 02 2014