cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-1 of 1 results.

A329582 Numbers between a power and a prime.

Original entry on oeis.org

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

Views

Author

S. Brunner, Nov 17 2019

Keywords

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.

Examples

			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
		

Crossrefs

Programs

  • PARI
    isok(k) = (k==1) || (k==2) || (ispower(k-1) && isprime(k+1)) || (isprime(k-1) && ispower(k+1)); \\ Michel Marcus, Nov 18 2019
Showing 1-1 of 1 results.