OFFSET
0,5
COMMENTS
The (n-1) consecutive numbers n!+2,...,n!+n (for n>=2) are not prime. This fact implies that there are arbitrarily large gaps in the distribution of the prime numbers. n!+1 itself may be a prime number as in the case of n=3, 11, 27 (see A002981 for all such n). Now a(n) measures, when the first prime number previous to n!+2 appears. Thus a(n)=8 means that n!+1-3 is prime and so on. Obviously, the values of a(n) are always even numbers. Conjectures: |a(n)-1| is either 1 or a prime number. Is the growth of b(n) := sum(a(k),k=0..n) quadratic, that is b(n)=O(n^2)?
EXAMPLE
a(3)=0 because 3!+1-0=7 is prime.
a(4)=2 because 4!+1-2=23 is prime and 24 and 25 are not.
MAPLE
a := proc(n) option remember; n!+1-prevprime(n!+2); end;
CROSSREFS
KEYWORD
nonn
AUTHOR
Frederick Magata (frederick.magata(AT)uni-muenster.de), Feb 28 2004
STATUS
approved