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!)
A245516 The smallest odd number k such that k^n-2 is a prime number. 1

%I #12 Jul 08 2016 09:48:38

%S 5,3,9,3,3,3,7,7,3,21,9,7,19,5,7,39,15,61,15,19,21,3,19,17,21,5,21,7,

%T 85,17,7,21,511,27,27,59,3,19,91,45,3,29,321,65,9,379,69,125,49,5,9,

%U 45,289,341,61,89,171,171,139,21,139,75,25,49,15,51,57,175

%N The smallest odd number k such that k^n-2 is a prime number.

%H Zak Seidov, <a href="/A245516/b245516.txt">Table of n, a(n) for n = 1..200</a>

%e n=1, 3-2=1 is not prime, 5-2=3 is a prime number. So a(1) = 5.

%e n=2, 3^2-2=7 is a prime number. So a(2) = 3.

%e n=10, for k=3, 5, ..., 19, k^10-2 are all composite. 21^10-2 = 16679880978199 is a prime number. So a(10) = 21.

%p A245516 := proc(n)

%p for k from 1 by 2 do

%p if isprime(k^n-2) then

%p return k;

%p end if;

%p end do:

%p end proc:

%p seq(A245516(n),n=1..60) ;

%t Table[n = 1;

%t While[n = n + 2; cp = n^i - 2; ! PrimeQ[cp]]; n, {i, 1, 68}]

%Y Cf. A095303.

%K nonn

%O 1,1

%A _Lei Zhou_, Jul 24 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 July 15 21:13 EDT 2024. Contains 374334 sequences. (Running on oeis4.)