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.

A333184 a(n) = n^n - (PrevPrime(n^n) + NextPrime(n^n)) / 2.

Original entry on oeis.org

0, 1, 2, -4, 0, -1, -20, 0, 7, -10, -8, -2, -5, 12, 23, -28, -21, -8, -20, -15, -32, 53, -30, -47, 10, -29, -48, 33, -6, 8, 20, 71, -5, -15, -6, 3, 109, 23, -50, 41, 57, 172, -170, 1, -122, -237, 161, -8, 91, -112, 67, 253, 38, 75, 343, -188, 43, 88, 123, 96
Offset: 2

Views

Author

Hugo Pfoertner, Mar 10 2020

Keywords

Examples

			   n Previous P      n^n       Next P    a(n)
     A098681(n)  A000312(n)  A098682(n)
   2          3           4           5   0
   3         23          27          29   1
   4        251         256         257   2
   5       3121        3125        3137  -4
   6      46649       46656       46663   0
   7     823541      823543      823547  -1
   8   16777213    16777216    16777259 -20
   9  387420479   387420489   387420499   0
  10 9999999967 10000000000 10000000019   7
		

Crossrefs

Cf. A333185 (position of terms = 0).

Programs

  • Maple
    a:= n-> (m-> m-(prevprime(m)+nextprime(m))/2)(n^n):
    seq(a(n), n=2..65);  # Alois P. Heinz, Mar 10 2020
  • PARI
    for(n=2,61, my(f=n^n); print1(f-(precprime(f)+nextprime(f))/2,", "))