%I #31 Feb 13 2021 15:02:01
%S 2016,2244,2336,2570,2762,4106,4362,4464,4566,4670,4776,4934,5952,
%T 6870,7036,7146,7588,7644,7700,8824,9756,9930,9988,10394,10454,10514,
%U 10690,10868,10928,11560,12620,12682,14986,15424,15808,16000,16510,18668,20434
%N Potential magic constants of 8 X 8 magic squares composed of consecutive primes.
%C For an 8 X 8 magic square composed of 64 consecutive primes, it is necessary that the sum of these primes is a multiple of 16.
%C This sequence consists of even integers equal to the sum of 64 consecutive primes divided by 8. It is not known whether each such set of consecutive primes can be arranged into an 8 X 8 magic square but it looks plausible.
%C From _A.H.M. Smeets_, Jan 20 2021: (Start)
%C Except from the condition that a magic constant exists, it must be an even magic constant due to the fact that the order is even, which explains why the sum of primes must be divisable by 16.
%C The number of possible combinations of 8 primes out of the 64 consecutive primes added results in the magic constant is such that in almost all cases such a magic square existsts. However, as n increases, the diversity in prime gaps between the 64 consecutive primes increases, and thus the probability that a potential magic constant will lead to a magic square configuration will decrease. The challenge here seems to be to find a potential magic constant which has no magic square configuration. (End)
%H A.H.M. Smeets, <a href="/A189188/b189188.txt">Table of n, a(n) for n = 1..20000</a>
%H Natalia Makarova <a href="http://www.natalimak1.narod.ru/prime8.htm">Magic squares of order 8 which consist of consecutive primes</a> (in Russian)
%H A.H.M. Smeets, <a href="/A189188/a189188.txt">Magic squares of consecutive primes of order 8</a>
%e a(1) = 2016
%e [ 79 137 197 199 277 347 349 431
%e 127 193 131 419 337 421 107 281
%e 103 379 283 389 293 227 179 163
%e 397 251 83 271 269 157 439 149
%e 409 211 383 191 181 101 401 139
%e 307 239 317 167 89 367 97 433
%e 353 233 359 151 257 223 331 109
%e 241 373 263 229 313 173 113 311 ]
%e .
%e a(12) = 4934
%e [ 823 619 461 457 631 587 599 757
%e 443 563 647 509 733 761 787 491
%e 503 809 419 701 661 797 487 557
%e 683 499 743 677 449 607 617 659
%e 439 727 571 577 719 821 601 479
%e 811 641 593 523 421 467 709 769
%e 691 433 673 751 773 431 613 569
%e 541 643 827 739 547 463 521 653 ]
%p s:= proc(n) option remember;
%p `if` (n=1, add (ithprime(i), i=1..64),
%p ithprime(n+63) -ithprime(n-1) +s(n-1))
%p end:
%p a:= proc(n) option remember; local k, m; a(n-1);
%p for k from 1+b(n-1) while irem(s(k), 16, 'm')<>0 do od;
%p b(n):= k; 2*m
%p end:
%p a(0):=0: b(0):=0:
%p seq(a(n), n=1..50);
%Y Cf. A073520, A173981, A176571, A177434, A188536, A191679, A192087.
%K nonn
%O 1,1
%A _Natalia Makarova_, Apr 18 2011
%E Edited by _Max Alekseyev_, Jun 18 2011