OFFSET
1,5
COMMENTS
Number of primes in n-th row of the triangle in A209297.
Number of primes along the main diagonal of an n X n square array whose elements are the numbers from 1..n^2, listed in increasing order by rows (see square arrays in example). - Wesley Ivan Hurt, May 15 2021
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..1000
FORMULA
a(n) = Sum_{k=1..n} c(n*(k-1)+k), where c is the prime characteristic. - Wesley Ivan Hurt, May 15 2021
EXAMPLE
Row 10 of A209297 = [1,12,23,34,45,56,67,78,89,100] containing three primes: [23,67,89], therefore a(10) = 3;
row 11 of A209297 = [1,13,25,37,49,61,73,85,97,109,121] containing six primes: [13,37,61,73,97,109], therefore a(11) = 6.
From Wesley Ivan Hurt, May 15 2021: (Start)
[1 2 3 4 5]
[1 2 3 4] [6 7 8 9 10]
[1 2 3] [5 6 7 8] [11 12 13 14 15]
[1 2] [4 5 6] [9 10 11 12] [16 17 18 19 20]
[1] [3 4] [7 8 9] [13 14 15 16] [21 22 23 24 25]
------------------------------------------------------------------------
n 1 2 3 4 5
------------------------------------------------------------------------
a(n) 0 0 1 1 3
------------------------------------------------------------------------
(End)
MATHEMATICA
Count[#, _?PrimeQ]&/@Table[k*n+k-n, {n, 75}, {k, n}] (* Harvey P. Dale, Apr 03 2015 *)
PROG
(Haskell)
a221490 n = sum [a010051 (k*n + k - n) | k <- [1..n]]
(PARI) a(n) = sum(k=1, n, isprime(k*n + k - n)); \\ Michel Marcus, Jan 26 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Jan 19 2013
STATUS
approved