%I #28 Oct 31 2018 09:27:16
%S 313,577,703,785,865,949,1111,1703,2041,2071,2579,2677,2809,3157,3379,
%T 3545,4001,4135,4873,5143,5513,5549,5659,5695,5731,5917,6031,6277,
%U 6427,6547,7951,8027,8425,8873,9569,9995,10147,10393,10511,10717,11321,11479,12127
%N Magic constants of 5 X 5 magic squares which consist of consecutive primes.
%C Let Z be the sum of 25 consecutive primes. The necessary condition to get a magic square of these primes is: z = 5(2m + 1), where m is natural number. The magic constant of expected square is S = 2m + 1.
%C The first array of consecutive primes, which satisfies this condition, can be obtained for m = 156. This array gives the smallest magic square with magic constant 313.
%C But not every array of 25 consecutive primes, satisfying the above condition, can be arranged into a magic square. Of the first 50 potential arrays we get 32 magic squares.
%C The suitable and non-suitable arrays are forming a certain pattern. There is an assumption that the sequence can be continued indefinitely.
%C Another problem is to find all the magic squares from the certain array. There is an implemented algorithm to solve it, but it takes quite much time.
%C Let K be the total number of magic squares composed of the numbers of the array for the rotations and reflections.
%C It was possible to obtain: for S = 949 K = 16140, for S = 1703 K = 5608.
%C For a fixed magic constant S, it is easy to obtain the set of n^2 consecutive primes that sum up to n*S, and in particular the smallest one: see the PROGRAM in A272386 which computes the smallest prime for any of the magic sums listed here (for n = 5), and A260673 for the n = 4 analog. - _M. F. Hasler_, Oct 28 2018
%H Arkadiusz Wesolowski, <a href="/A176571/b176571.txt">Table of n, a(n) for n = 1..66</a>
%H <a href="http://www.natalimak1.narod.ru/mk5pr.htm">Magic squares of order 5 of the consecutive primes</a>, in Russian
%e Three examples of magic squares, which follow the one with the smallest constant.
%e Array: 59 61 67 71 73 79 83 89 97 101 103 107 109 113 127 131 137 139 149 151 157 163 167 173 179
%e z = 2885, S = 577
%e 59 61 127 179 151
%e 107 131 167 83 89
%e 173 149 67 79 109
%e 101 139 103 163 71
%e 137 97 113 73 157
%e Array: 79 83 89 97 101 103 107 109 113 127 131 137 139 149 151 157 163 167 173 179 181 191 193 197 199
%e z = 3515, S = 703
%e 79 83 149 199 193
%e 107 173 179 131 113
%e 181 167 151 101 103
%e 197 89 97 163 157
%e 139 191 127 109 137
%e Array: 97 101 103 107 109 113 127 131 137 139 149 151 157 163 167 173 179 181 191 193 197 199 211 223 227
%e z = 3925, S = 785
%e 97 101 149 211 227
%e 199 179 163 107 137
%e 109 197 167 173 139
%e 223 127 113 191 131
%e 157 181 193 103 151
%o (PARI) A176571(n, p=A272386[n], N=5)=sum(i=2, N^2, p=nextprime(p+1), p)/N \\ Uses pre-computed array A272386, but can also be used to find these values: see there. - _M. F. Hasler_, Oct 30 2018
%Y Cf. A173981 (analog for 4 X 4 squares), A073520, A272386.
%K nonn
%O 1,1
%A _Natalia Makarova_, Apr 20 2010
%E a(33)-a(43) from _Arkadiusz Wesolowski_, Apr 28 2016
|