This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A344316 #15 May 29 2021 20:35:29 %S A344316 0,2,3,4,5,7,7,8,8,10,9,13,12,13,12,12,13,20,14,17,17,19,16,22,18,22, %T A344316 19,23,19,31,18,26,24,26,25,31,18,27,28,30,22,39,25,30,31,37,26,41,29, %U A344316 37,32,42,28,44,31,39,30,41,32,51,33,39,40,41,36,52,35,44,39,50,39,52,39 %N A344316 Number of primes 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. %F A344316 a(n) = pi(n) + pi(n^2-1) - pi(n^2-n) + Sum_{k=1..n-2} (pi(n*k+1) - pi(n*k)). %e A344316 [1 2 3 4 5] %e A344316 [1 2 3 4] [6 7 8 9 10] %e A344316 [1 2 3] [5 6 7 8] [11 12 13 14 15] %e A344316 [1 2] [4 5 6] [9 10 11 12] [16 17 18 19 20] %e A344316 [1] [3 4] [7 8 9] [13 14 15 16] [21 22 23 24 25] %e A344316 ------------------------------------------------------------------------ %e A344316 n 1 2 3 4 5 %e A344316 ------------------------------------------------------------------------ %e A344316 a(n) 0 2 3 4 5 %e A344316 ------------------------------------------------------------------------ %e A344316 primes {} {2,3} {2,3,7} {2,3,5,13} {2,3,5,11,23} %e A344316 ------------------------------------------------------------------------ %t A344316 Table[PrimePi[n] + PrimePi[n^2 - 1] - PrimePi[n*(n - 1)] + Sum[PrimePi[n*k + 1] - PrimePi[n*k], {k, n - 2}], {n, 100}] %Y A344316 Cf. A000720 (pi), A038107, A221490, A344349. %K A344316 nonn %O A344316 1,2 %A A344316 _Wesley Ivan Hurt_, May 14 2021