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.

A232803 Odd primes, twice odd primes, 4, and 8.

This page as a plain text file.
%I A232803 #37 Dec 19 2019 13:42:44
%S A232803 3,4,5,6,7,8,10,11,13,14,17,19,22,23,26,29,31,34,37,38,41,43,46,47,53,
%T A232803 58,59,61,62,67,71,73,74,79,82,83,86,89,94,97,101,103,106,107,109,113,
%U A232803 118,122,127,131,134,137,139,142,146,149,151,157,158,163,166
%N A232803 Odd primes, twice odd primes, 4, and 8.
%C A232803 Also numbers n for which all possible n X n magic squares are prime.
%C A232803 Note that there are no 2 X 2 magic squares.
%C A232803 All primes, except 2, belong to this sequence. This is because p X p magic squares, with p primes, cannot be derived from smaller magic squares. Otherwise p would be equal to a product of smaller integers. Also, since there are no 2 X 2 magic squares, we cannot have a (2p) X (2p) that could be derived from smaller magic squares. And also we cannot have an 8 X 8 derived magic square (see first example). So this sequence is A065091 (odd primes) U A100484 (even semiprimes) U {8}. And A100484 U {8} is also A161344 (see second comment by _Zak Seidov_ there). So this sequence is: A065091 U A161344. - _Michel Marcus_, Dec 07 2013
%H A232803 Allan Adler, <a href="http://mathforum.org/alejandre/magic.square/adler/product.html">Math Forum: Magic Squares: 'Multiplication' in a new context</a>
%H A232803 Allan Adler, <a href="http://mathforum.org/alejandre/magic.square/adler/adler5.html">Math Forum: Proof that there are no 2x2 magic squares</a>
%H A232803 Allan Adler, <a href="http://mathforum.org/alejandre/magic.square/adler/adler.AxB.html">Math Forum: Multiplying Two Magic Squares</a>
%H A232803 Allan Adler, <a href="http://mathforum.org/alejandre/magic.square/adler/adler.12x12.html">Math Forum: 12x12 Magic Square</a>
%e A232803 8 qualifies because a composite 8 X 8 magic square is impossible, such a square would require a 2 X 2 magic square, and there are none (see 2nd link).
%e A232803 9 is not part of sequence because a 9 X 9 magic square can be created by multiplying a 3 X 3 magic square by itself.
%e A232803 Similarly 12 is not part of sequence because a 12 X 12 magic square can be created by multiplying a 3 X 3 magic square and a 4 X 4 magic square (see 3rd and 4th links).
%o A232803 (PARI) isok(n) = (isprime(n) && (n%2)) || (n==8) || (!(n%2) && isprime(n/2)); \\ _Michel Marcus_, Dec 07 2013
%K A232803 nonn
%O A232803 1,1
%A A232803 _J. Lowell_, Nov 30 2013
%E A232803 More terms from _Michel Marcus_, Dec 07 2013
%E A232803 Replaced definition with a more explicit one, following the comments of _Michel Marcus_. - _N. J. A. Sloane_, Dec 19 2019