OFFSET
1,1
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
LINKS
Robert Israel, Table of n, a(n) for n = 1..9552
G. L. Honaker, Jr. and Chris Caldwell, Prime Curios!: 859
Wikipedia, Magic square
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
EXAMPLE
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).
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
PROG
(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
CROSSREFS
KEYWORD
nonn
AUTHOR
Arkadiusz Wesolowski, Feb 13 2016
STATUS
approved