A125162 a(n) is the number of primes of the form k! + n, 1 <= k <= n.
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
Offset: 1
Keywords
Examples
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.
Links
- Michel Marcus, Example table
Programs
-
Mathematica
Table[Length[Select[Range[n],PrimeQ[ #!+n]&]],{n,1,300}]
-
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
Extensions
Name clarified by Jianing Song, Jul 28 2018
Edited by Michel Marcus, Jul 29 2018
Comments