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.

Showing 1-7 of 7 results.

A024351 Primes forming a 3 X 3 magic square with prime entries and minimal constant 177 = A164843(3).

Original entry on oeis.org

5, 17, 29, 47, 59, 71, 89, 101, 113
Offset: 1

Views

Author

Karl Schmerbauch (karl.j.schmerbauch(AT)boeing.com)

Keywords

Comments

The minimal 3 X 3 magic square made of consecutive primes has constant 4440084513 = A073520(3) = A270305(1), cf. A073519. - M. F. Hasler, Oct 22 2018
Sequence A073473 gives a variant using "primes including 1" (for historical reasons), to which also refers A073502. - M. F. Hasler, Oct 24 2018

Examples

			The square is [101 5 71 ; 29 59 89 ; 47 113 17].
The lexicographically smallest equivalent variant (modulo reflections on the symmetry axes of the square) is [17 89 71 ; 113 59 5 ; 47 29 101], cf. A320872. - _M. F. Hasler_, Oct 24 2018
		

Crossrefs

Cf. A320872 (3 X 3 magic squares of primes), A268790 (magic sums of these).

Programs

  • PARI
    A024351=select(p->setsearch(P,118-p),P=primes(30)[^5]) \\ 118 = 2*59, where 59 is the central prime; primes(30) = primes < 118. For the magic square itself, use A320872_row(1). -  M. F. Hasler, Oct 25 2018

Extensions

Offset corrected by Arkadiusz Wesolowski, Nov 26 2011

A268790 Magic sums of 3 X 3 magic squares composed of primes.

Original entry on oeis.org

177, 213, 219, 267, 309, 327, 381, 393, 411, 417, 447, 453, 471, 501, 519, 537, 573, 579, 633, 681, 717, 723, 753, 771, 789, 807, 813, 843, 849, 879, 921, 933, 1011, 1041, 1047, 1059, 1077, 1101, 1119, 1137, 1149, 1167, 1191, 1203, 1227, 1257, 1263, 1293
Offset: 1

Views

Author

Arkadiusz Wesolowski, Feb 13 2016

Keywords

Comments

From Robert Israel, Feb 16 2016: (Start)
All terms are 3 times odd primes.
3*p is a term if and only if p is a prime not in A073350.
Conjecture: 3*p is a term for every prime > 859.
I verified this for all primes < 100000.
The Green-Tao theorem implies the sequence is infinite: given one magic square with entries a(i,j), there are infinitely many pairs of positive integers x,y such that b(i,j) = x + y*a(i,j) are all prime. Then b(i,j) form another magic square. (End)
Every number of the form 3*(A227284(n) + 840) is in this sequence. - Arkadiusz Wesolowski, Feb 22 2016
The terms equal three times the central elements (and equivalently, one third of the sum of all elements) of the 3 X 3 magic squares made of primes, which are listed in A320872. - M. F. Hasler, Oct 28 2018

Examples

			Examples of 3 X 3 magic squares composed of primes.
.
+---+---+---+
| 17| 89| 71|
+---+---+---+
|113| 59| 5 |
+---+---+---+
| 47| 29|101|
+---+---+---+
The magic constant is 177 = a(1).
.
+---+---+---+
| 41| 89| 83|
+---+---+---+
|113| 71| 29|
+---+---+---+
| 59| 53|101|
+---+---+---+
The magic constant is 213 = a(2).
		

Crossrefs

Programs

  • Maple
    N:= 10000: # to get all terms <= N P:= select(isprime,{seq(p,p=3..2*N/3,2)}):
    count:= 0:
    for ic from 1 while P[ic] <= N/3 do
       c:= P[ic];
       V:= map(`-`,P[ic+1..-1],c) intersect map(t -> c-t, P[1..ic-1]);
       nv:= nops(V);
       VV:= {seq(seq(V[j]-V[i],j=i+1..nv),i=1..nv-1)} intersect V;
       nvv:= nops(VV);
       found:= false;
       for ia from 1 to nvv while not found do
         a:= VV[ia];
         for ib from ia+1 to nvv while VV[ib] < c - a do
           b:= VV[ib];
           if b <> 2*a and {c-a-b,c-a+b,c-b+a,c+a+b} subset P then
              found:= true;
              count:= count+1;
              A[count]:= 3*c;
              break
           fi
         od
       od:
    od:
    seq(A[i],i=1..count); # Robert Israel, Feb 16 2016
  • PARI
    c=3;A268790_vec=3*vector(50,i,c=A320872_row(1,0,c+1)[2,2]) \\ Illustrates formula & comment. - M. F. Hasler, Oct 28 2018
    
  • PARI
    is_A268790(c)={denominator(c/=3)==1&& isprime(c)&& forstep(a=2,c\2-1,2, isprime(c-a)&& isprime(c+a)&& forstep(b=2,c-2*a-2,2, isprime(c-2*a-b)&& isprime(c-a-b)&& isprime(c-b)&& isprime(c+b)&& isprime(c+a+b)&& isprime(c+2*a+b)&& return(1)))} \\ M. F. Hasler, Oct 28 2018

Formula

If conjecture is true, a(n) = 3*prime(n+40) for n >= 110. - Robert Israel, Feb 16 2016
A268790 = 3*{column 5 of A320872} as a set, i.e., with duplicates removed. - M. F. Hasler, Oct 28 2018

A073502 The smallest magic constant for n X n magic square with prime entries (regarding 1 as a prime).

Original entry on oeis.org

111, 102, 213, 408, 699, 1114, 1681, 2416, 3355, 4514, 5937, 7626, 9635, 11986, 14691, 17818, 21373, 25394, 29873, 34926, 40511, 46664, 53445, 60898, 69045, 77888, 87473, 97850, 109065, 121126, 134113, 147982, 162759
Offset: 3

Views

Author

N. J. A. Sloane, Aug 27 2002

Keywords

Comments

Until the early part of the twentieth century 1 was regarded as a prime (see A008578).

References

  • W. S. Andrews and H. A. Sayles, The Monist (Chicago) for October 1913.
  • H. E. Dudeney, Amusements in Mathematics, Nelson, London, 1917, page 125, who quotes the Andrews-Sayles article as his source.

Crossrefs

Cf. A073473 (for the n=3 square), A024351, A073520, A164843, A173079.

Extensions

Dudeney gives 36095/11 for n = 11 (an obvious typo) and 4514 for n = 12
a(3)-a(12) are confirmed/given by Chebrakov
a(15), a(17), a(22), a(35), and a(124)=9912840 from S. Tognon (cf. A173079)
a(13)-a(14), a(16), a(18)-a(21), a(23)-a(34) from N. Makarova
Edited by Max Alekseyev, Feb 11 2010

A073473 Primes (including 1) forming 3 X 3 magic square with prime entries and minimal constant 111 = A073502(3).

Original entry on oeis.org

1, 7, 13, 31, 37, 43, 61, 67, 73
Offset: 1

Views

Author

Lee Sallows (Sallows(AT)psych.kun.nl), Aug 27 2002

Keywords

Comments

Until the early part of the twentieth century 1 was regarded as a prime (cf. A008578).
"The problem of constructing magic squares with prime numbers only was first discussed by myself in The Weekly Dispatch for Jul 22 1900 and Aug 05 1900; but during the last three or four years it has received great attention from American mathematicians. First, they have sought to form these squares with the smallest possible constants.
"Thus the first nine prime numbers, 1 to 23 inclusive, sum to 99, which (being divisible by 3) is theoretically a suitable series; yet it has been demonstrated that the smallest possible constant is 111 and the required series as follows: 1,7,13,31,37,43,61,67,73." - Dudeney
See A024351 for the "modern" version of the minimal 3 X 3 magic square of primes. - M. F. Hasler, Oct 30 2018

Examples

			The square is [ 43 1 67 / 61 37 13 / 7 73 31 ].
		

References

  • H. E. Dudeney, Amusements in Mathematics, Nelson, London, 1917, page 125.

Crossrefs

A271578 Magic sums of 4 X 4 magic squares composed of primes.

Original entry on oeis.org

120, 126, 132, 136, 138, 140, 142, 144, 146, 148, 150, 154, 156, 158, 160, 162, 164, 166, 168, 170, 172, 174, 176, 178, 180, 182, 184, 186, 188, 190, 192, 194, 196, 198, 200, 202, 204, 206, 208, 210, 212, 214, 216, 218, 220, 222, 224, 226, 228, 230, 232, 234
Offset: 1

Views

Author

Arkadiusz Wesolowski, Apr 10 2016

Keywords

Comments

I conjecture that every even number greater than 152 belongs to this sequence.

Examples

			Examples of 4 X 4 magic squares composed of primes.
.
|---|---|---|---|
| 3 | 7 | 43| 67|
|---|---|---|---|
| 31| 61| 17| 11|
|---|---|---|---|
| 73| 23| 19| 5 |
|---|---|---|---|
| 13| 29| 41| 37|
|---|---|---|---|
The magic constant is 120 = a(1).
.
|---|---|---|---|
| 3 | 7 | 43| 73|
|---|---|---|---|
| 31| 67| 17| 11|
|---|---|---|---|
| 79| 23| 19| 5 |
|---|---|---|---|
| 13| 29| 47| 37|
|---|---|---|---|
The magic constant is 126 = a(2).
		

Crossrefs

Formula

If conjecture is true, a(n) = A005843(n+65) for n >= 12.

A173079 Positive integers n such that the sum S of 1 and first n^2-1 odd primes is divisible by n and S/n == n (mod 2).

Original entry on oeis.org

1, 2, 3, 12, 15, 17, 22, 35, 124, 191, 774, 1405, 1522, 3988, 6220, 7448, 8038, 11404, 63027, 161153, 582096
Offset: 1

Views

Author

Max Alekseyev, Feb 09 2010

Keywords

Comments

A necessary condition for the existence of n X n magic square consisting of 1 and the first n^2-1 odd primes.
In 1913, J. N. Muncey proved that 12 is actually the smallest (nontrivial) order for which such a magic square exists.
Squares of order 15, 17, 22, 35 and 124 were constructed by S. Tognon.
From A.H.M. Smeets, Mar 10 2021: (Start)
The number S/n, if it exists, is also called the potential magic constant.
It is believed that the corresponding magic squares do exist for any order a(n) with n >= 4. (End)
No other terms below 3*10^6. - Max Alekseyev, Nov 07 2024

Examples

			From _A.H.M. Smeets_, Mar 10 2021: (Start)
The case a(1) = 1 is trivial.
In case a(2) = 2, the set of potential magic square numbers is {1, 3, 5, 7} with potential magic constant 8, however, no magic square exists of order 2.
In case a(4) = 12, not only the potential magic constant exists, but also the magic square itself, as shown by Stefano Tognon or Eric Weisstein's World of Mathematics. (End)
		

Crossrefs

Extensions

a(20) from Donovan Johnson, Nov 30 2010
a(1)=1 prepended by A.H.M. Smeets, Mar 10 2021
a(21) from Max Alekseyev, Nov 01 2024

A188537 The smallest constant of an n X n associative magic square composed of distinct primes.

Original entry on oeis.org

177, 240, 1255, 630, 4487, 2040, 12249
Offset: 3

Views

Author

Natalia Makarova, Apr 03 2011

Keywords

Comments

In the associative magic square the sums of every pair of elements which are center-symmetrical are equal. Associative squares exist for every magic square order.
a(10) <= 4950, a(11) = 26521, a(12)=8820, a(13)<=50453, a(14)=16170, a(15)=74595, a(16)<=25200, a(17)=128197, a(18)=35910, a(19)<=193363, a(20)=54600.

Examples

			a(7) = 4487:
    53 1277  101 1091  173 1019  773
  1013   59  863  599  881 1049   23
   179 1193  563  821  761  131  839
  1031  311  929  641  353  971  251
   443 1151  521  461  719   89 1103
  1259  233  401  683  419 1223  269
   509  263 1109  191 1181    5 1229
a(8) = 2040:
    7 499  19 487 463  67 467  31
   53 421 233 409 317 157 379  71
   61 347 239 401 313 227 373  79
  173 311 241 179 383 281 359 113
  397 151 229 127 331 269 199 337
  431 137 283 197 109 271 163 449
  439 131 353 193 101 277  89 457
  479  43 443  47  23 491  11 503
a(9) = 12249:
  1283  311 1811 2213 1571  569 2039 1163 1289
   773  653 2243 1619 2063  593 2693  383 1229
  1979 1499 2699  641  821   89  809 2003 1709
  1613 2531  101  131 2333 2441 2663  263  173
   113  179 2711  449 1361 2273   11 2543 2609
  2549 2459   59  281  389 2591 2621  191 1109
  1013  719 1913 2633 1901 2081   23 1223  743
  1493 2339   29 2129  659 1103  479 2069 1949
  1433 1559  683 2153 1151  509  911 2411 1439
		

Crossrefs

Cf. A164843.

Extensions

a(9) from Natalia Makarova, Mar 08 2015
Showing 1-7 of 7 results.