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

A073519 The set of nine consecutive primes forming a 3 X 3 magic square with the smallest magic constant (4440084513).

Original entry on oeis.org

1480028129, 1480028141, 1480028153, 1480028159, 1480028171, 1480028183, 1480028189, 1480028201, 1480028213
Offset: 1

Views

Author

N. J. A. Sloane, Aug 29 2002

Keywords

Comments

The square is given (with the terms in correct order) in A320873. The (increasingly ordered) set of primes does not contain more information than the magic constant (= sum) S, since they have to be consecutive and sum up to 3*S. It is easy to construct the unique set of (consecutive) primes with this property, cf. PROGRAM. - M. F. Hasler, Oct 28 2018

Examples

			The magic square is
[ 1480028201 1480028129 1480028183 ]
[ 1480028153 1480028171 1480028189 ]
[ 1480028159 1480028213 1480028141 ]
		

References

  • H. L. Nelson, Journal of Recreational Mathematics, 1988, vol. 20:3, p. 214.
  • Clifford A. Pickover, The Zen of Magic Squares, Circles and Stars: An Exhibition of Surprising Structures across Dimensions, Princeton University Press, 2002.

Crossrefs

Programs

  • PARI
    A073519=MagicPrimes(4440084513,3) \\ where: (also used in A073521, ...)
    MagicPrimes(S, n, P=[nextprime(S\n)])={S=n*S-P[1]; for(i=1, -1+n*=n, S-=if(S>(n-i)*P[1], P=concat(P, nextprime(P[#P]+1)); P[#P], P=concat(precprime(P[1]-1), P); P[1])); if(S, -P, P)} \\ The vector of n^2 primes whose sum is n*S, or a negative vector with an approximate solution if no exact solution exists. - M. F. Hasler, Oct 22 2018

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

A265614 A set of nine consecutive primes forming a 3 X 3 semimagic square with the smallest magic constant (65573).

Original entry on oeis.org

21821, 21839, 21841, 21851, 21859, 21863, 21871, 21881, 21893
Offset: 1

Views

Author

Arkadiusz Wesolowski, Dec 10 2015

Keywords

Examples

			The semimagic square is
|-----|-----|-----|
|21821|21859|21893|
|-----|-----|-----|
|21871|21863|21839|
|-----|-----|-----|
|21881|21851|21841|
|-----|-----|-----|
		

Crossrefs

Programs

  • Mathematica
    Prime@Range[2448, 2456]

A268912 Magic sums of 3 X 3 semimagic squares composed of consecutive primes.

Original entry on oeis.org

65573, 72337, 165679, 167429, 167479, 311981, 376907, 383183, 417943, 449933, 725411, 733643, 740749, 854119, 884311, 1132717, 1176781, 1229731, 1247899, 1256659, 1529543, 1681439, 2111153, 2238667, 2372927, 2536175, 2725573, 2787865, 2822663, 2849927, 2937691
Offset: 1

Views

Author

Arkadiusz Wesolowski, Feb 15 2016

Keywords

Crossrefs

Cf. A265139, A265614, A256891. Supersequence of A270305.

A270865 Smallest primes of 4 X 4 semimagic squares formed from consecutive primes.

Original entry on oeis.org

5, 19, 29, 31, 37, 47, 53, 79, 397, 409, 599, 787, 1229, 1381, 1439, 1993, 2087, 2767, 4003, 4159, 4931, 5791, 5981, 8117, 9293, 9349, 9833, 10939, 10979, 11213, 12553, 12907, 14557, 16361, 18047, 21089, 21557, 21577, 25903, 26339, 28439, 33547, 56813, 57667
Offset: 1

Views

Author

Arkadiusz Wesolowski, Mar 24 2016

Keywords

Examples

			      n = 1
|---|---|---|---|
| 5 | 7 | 53| 59|
|---|---|---|---|
| 29| 61| 23| 11|
|---|---|---|---|
| 43| 37| 31| 13|
|---|---|---|---|
| 47| 19| 17| 41|
|---|---|---|---|
.
      n = 2
|---|---|---|---|
| 19| 23| 79| 83|
|---|---|---|---|
| 53| 67| 37| 47|
|---|---|---|---|
| 61| 41| 59| 43|
|---|---|---|---|
| 71| 73| 29| 31|
|---|---|---|---|
		

Crossrefs

Cf. A265139, A270864. Supersequence of A260673.

A270830 Smallest of n^2 consecutive primes that form an n X n semimagic square with the least magic sum, or 0 if no such magic square exists.

Original entry on oeis.org

2, 0, 21821, 5, 13, 7, 7, 79, 37, 23, 67, 89, 13, 89, 131, 31, 71, 47, 43, 73, 277, 353, 41, 67, 127, 223, 79, 13, 193, 5, 23, 43, 5, 67, 3, 19, 5, 59, 59, 653, 19, 19, 97, 409, 5, 383, 29, 137, 379, 349, 653, 1187, 47, 41, 37, 17, 619, 89, 283, 283, 43, 479, 191
Offset: 1

Views

Author

Arkadiusz Wesolowski, Mar 23 2016

Keywords

Comments

a(n) <= A104157. For n = 3 and 4, a(n) is different from A104157(n).

Crossrefs

Showing 1-6 of 6 results.