The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A344846 Sum of the prime numbers appearing along the border of an n X n square array whose elements are the numbers from 1..n^2, listed in increasing order by rows. 1
0, 5, 12, 23, 44, 80, 136, 195, 225, 329, 320, 694, 791, 808, 899, 953, 1378, 2485, 1905, 2152, 2898, 3364, 2577, 4913, 4061, 5589, 4638, 6978, 5432, 10814, 5305, 10157, 9135, 10507, 10976, 15342, 5149, 14352, 16891, 17827, 11327, 26086, 14738, 19337, 23838, 30784, 16701 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
FORMULA
a(n) = Sum_{k=1..n} ((n^2-k+1) * c(n^2-k+1) + k * c(k)) + Sum_{k=1..n-2} ((n*k+1) * c(n*k+1)), where c(n) is the prime characteristic.
EXAMPLE
[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 5 12 23 44
------------------------------------------------------------------------
MATHEMATICA
Table[Sum[(n^2 - k + 1) (PrimePi[n^2 - k + 1] - PrimePi[n^2 - k]) + k (PrimePi[k] - PrimePi[k - 1]), {k, n}] + Sum[(n*j + 1) (PrimePi[n*j + 1] - PrimePi[n*j]), {j, n - 2}], {n, 60}]
CROSSREFS
Sequence in context: A000327 A220425 A130624 * A066869 A023172 A270681
KEYWORD
nonn
AUTHOR
Wesley Ivan Hurt, May 29 2021
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 16 17:27 EDT 2024. Contains 372554 sequences. (Running on oeis4.)