OFFSET
1,4
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..2000
FORMULA
EXAMPLE
a(4) = 5: 24, 25, 26, 27, 28.
a(5) = 13: 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126.
a(6) = 7: 720, 721, 722, 723, 724, 725, 726.
MAPLE
prevprime(2):= 1:
a:= n-> (f-> max(nextprime(f-1)-prevprime(f+1)-1, 0))(n!):
seq(a(n), n=1..64);
MATHEMATICA
a[n_] := If[n<3, 0, NextPrime[n!] - NextPrime[n!, -1] - 1];
Array[a, 100] (* Jean-François Alcover, Jan 29 2021 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Jan 21 2021
STATUS
approved