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.

A073350 Primes not at the center of a 3 X 3 magic square of primes.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 61, 67, 79, 83, 97, 101, 107, 113, 163, 181, 197, 199, 223, 229, 233, 277, 313, 317, 331, 433, 439, 457, 569, 859
Offset: 1

Views

Author

David W. Wilson, Aug 25 2002

Keywords

Comments

The "magic sum" is always thrice the central entry.
There are no other terms < 5000.
There are no other terms < 100000. - Robert Israel, Feb 16 2016

Crossrefs

Cf. A073473. A magic square with 59 at center is given in A024351.

Programs

  • Maple
    N:= 10000: # to get all terms <= N
    P:= select(isprime,{seq(p,p=3..2*N,2)}):
    count:= 1:
    A[count]:= 2:
    for ic from 1 while P[ic] <= N 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;
              break
           fi
         od
       od:
       if not found then
         count:= count+1;
         A[count]:= c;
       fi
    od:
    seq(A[i],i=1..count); # Robert Israel, Feb 16 2016