login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A240082 Numbers n such that k^n-(k-1)^n-...-3^n-2^n-1 is prime for some k. 1
2, 3, 4, 5, 6, 7, 8, 12, 13, 16, 17, 19, 31, 34, 48, 61, 68, 72, 89, 107, 112, 124, 127, 236, 260, 288, 384, 396, 432, 520, 521, 576, 607, 1080, 1244, 1279, 1424, 1500, 1660, 2203, 2281, 2640, 2730, 2808, 3190, 3217, 4150, 4253, 4423, 4428, 5016, 5892 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

These are the values of n such that A240081(n) is nonzero.

LINKS

Table of n, a(n) for n=1..52.

PROG

(Python)

import sympy

from sympy import isprime

def Leq(n):

..for k in range(1000):

....num = k**n

....for i in range(2, k):

......num -= i**n

......if num < 1:

........return None

....if isprime(num-1):

......return k

n = 1

while n < 10**3:

..if Leq(n) != None:

....print(n)

..n += 1

(PARI) f(n)=for(k=1, 10^3, num=k^n; for(i=2, k-1, num-=i^n; if(num<1, return(0))); if(ispseudoprime(num-1), return(k))); n=1; while(n<10^3, if(f(n), print(n)); n+=1)

CROSSREFS

Cf. A240081.

Sequence in context: A119797 A032972 A210585 * A321334 A238084 A211202

Adjacent sequences:  A240079 A240080 A240081 * A240083 A240084 A240085

KEYWORD

nonn

AUTHOR

Derek Orr, Mar 31 2014

EXTENSIONS

a(34)-a(52) from Giovanni Resta, Apr 02 2014

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 20 17:27 EDT 2019. Contains 324234 sequences. (Running on oeis4.)