%I #4 Jun 04 2014 15:02:27
%S 1,1,2,1,2,1,2,2,2,1,564,1,10,2,2,1,14,1,2,2,8,1,2,5,2,3,2,1,2,1,252,
%T 3,20,2,6,1,2,2,4,1,24,1,2,2,2,1,2,3,2,17,24,1,2,2,2,3,4,1,2,1,4,11,2,
%U 2,2,1,2,555,2,1,8,1,12,3,2,3,6,1,4,6,680,1,6,2,2,3,132
%N Least number k such that n^k - n^(k-1) - ... - n^2 - n - 1 is prime.
%C a(n) = 1 iff n-1 is prime.
%e 5^1 - 5^0 = 4 is not prime. 5^2 - 5^1 - 5^0 = 19 is prime. Thus a(5) = 2.
%o (PARI) a(n)=for(k=1,10^3,if(ispseudoprime(n^k-sum(i=0,k-1,n^i)),return(k)))
%o n=1;while(n<100,print1(a(n),", ");n++)
%K nonn
%O 3,3
%A _Derek Orr_, Jun 04 2014