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
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, 85, 17, 7, 21, 511, 27, 27, 59, 3, 19, 91, 45, 3, 29, 321, 65, 9, 379, 69, 125, 49, 5, 9, 45, 289, 341, 61, 89, 171, 171, 139, 21, 139, 75, 25, 49, 15, 51, 57, 175 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
EXAMPLE
n=1, 3-2=1 is not prime, 5-2=3 is a prime number. So a(1) = 5.
n=2, 3^2-2=7 is a prime number. So a(2) = 3.
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.
MAPLE
A245516 := proc(n)
for k from 1 by 2 do
if isprime(k^n-2) then
return k;
end if;
end do:
end proc:
seq(A245516(n), n=1..60) ;
MATHEMATICA
Table[n = 1;
While[n = n + 2; cp = n^i - 2; ! PrimeQ[cp]]; n, {i, 1, 68}]
CROSSREFS
Cf. A095303.
Sequence in context: A241624 A159275 A059031 * A073243 A134943 A105372
KEYWORD
nonn
AUTHOR
Lei Zhou, Jul 24 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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 15 17:56 EDT 2024. Contains 374333 sequences. (Running on oeis4.)