login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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
OFFSET
1,1
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: A159275 A374990 A059031 * A073243 A134943 A105372
KEYWORD
nonn
AUTHOR
Lei Zhou, Jul 24 2014
STATUS
approved