

A125162


a(n) is the number of primes of the form k! + n, 1 <= k <= n.


8



1, 1, 1, 1, 3, 1, 4, 0, 1, 1, 5, 1, 3, 0, 1, 1, 6, 1, 7, 0, 1, 1, 6, 0, 1, 0, 1, 1, 6, 1, 9, 0, 0, 0, 3, 1, 11, 0, 1, 1, 9, 1, 5, 0, 1, 1, 10, 0, 2, 0, 1, 1, 9, 0, 2, 0, 1, 1, 10, 1, 9, 0, 0, 0, 3, 1, 9, 0, 1, 1, 8, 1, 9, 0, 0, 0, 5, 1, 9, 0, 1, 1, 11, 0, 1, 0, 1, 1, 8, 0, 3, 0, 0, 0, 2, 1, 10, 0, 1, 1, 10, 1
(list;
graph;
refs;
listen;
history;
text;
internal format)



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

Table of n, a(n) for n=1..102.
Michel Marcus, Example table


EXAMPLE

a(n) is the length of nth 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

Cf. A125163 (indices of 0), A125164 (triples).
Sequence in context: A257634 A110790 A119719 * A174382 A123730 A143317
Adjacent sequences: A125159 A125160 A125161 * A125163 A125164 A125165


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



