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-4 of 4 results.

A256891 Smallest primes of 3 X 3 magic squares formed from consecutive primes.

Original entry on oeis.org

1480028129, 1850590057, 5196185947, 5601567187, 5757284497, 6048371029, 6151077269, 9517122259, 19052235847, 20477868319, 23813359613, 24026890159, 26748150199, 28519991387, 34821326119, 44420969909, 49285771679, 73827799009, 73974781889, 74220519319, 76483907837, 76560277009, 80143089599, 85892025227, 89132925737, 95515449037, 99977424653
Offset: 1

Views

Author

Arkadiusz Wesolowski, Apr 12 2015

Keywords

Comments

Let a = a(n) for some n and {a, b, c, d, e, f, g, h, i} be the set of consecutive primes. Then it is:
+---+---+---+ +---+---+---+
| d | c | h | | c | d | h |
+---+---+---+ +---+---+---+
| i | e | a | (type 1), or | i | e | a | (type 2). See Harvey D. Heinz.
+---+---+---+ +---+---+---+
| b | g | f | | b | f | g |
+---+---+---+ +---+---+---+
The type is determined by the sign of A343195.
For a given magic sum S, it is easy to calculate the unique set of n^2 consecutive primes that sum up to n*S (see PROGRAM MagicPrimes() in A073519), and in particular the smallest of these (cf. PROGRAM), listed here for n = 3, in A260673 for n = 4, in A272386 for n = 5, and in A272387 for n = 6. - M. F. Hasler, Oct 28 2018

References

  • Allan W. Johnson, Jr., Consecutive-Prime Magic Squares, Journal of Recreational Mathematics, vol. 15, 1982-83, pp. 17-18.
  • H. L. Nelson, A Consecutive Prime 3 x 3 Magic Square, Journal of Recreational Mathematics, vol. 20:3, 1988, p. 214.

Crossrefs

Programs

  • Magma
    /* Brute-force search */ lst:=[]; n:=3; while n lt 10^11 do a:=NextPrime(n); q:=a; j:=a-n; if j mod 6 eq 0 then b:=NextPrime(a); if j eq b-a then c:=NextPrime(b); d:=c-b; if d mod 6 eq 0 then e:=NextPrime(c); k:=e-c; if k eq j then f:=NextPrime(e); if k eq f-e then g:=NextPrime(f); if g-f eq d then h:=NextPrime(g); m:=h-g; if m eq k then i:=NextPrime(h); if h-g eq i-h then Append(~lst, n); end if; end if; end if; end if; end if; end if; end if; end if; n:=q; end while; lst;
    
  • PARI
    A256891(n)=MagicPrimes(A270305(n),3)[1] \\ See A073519 for MagicPrimes(). - M. F. Hasler, Oct 28 2018

Formula

a(n) = A151799(A151799(A151799(A151799(A166113(n))))). - Max Alekseyev, Nov 02 2015

Extensions

Extended by Max Alekseyev, Nov 02 2015

A260673 Smallest primes of 4 X 4 magic squares formed from consecutive primes.

Original entry on oeis.org

31, 37, 1229, 4931, 12553, 3259909, 3324329, 9291521, 24066643, 26025107, 46330021, 95979511, 99268649, 116923057, 170995151, 204041417, 213084871, 218568971, 229981399, 232850557, 254042641, 255432869, 256714219, 300222341, 375303157, 383432249, 421514827
Offset: 1

Views

Author

Arkadiusz Wesolowski, Nov 14 2015

Keywords

Examples

			        n = 3
|----|----|----|----|
|1229|1249|1321|1319|
|----|----|----|----|
|1301|1303|1231|1283|
|----|----|----|----|
|1297|1277|1307|1237|
|----|----|----|----|
|1291|1289|1259|1279|
|----|----|----|----|
.
        n = 4
|----|----|----|----|
|4943|4933|5011|5009|
|----|----|----|----|
|4999|4973|4967|4957|
|----|----|----|----|
|5003|4969|4987|4937|
|----|----|----|----|
|4951|5021|4931|4993|
|----|----|----|----|
		

References

  • Allan W. Johnson, Jr., Consecutive-Prime Magic Squares, Journal of Recreational Mathematics, vol. 15, 1982-83, pp. 17-18.

Crossrefs

Cf. A073521, A173981, A256891, A270864, A272386 (analog for n=5), A176571 (magic sums for n=5), A272387. Subsequence of A270865.

Programs

Extensions

Extended by Arkadiusz Wesolowski, Dec 13 2015

A177434 The magic constants of 6 X 6 magic squares composed of consecutive primes.

Original entry on oeis.org

484, 744, 806, 868, 930, 1390, 1460, 1494, 1634, 1704, 1740, 1848, 1992, 2100, 2172, 2316, 2390, 2540, 3116, 3192, 3694, 3734, 3774, 4486, 4946, 4988, 5736, 6104, 6148, 6526, 6568, 6610, 6776, 6820, 6950, 7036, 7078, 7120, 7984, 8118, 8162, 8828, 9318
Offset: 1

Views

Author

Natalia Makarova, May 08 2010

Keywords

Comments

Let Z be a sum of 36 consecutive primes. A necessary condition to get a 6 X 6 magic square using these primes is that Z=6S, where S is even. The smallest magic constant of a 6 X 6 magic square of consecutive primes is 484 (cf. A073520).
Each of the first 100 possible arrays of 36 consecutive primes which satisfy the necessary condition produces a magic square.
A program written by Stefano Tognon was used.

Examples

			S = 744
   [139 113 151 131  83 127]
   [223 149  89  47 157  79]
   [173 103 181 167  59  61]
   [ 67 137  53  97 211 179]
   [101 199  73 109  71 191]
   [ 41  43 197 193 163 107]
S = 806
   [131  53 107 157 191 167]
   [ 89 229 179  97 109 103]
   [ 83 211  71 139  79 223]
   [113 101 137 181 227  47]
   [197  61 163  59 127 199]
   [193 151 149 173  73  67]
S = 868
   [191 137  79 193 197  71]
   [ 67 157  73 229 239 103]
   [179 173 167  97 101 151]
   [211 181 223  61 109  83]
   [113 131 199 139  59 227]
   [107  89 127 149 163 233]
Magic square with S=930 can be pan-diagonal (cf. A073523).
Example of a non-pan-diagonal square:
S = 930
   [167  71 151 199 131 211]
   [ 89 241 181  73 113 233]
   [ 83 227 127 197 229  67]
   [239 137 139 103 163 149]
   [179  97 223 251 101  79]
   [173 157 109 107 193 191]
		

Crossrefs

Cf. A173981 (analog for 4 X 4), A176571 (analog for 5 X 5), A073523 (36 consecutive primes of a pandiagonal magic square), A073520 (smallest magic sum for n X n), A259733 (most-perfect 8 X 8), A272387 (smallest element of 6 X 6 magic squares of consecutive primes).

Programs

Formula

a(n) = Sum_{k=0..35} A000040(A000720(A272387(n))+k)/6. - M. F. Hasler, Oct 28 2018

Extensions

Edited by M. F. Hasler, Oct 28 2018

A272386 Smallest primes of 5 X 5 magic squares formed from consecutive primes.

Original entry on oeis.org

13, 59, 79, 97, 107, 127, 157, 269, 337, 347, 439, 457, 479, 563, 601, 631, 719, 743, 883, 947, 1021, 1031, 1049, 1051, 1061, 1093, 1109, 1171, 1201, 1223, 1499, 1523, 1601, 1669, 1811, 1901, 1933, 1997, 2011, 2053, 2153, 2207, 2341, 2399, 2531, 2539, 2549, 2551
Offset: 1

Views

Author

Arkadiusz Wesolowski, Apr 28 2016

Keywords

Comments

A necessary condition for a prime being in this sequence is that the sum of this and the subsequent 24 primes divided by 5 must be an odd integer. - M. F. Hasler, Oct 30 2018

Examples

			The smallest 5 X 5 magic square that can be formed from 25 consecutive primes consists of the primes 13 through 113, so the first term is 13:
           n = 1
|----|----|----|----|----|
| 13 | 107| 73 | 101| 19 |
|----|----|----|----|----|
| 97 | 17 | 79 | 37 | 83 |
|----|----|----|----|----|
| 41 | 53 | 109| 43 | 67 |
|----|----|----|----|----|
| 103| 89 | 29 | 61 | 31 |
|----|----|----|----|----|
| 59 | 47 | 23 | 71 | 113|
|----|----|----|----|----|
The next smallest consists of the primes 59 through 179, so the second term is 59:
          n = 2
|----|----|----|----|----|
| 59 | 163| 151| 137| 67 |
|----|----|----|----|----|
| 149| 61 | 79 | 109| 179|
|----|----|----|----|----|
| 113| 83 | 173| 107| 101|
|----|----|----|----|----|
| 167| 139| 71 | 127| 73 |
|----|----|----|----|----|
| 89 | 131| 103| 97 | 157|
|----|----|----|----|----|
		

Crossrefs

Programs

  • PARI
    A272386(n)=MagicPrimes(A176571(n),5)[1] \\ See A073519 for MagicPrimes(). - M. F. Hasler, Oct 28 2018
    
  • PARI
    is_candidate(p)={denominator(p=A173981(,p))==1 && bittest(p,0)} \\ For p < 167, this yields exactly the terms of A272386. Exceptions (primes satisfying this but not in A272386) are (167, 227, 383, 461, 607, ...). - M. F. Hasler, Oct 30 2018
Showing 1-4 of 4 results.