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 A344847 #5 May 29 2021 20:31:16 %S A344847 0,0,5,18,56,80,192,306,566,731,1273,1433,2123,3023,3762,5128,6604, %T A344847 7038,9694,11735,13942,16695,21015,22027,28292,31972,37830,41516, %U A344847 50405,51983,64936,70032,80537,90331,100611,108869,130965,134475,149660,165879,191969,196185,223782 %N A344847 Sum of the prime numbers in, but not on 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 A344847 a(n) = (Sum_{k=1..n^2} k * c(k)) - (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. %e A344847 [1 2 3 4 5] %e A344847 [1 2 3 4] [6 7 8 9 10] %e A344847 [1 2 3] [5 6 7 8] [11 12 13 14 15] %e A344847 [1 2] [4 5 6] [9 10 11 12] [16 17 18 19 20] %e A344847 [1] [3 4] [7 8 9] [13 14 15 16] [21 22 23 24 25] %e A344847 ------------------------------------------------------------------------ %e A344847 n 1 2 3 4 5 %e A344847 ------------------------------------------------------------------------ %e A344847 a(n) 0 0 5 18 56 %e A344847 ------------------------------------------------------------------------ %t A344847 Table[Sum[i (PrimePi[i] - PrimePi[i - 1]), {i, n^2}] - 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}] %Y A344847 Cf. A010051, A344316, A344846 (sum of primes on border). %K A344847 nonn %O A344847 1,3 %A A344847 _Wesley Ivan Hurt_, May 29 2021