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.

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

A320873 List of 3 X 3 magic squares made of consecutive primes, in order of increasing magic sum. Only the lexicographically smallest variant of equivalent squares (modulo D4 symmetries) is listed, as a row containing the 3 rows of the square.

Original entry on oeis.org

1480028141, 1480028189, 1480028183, 1480028213, 1480028171, 1480028129, 1480028159, 1480028153, 1480028201, 1850590069, 1850590117, 1850590111, 1850590141, 1850590099, 1850590057, 1850590087, 1850590081, 1850590129, 5196185959, 5196186007, 5196186001, 5196186031, 5196185989, 5196185947, 5196185977, 5196185971, 5196186019
Offset: 1

Views

Author

M. F. Hasler, Oct 22 2018

Keywords

Comments

The first row is the lexicographically first 3 X 3 magic square of consecutive primes with the smallest possible magic constant 4440084513 = A270305(1) = A073520(3).
The same 9 terms are also given in increasing order in sequence A073519. But this is equivalent of giving just the smallest of the terms (cf. A256891) or the central element (cf. A166113) or the magic constant itself (cf. A270305), which uniquely determines the sequence of primes since they have to be consecutive and their sum is equal to 3 times the magic constant.
In the case of 3 X 3 magic squares, however, the lexicographically smallest representative has its elements in a well-defined order, see comment in A320872. This allows the reconstruction of the square from the set of primes which can be computed from the central elements A166113 or magic constants A270305, cf. PROGRAM in A073519.

Examples

			The first row of 9 terms, (1480028141, 1480028189, 1480028183, 1480028213, 1480028171, 1480028129, 1480028159, 1480028153, 1480028201), corresponds to the following smallest 3 X 3 magic square of consecutive primes:
    [1480028141  1480028189  1480028183]
    [1480028213  1480028171  1480028129] .
    [1480028159  1480028153  1480028201]
The eleventh row yields the first example where the second term is smaller than the third one:
    [23813359643  23813359721  23813359727]
    [23813359781  23813359697  23813359613] .
    [23813359667  23813359673  23813359751]
		

References

  • Allan W. Johnson, Jr., Journal of Recreational Mathematics, vol. 23:3, 1991, pp. 190-191.
  • Clifford A. Pickover, The Zen of Magic Squares, Circles and Stars: An Exhibition of Surprising Structures across Dimensions, Princeton University Press, 2002.

Crossrefs

Cf. A073520 (smallest magic sum for a n X n magic square made from consecutive primes).
Cf. A104157 (smallest of n^2 consecutive primes forming a magic square).
Cf. A166113 (center element of 3 X 3 magic squares of consecutive primes).
Cf. A256891 (smallest entry of 3 X 3 magic squares of consecutive primes) = A151799^4(A166113).
Cf. A270305 (magic sums of 3 X 3 magic squares of consecutive primes) = 3*A166113.

Programs

  • PARI
    A320873_row(n)=vecextract(n=MagicPrimes(3*A166113[n],3),[2,6+n=n[2]*2==n[1]+n[3],7-n,9,5,1,3+n,4-n,8]) \\ For MagicPrimes() see A073519 (the set of primes of the first row).
    /* the following allows the production of all 8 variants of a magic square that are equivalent modulo reflection on any of the 4 symmetry axes of the square */
    REV(M)=matconcat(Vecrev(M)) \\ reverse the order of columns of M
    FLIP(M)=matconcat(Colrev(M)) \\ reverse the order of rows of M
    ALL(M,C(f,L)=concat(apply(f,L),L))=Set(C(REV,C(FLIP,[M,M~]))) \\ PARI orders the set according to the (first) columns of the matrices, so one must take the transpose to get them ordered according to elements of the first row.

Formula

a(9n-4) = A166113(n) = A270305(n)/3 for all n >= 1.

A270305 Magic sums of 3 X 3 magic squares composed of consecutive primes.

Original entry on oeis.org

4440084513, 5551770297, 15588557967, 16804701687, 17271853617, 18145113213, 18453231933, 28551366903, 57156707667, 61433605083, 71440079091, 72080670603, 80244450939, 85559974287, 104463978483, 133262909853, 147857315253, 221483397153, 221924345793, 222661558173, 229451723637, 229680831153, 240429269013, 257676075807, 267398777427, 286546347237, 299932274193
Offset: 1

Views

Author

Arkadiusz Wesolowski, Mar 14 2016

Keywords

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

  • PARI
    A270305(n,p=A256891[n],N=3)=sum(i=2,N^2,p=nextprime(p+1),p)/N \\ Illustrates the second formula. Uses a precomputed array A256891, unless the smallest prime is supplied as optional 2nd argument. See also the 4x4 and 5x5 analog, A173981 and A176571, where this is useful for finding possible sets of primes, cf. A260673 and A272386. - M. F. Hasler, Oct 28 2018

Formula

a(n) = 3*A166113(n).
a(n) = Sum_{k=0..8} prime(pi(A256891(n))+k)/3, where (prime)pi = A000720, prime = A000040. A similar formula is possible using the central prime A166113(n). - M. F. Hasler, Oct 28 2018
a(n) = 3*A256891(n) + 9*A343194(n) + 3*A343195(n). - A.H.M. Smeets, Apr 08 2021

A256234 Magic constants of 4 X 4 pandiagonal magic squares composed of consecutive primes.

Original entry on oeis.org

682775764735680, 47184892811061120, 50194833750826260, 70151123608154420, 76685404549625256, 93295105984206480, 94615738903617540, 123483356772380760, 141536742113504220, 211283804186719200, 214070508927033000
Offset: 1

Views

Author

Dmitry Petukhov, Mar 20 2015

Keywords

Comments

a(1) = 682775764735680, minimal 4 X 4 pandiagonal magic squares of consecutive primes, see A245721.

Examples

			a(2) =  47184892811061120:
  11796223202765101 +
    0 148 232 336
  268 300  36 112
  126  22 358 210
  322 246  90  58
a(5) = 76685404549625256:
  19171351137406219 +
    0 100 112 168
  142 138  30  70
   78  22 190  90
  160 120  48  52
		

Crossrefs

Cf. A166113 (3 X 3 square), A245721.

Extensions

a(5) added by Dmitry Petukhov, Mar 25 2015
a(6), a(7) from an anonymous participant in the project, added by Natalia Makarova, Jul 16 2015
a(8) from Alexander Andreyev, added by Natalia Makarova, Mar 29 2016
a(9) from Alexander Andreyev, a(10) from an anonymous participant in the project, a(11) from Denis Ivanov, added by Natalia Makarova, Jun 13 2016
a(12)-a(18) are confirmed by BOINC project, Mar 19 2017
a(19)-a(32) are confirmed by BOINC project, Apr 06 2017
a(33)-a(56) are confirmed and added by BOINC project, May 17 2017

A343194 a(n) is the parameter b in the three-parameter description of 3 X 3 magic squares of consecutive primes (see comment).

Original entry on oeis.org

12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 30, 12, 30, 12, 12, 12, 30, 12, 12, 30, 12, 12, 30, 12, 30, 12, 18, 12, 12, 30, 12, 30, 12, 18, 12, 12, 12, 12, 30, 12, 12, 60, 30, 12, 12, 12, 30, 30, 12, 6, 30, 30, 18, 18, 42, 12, 12, 42, 12, 12, 18, 12, 12, 12, 12, 30
Offset: 1

Views

Author

A.H.M. Smeets, Apr 07 2021

Keywords

Comments

Each 3 X 3 magic square of consecutive primes can be described by three parameters: p1, b and c, where p1 is the smallest prime in the magic square, b > 0 and c > -b; the magic square is then given by:
+----------+----------+----------+
| p1+5b+2c | p1 | p1+4b+c |
+----------+----------+----------+
| p1+2b | p1+3b+c | p1+4b+2c |
+----------+----------+----------+
| p1+2b+c | p1+6b+2c | p1+b |
+----------+----------+----------+
p1 is given in A256891 and c is given in A343195.
If c > 0, the magic square is of type 1; if -b < c < 0, the magic square is of type 2. If the consecutive primes are given by p1, p2, ..., p9 (in increasing order), the magic square types are given by:
Type 1 Type 2
+----+----+----+ +----+----+----+
| p8 | p1 | p6 | | p8 | p1 | p7 |
+----+----+----+ +----+----+----+
| p3 | p5 | p7 | | p4 | p5 | p6 |
+----+----+----+ +----+----+----+
| p4 | p9 | p2 | | p3 | p9 | p2 |
+----+----+----+ +----+----+----+

Crossrefs

Cf. A166113 (p5), A256891 (p1), A270305 (magic constant), A343195 (c).

Formula

a(n) = (A270305(n) - 3*A256891(n) - 3*A343195(n))/9.
a(n) = (A166113(n) - A256891(n) - A343195(n))/3.

A343195 a(n) is the parameter c in the three parameter description of 3 X 3 magic squares of consecutive primes (see comment).

Original entry on oeis.org

6, 6, 6, 6, 6, 6, 6, 6, 6, 6, -6, 6, 24, 6, 6, 6, -18, 6, 6, -18, 6, 6, -18, 6, -18, 6, 24, 6, 6, -6, 6, -18, 6, 24, 6, 6, 6, 6, -18, 6, 6, -54, -18, 6, 6, 6, -18, 12, 6, 78, 12, -18, 24, 24, -24, 6, 6, 6, 6, 6, 24, 6, 6, 6, 6, 12, 12, 24, 6, 6, 24, -18, 6, 24
Offset: 1

Views

Author

A.H.M. Smeets, Apr 07 2021

Keywords

Comments

Each 3 X 3 magic square of consecutive primes can be described by three parameters: p1, b and c, where p1 is the smallest prime in the magic square, b > 0 and c > -b; the magic square is then given by:
+----------+----------+----------+
| p1+5b+2c | p1 | p1+4b+c |
+----------+----------+----------+
| p1+2b | p1+3b+c | p1+4b+2c |
+----------+----------+----------+
| p1+2b+c | p1+6b+2c | p1+b |
+----------+----------+----------+
p1 is given in A256891 and b is given in A343194.
If c > 0, the magic square is of type 1; if -b < c < 0, the magic square is of type 2. If the consecutive primes are given by p1, p2, ..., p9 (in increasing order), the magic square types are given by:
Type 1 Type 2
+----+----+----+ +----+----+----+
| p8 | p1 | p6 | | p8 | p1 | p7 |
+----+----+----+ +----+----+----+
| p3 | p5 | p7 | | p4 | p5 | p6 |
+----+----+----+ +----+----+----+
| p4 | p9 | p2 | | p3 | p9 | p2 |
+----+----+----+ +----+----+----+

Crossrefs

Cf. A166113 (p5), A256891 (p1), A270305 (magic constant), A343194 (b).

Formula

a(n) = (A270305(n) - 3*A256891(n) - 9*A343194(n))/3.
a(n) = A166113(n) - A256891(n) - 3*A343194(n).
Showing 1-6 of 6 results.