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-5 of 5 results.

A098682 Smallest prime larger than n^n.

Original entry on oeis.org

2, 5, 29, 257, 3137, 46663, 823547, 16777259, 387420499, 10000000019, 285311670673, 8916100448291, 302875106592269, 11112006825558043, 437893890380859403, 18446744073709551629, 827240261886336764251, 39346408075296537575531, 1978419655660313589123997
Offset: 1

Views

Author

Olaf Voß, Oct 27 2004

Keywords

Crossrefs

Programs

Formula

a(n) = A074966(n) + n^n. - Michel Marcus, Mar 11 2020

A098681 Largest prime smaller than n^n.

Original entry on oeis.org

3, 23, 251, 3121, 46649, 823541, 16777213, 387420479, 9999999967, 285311670569, 8916100448237, 302875106592241, 11112006825557999, 437893890380859323, 18446744073709551557, 827240261886336764159, 39346408075296537575359
Offset: 2

Views

Author

Olaf Voß, Oct 27 2004

Keywords

Crossrefs

Programs

  • Mathematica
    PrimePrev[n_]:=Module[{k},k=n-1;While[ !PrimeQ[k],k-- ];k];f[n_]:=n^n;lst={};Do[AppendTo[lst,PrimePrev[f[n]]],{n,30}];lst (* Vladimir Joseph Stephan Orlovsky, Feb 25 2010 *)
    Table[NextPrime[n^n,-1],{n,2,20}] (* Harvey P. Dale, Dec 02 2017 *)

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,", "))

A182487 Nextprime(F(n)) - prevprime(F(n)), where F(n) is the n-th Fibonacci number.

Original entry on oeis.org

3, 4, 4, 6, 4, 6, 6, 14, 10, 10, 6, 6, 8, 18, 12, 24, 16, 10, 6, 12, 30, 12, 24, 42, 30, 24, 60, 24, 30, 34, 30, 36, 46, 12, 36, 18, 34, 24, 24, 30, 36, 52, 72, 16, 22, 48, 44, 50, 34, 20, 20, 28, 44, 50, 40, 92, 60, 86, 16, 52, 48, 66, 46, 168, 50, 174, 36
Offset: 4

Views

Author

Alex Ratushnyak, May 02 2012

Keywords

Comments

Smallest prime following Fibonacci(n) minus largest prime immediately preceding Fibonacci(n). Starting from Fibonacci(4), because for n<4 there is no prime preceding Fibonacci(n).

Examples

			a(0) = A014208(4) - A180422(0) = 5 - 2 = 3,
a(7) = A014208(11) - A180422(7) = 97-83 = 14.
		

Crossrefs

Cf. A079677 (distance from F(n) to the nearest prime).

Programs

  • Maple
    a:= n-> (f-> nextprime(f)-prevprime(f))(combinat[fibonacci](n)):
    seq(a(n), n=4..100);  # Alois P. Heinz, Jul 29 2015
  • Mathematica
    Table[f = Fibonacci[n]; NextPrime[f] - NextPrime[f, -1], {n, 4, 100}] (* T. D. Noe, May 02 2012 *)

Formula

a(n) = A014208(n+4) - A180422(n).

A333185 Numbers k such that k^k is the average of its nearest 2 primes.

Original entry on oeis.org

2, 6, 9, 940
Offset: 1

Views

Author

Hugo Pfoertner, Mar 11 2020

Keywords

Examples

			          Previous P         k^k           Next P
  a(n)  A098681(a(n))  A000312(a(n))  A098682(a(n))
    2               3              4              5
    6           46649          46656          46663
    9       387420479      387420489      387420499
  940    940^940-3063        940^940   940^940+3063
		

Crossrefs

Programs

  • PARI
    isok(k) = if (k>1, my(x=k^k); precprime(x-1)+nextprime(x+1) == 2*x); \\ Michel Marcus, Mar 14 2020

Formula

A333184(a(n)) = 0.
A074966(a(n)) = A074967(a(n)).
Showing 1-5 of 5 results.