login
A240083
Numbers n such that k^n-(k-1)^n-...-3^n-2^n is prime for some k.
1
1, 2, 3, 4, 5, 10, 11, 13, 15, 16, 17, 18, 19, 21, 22, 24, 26, 27, 28, 29, 31, 32, 33, 35, 41, 45, 46, 47, 48, 49, 53, 55, 57, 58, 59, 61, 65, 67, 71, 76, 82, 83, 87, 88, 89, 91, 93, 94, 99, 101, 103, 107, 108, 110, 111, 114, 115, 116, 119, 123, 127, 130, 132, 134, 138, 141
OFFSET
1,2
COMMENTS
Also numbers n such that A239472(n) > 0.
PROG
(Python)
import sympy
from sympy import isprime
def Lep(n):
..for k in range(2*10**3):
....num = k**n
....for i in range(2, k):
......num -= i**n
......if num < 0:
........return None
....if isprime(num):
......return k
n = 1
while n < 10**3:
..if Lep(n) != None:
....print(n)
..n += 1
(PARI) a(n)=k=1; while((s=k^n-sum(i=2, k-1, i^n))>0, if(isprime(s), return(k)); k++)
for(n=1, 100, if(a(n), print1(n, ", "))) \\ Derek Orr, Mar 12 2015
CROSSREFS
Cf. A239472.
Sequence in context: A089964 A210495 A179302 * A066996 A126427 A032860
KEYWORD
nonn
AUTHOR
Derek Orr, Mar 31 2014
STATUS
approved