%I #14 Mar 12 2015 03:02:43
%S 1,2,3,4,5,10,11,13,15,16,17,18,19,21,22,24,26,27,28,29,31,32,33,35,
%T 41,45,46,47,48,49,53,55,57,58,59,61,65,67,71,76,82,83,87,88,89,91,93,
%U 94,99,101,103,107,108,110,111,114,115,116,119,123,127,130,132,134,138,141
%N Numbers n such that k^n-(k-1)^n-...-3^n-2^n is prime for some k.
%C Also numbers n such that A239472(n) > 0.
%o (Python)
%o import sympy
%o from sympy import isprime
%o def Lep(n):
%o ..for k in range(2*10**3):
%o ....num = k**n
%o ....for i in range(2, k):
%o ......num -= i**n
%o ......if num < 0:
%o ........return None
%o ....if isprime(num):
%o ......return k
%o n = 1
%o while n < 10**3:
%o ..if Lep(n) != None:
%o ....print(n)
%o ..n += 1
%o (PARI) a(n)=k=1;while((s=k^n-sum(i=2,k-1,i^n))>0,if(isprime(s),return(k));k++)
%o for(n=1,100,if(a(n),print1(n,", "))) \\ _Derek Orr_, Mar 12 2015
%Y Cf. A239472.
%K nonn
%O 1,2
%A _Derek Orr_, Mar 31 2014