OFFSET
1,4
COMMENTS
Number of primes p < n^2 such that p == 1 (mod n). The standard conjecture here is that a(n) ~ n^2/(2 phi(n)log n), where Euler's totient function phi(n) = A000010(n). - Thomas Ordowski, Oct 21 2014
Number of primes appearing in the 1st column of an n X n square array whose elements are the numbers from 1..n^2, listed in increasing order by rows. - Wesley Ivan Hurt, May 17 2021
FORMULA
a(n) = Sum_{k=1..n} pi(1+n*(k-1)) - pi(n*(k-1)), where pi is the prime counting function. - Wesley Ivan Hurt, May 17 2021
EXAMPLE
For n=10, i=1,3,4,6,7 give primes, so a(10)=5.
MATHEMATICA
f[n_] := Length[ Select[ Range[n - 1], PrimeQ[n# + 1] & ]]; Table[ f[n], {n, 1, 85}]
Table[Count[Range[n-1]n+1, _?PrimeQ], {n, 90}] (* Harvey P. Dale, Oct 10 2013 *)
PROG
(PARI) nphi(n)=local(c); c=0; for (i=1, n-1, if (isprime(i*n+1), c++)); c for(i=1, 60, print1(", "nphi(i)))
CROSSREFS
KEYWORD
nonn
AUTHOR
Jon Perry, Jul 28 2003
EXTENSIONS
Extended by Robert G. Wilson v, Jul 31 2003
STATUS
approved