OFFSET
1,5
COMMENTS
Note the triples of consecutive zeros in a(n) for n = {{32,33,34}, {62,63,64}, {74,75,76}, {92,93,94}, {116,117,118}, {122,123,124}, {140,141,142}, {152,153,154}, {158,159,160}, {182,183,184}, {200,201,202}, {206,207,208}, {212,213,214}, {218,219,220}, {242,243,244}, {272,273,274}, {284,285,286}, ...}. The middle index of most zero triples is a multiple of 3. See A125164.
The first consecutive quintuple of zeros has indices n = {294,295,296,297,298}, where the odd zero index n = 295 is not a multiple of 3.
Also for n >= 2, a(n) is the number of primes of the form k! + n for all k, since n divides k! + n for k >= n. Note that it is not known whether there are infinitely many primes of the form k! + 1; see A088332 for such primes and A002981 for the indices k. - Jianing Song, Jul 28 2018
LINKS
Michel Marcus, Example table
EXAMPLE
a(n) is the length of n-th row in the table of numbers k such that k! + n is a prime, 1 <= k <= n.
n: numbers k
-------------
1: {1},
2: {1},
3: {2},
4: {1},
5: {2, 3, 4},
Thus a(1)-a(4) = 1, a(5) = 3.
See Example table link for more rows.
MATHEMATICA
Table[Length[Select[Range[n], PrimeQ[ #!+n]&]], {n, 1, 300}]
PROG
(PARI) a(n)=c=0; for(k=1, n, if(ispseudoprime(k!+n), c++)); c
vector(100, n, a(n)) \\ Derek Orr, Oct 15 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
Alexander Adamchuk, Nov 21 2006
EXTENSIONS
Name clarified by Jianing Song, Jul 28 2018
Edited by Michel Marcus, Jul 29 2018
STATUS
approved