cp's OEIS Frontend

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.

A191679 Potential magic constants of 9 X 9 magic squares composed of consecutive primes.

Original entry on oeis.org

2211, 2261, 2311, 2463, 2725, 4257, 6125, 6611, 7821, 9841, 9973, 10303, 10499, 10631, 10953, 11987, 12115, 12179, 12243, 12309, 12375, 12637, 12837, 13497, 13695, 14169, 15063, 15395, 16207, 16483, 16821, 17605, 17891, 19017, 20345, 20487, 21135, 22539, 22811, 23219, 23985
Offset: 1

Views

Author

Natalia Makarova, Jun 11 2011

Keywords

Comments

For a 9 X 9 magic square composed of 81 consecutive primes, it is necessary that the sum of these primes is a multiple of 9.
This sequence consists of integers equal the sum of 81 consecutive primes divides by 9. It is not known whether each such set of consecutive primes can be arranged into 9 X 9 magic square but it looks plausible.

Examples

			a(1)=2211 for a square containing prime(12)..prime(92):
  [37 127 163 179 229 233 379 421 443
   41 431 463 457  59 139 433 109  79
  409 311 389  71 307 347 281  53  43
  373 137 181 251 401 239 317  89 223
  173 419 101 103 113 353 313 277 359
   97 383 397 479  47 197 107 263 241
  349 131 193 149 367 199  73 467 283
  439  61 257 191 227 167 151 449 269
  293 211  67 331 461 337 157  83 271]
a(2)=2261 for a square containing prime(13)..prime(93):
  [41  379  281  467  349  257  229  199   59
  313  223  127  337  131  101  479  107  443
  409   71  331   79  137  263  347  271  353
  211  307  487  149  251  293  181  113  269
  191  419  109  439  173  233  103  397  197
   97  283  193  317  433  457  241  157   83
  461  139  239  359  373  179   67  401   43
   89  277   73   53  367  167  463  389  383
  449  163  421   61   47  311  151  227  431]
		

Crossrefs

Programs

  • Maple
    s:= proc(n) option remember;
           `if` (n=1, add (ithprime(i), i=1..81),
                      ithprime(n+80) -ithprime(n-1) +s(n-1))
        end:
    a:= proc(n) option remember; local k, m;
           a(n-1);
           for k from 1+b(n-1) while irem (s(k), 9, 'm')<>0 do od;
           b(n):= k; m
        end:
    a(0):=0: b(0):=0:
    seq (a(n), n=1..50);
  • Mathematica
    Total[#]/9&/@Select[Partition[Prime[Range[500]],81,1],Divisible[ Total[ #],9]&] (* Harvey P. Dale, Jan 08 2014 *)

Extensions

Edited by Max Alekseyev, Jun 18 2011