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

 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 59th year, we have over 358,000 sequences, and we’ve crossed 10,300 citations (which often say “discovered thanks to the OEIS”). Other ways to Give
 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A296422 Primes that can be represented in the form b^n+1 or b^n-1 where b >= 2 and n >= 2. 1
 3, 5, 7, 17, 31, 37, 101, 127, 197, 257, 401, 577, 677, 1297, 1601, 2917, 3137, 4357, 5477, 7057, 8101, 8191, 8837, 12101, 13457, 14401, 15377, 15877, 16901, 17957, 21317, 22501, 24337, 25601, 28901, 30977, 32401, 33857, 41617, 42437, 44101, 50177, 52901 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 COMMENTS Union of A000668 and A121326. - Andrey Zabolotskiy, Dec 21 2017 LINKS Robert Israel, Table of n, a(n) for n = 1..10000 MAPLE N:= 10^5: # to get terms <= N R:= 3: for b from 2 while b^2+1 <= N do p:= 2: do p:= nextprime(p); if b^p-1 > N then break fi; if isprime(b^p-1) then R:= R, b^p-1 fi; od: p:= 1: do p:= 2*p; if b^p+1 > N then break fi; if isprime(b^p+1) then R:= R, b^p+1 fi; od; od: sort(convert({R}, list)); # Robert Israel, Jan 08 2018 MATHEMATICA Select[Prime@ Range[2, 10^4], AnyTrue[# + {-1, 1}, Or[# == 1, GCD @@ FactorInteger[#][[All, -1]] > 1] &] &] (* Michael De Vlieger, Dec 13 2017 *) PROG (PARI) lista(nn) = {forprime(p=2, nn, if ((p==2) || ispower(p+1) || ispower(p-1), print1(p, ", ")); ); } \\ Michel Marcus, Dec 13 2017 CROSSREFS Cf. A000040 (primes), A001597 (perfect powers). Cf. A000668 (Mersenne primes), A121326. Sequence in context: A032496 A002092 A274906 * A174394 A057476 A016041 Adjacent sequences: A296419 A296420 A296421 * A296423 A296424 A296425 KEYWORD nonn AUTHOR Nathaniel J. Strout, Dec 12 2017 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.

Last modified December 1 22:55 EST 2022. Contains 358485 sequences. (Running on oeis4.)