login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A239474 Smallest k >= 1 such that k^n-n is prime. a(n) = 0 if no such k exists. 1

%I #13 Mar 21 2014 12:10:15

%S 3,2,2,0,4,5,60,3,2,21,28,5,2,199,28,0,234,11,2,3,2,159,10,31,68,145,

%T 0,69,186,163,32,253,26,261,4,0,8,11,62,3,22,43,6,7,8,945,76,7,116,

%U 129,382,93,330,361,2,555,224,1359,78,29,62,39,110,0,1032,37,462,29

%N Smallest k >= 1 such that k^n-n is prime. a(n) = 0 if no such k exists.

%C If n is of the form (pk)^p for some k and some prime p, then a(n) = 0 (See A097764).

%F a(A097764(n)) = 0 for all n.

%e 1^1-1 = 0 is not prime. 2^1-1 = 1 is not prime. 3^1-1 = 2 is prime. Thus, a(1) = 3.

%o (Python)

%o import sympy

%o from sympy import isprime

%o def TwoMin(x):

%o ..for k in range(1,5000):

%o ....if isprime(k**x-x):

%o ......return k

%o x = 1

%o while x < 100:

%o ..print(TwoMin(x))

%o ..x += 1

%Y Cf. A072883, A028870, A153974, A239413, A239414, A239415, A239416, A239417, A239418.

%K nonn

%O 1,1

%A _Derek Orr_, Mar 20 2014

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 08:27 EDT 2024. Contains 371964 sequences. (Running on oeis4.)