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”).

A329582
Numbers between a power and a prime.
2
1, 2, 3, 8, 10, 24, 28, 48, 80, 82, 126, 168, 224, 226, 242, 360, 440, 442, 728, 840, 1088, 1090, 1224, 1368, 1522, 1848, 2026, 2208, 2400, 3024, 3250, 3374, 3720, 3968, 4760, 5040, 5624, 5928, 6562, 6858, 7920, 8648, 9802, 10608, 11026, 11448, 12322, 13688, 13690, 14160, 14640, 15130, 16128, 17160
OFFSET
1,2
COMMENTS
All numbers k where k - 1 is any power with exponent greater than or equal to 2 and k + 1 is a prime number, or vice versa.
If only perfect powers other than 0 and 1 were allowed, then this sequence would start with 3.
All terms greater than 3 are even and follow or precede an odd power.
EXAMPLE
The first 20 terms with their neighbors:
n k-1 k k+1 | n k-1 k k+1
1 0^2 1 2 | 11 5^3 126 127
2 1^2 2 3 | 12 167 168 13^2
3 2 3 2^2 | 13 223 224 15^2
4 7 8 3^2 | 14 15^2 226 227
5 3^2 10 11 | 15 241 242 3^5
6 23 24 5^2 | 16 359 360 19^2
7 3^3 28 29 | 17 439 440 21^2
8 47 48 7^2 | 18 21^2 442 443
9 79 80 3^4 | 19 727 728 3^6
10 3^4 82 83 | 20 839 840 29^2
PROG
(PARI) isok(k) = (k==1) || (k==2) || (ispower(k-1) && isprime(k+1)) || (isprime(k-1) && ispower(k+1)); \\ Michel Marcus, Nov 18 2019
CROSSREFS
Sequence in context: A098844 A034437 A175715 * A138880 A063474 A163492
KEYWORD
nonn
AUTHOR
S. Brunner, Nov 17 2019
STATUS
approved