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.

A340803 Number of composite numbers between the largest noncomposite number <= prime(n)! and the smallest noncomposite number >= prime(n)!.

Original entry on oeis.org

0, 1, 13, 11, 13, 89, 89, 189, 185, 253, 187, 97, 131, 179, 311, 129, 429, 839, 263, 1607, 373, 527, 509, 305, 539, 617, 819, 1687, 565, 423, 2345, 959, 629, 631, 647, 1093, 835, 1937, 491, 1241, 2171, 1139, 731, 1423, 2011, 1817, 1935, 827, 1247, 911, 2669
Offset: 1

Views

Author

Alois P. Heinz, Jan 21 2021

Keywords

Examples

			a(2) = 1: 6 because prime(2) = 3; 3! = 6 whose neighbors are noncomposites.
a(3) = 13: 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126.
a(4) = 11: 5040, 5041, 5042, 5043, 5044, 5045, 5046, 5047, 5048, 5049, 5050.
		

Crossrefs

Programs

  • Maple
    a:= n-> (f-> max(nextprime(f-1)-prevprime(f+1)-1, 0))(ithprime(n)!):
    seq(a(n), n=1..52);
  • Mathematica
    b[n_] := If[n < 3, 0, NextPrime[n!] - NextPrime[n!, -1] - 1];
    a[n_] := b[Prime[n]];
    Array[a, 52] (* Jean-François Alcover, Jan 29 2021 *)

Formula

a(n) = A340802(A000040(n)).
Showing 1-1 of 1 results.