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.
%I A270781 #33 Mar 08 2020 06:55:04 %S A270781 31,47,63,71,79,87,92,103,111,124,127,143,151,156,159,175,183,188,191, %T A270781 199,207,220,223,231,247,252,255,271,295,303,311,316,319,327,343,348, %U A270781 351,367,383,391,399,412,415,423,439,444,463,471,476,487 %N A270781 Numbers n with the property that n is both of the form p^2 + q^2 + r^2 + s^2 for some primes p, q, r, and s, and not of the form a^2 + b^2 + c^2 for any integers a, b, and c. %C A270781 This sequence can easily be shown to be infinite. Take p, q, r equal and congruent to 1 mod 16, and s = 5. Then, because p = 1+16k, n = 28 + 96k + 768k^2, and n = 4*(7+8*m) for m = 3k+24k^2. Then, following from Legendre's three-square theorem, n cannot be written as a^2 + b^2 + c^2 for any a, b, c in the integers. Then, because there are infinitely many primes of the form p = 1+16k, this sequence is infinite. %C A270781 It appears at first that all Mersenne numbers (A000225) are included in this sequence. However, this is not the case. The first counterexample is 262143 = 2^18 - 1. The next are 4194303 = 2^22 - 1 and 16777215 = 2^24 - 1. %H A270781 Griffin N. Macris, <a href="/A270781/b270781.txt">Table of n, a(n) for n = 1..500</a> %e A270781 31 = 2^2 + 3^2 + 3^2 + 3^2, and, according to Legendre's three-square theorem, 31 cannot be expressed as the sum of three squares, so 31 is a term. %o A270781 (Sage) %o A270781 n=487 #change for more terms %o A270781 P=prime_range(1,ceil(sqrt(n))) %o A270781 S=cartesian_product_iterator([P,P,P,P]) %o A270781 A=list(Set([sum(i^2 for i in y) for y in S if sum(i^2 for i in y)<=n])) %o A270781 A.sort() %o A270781 T=[sum(i^2 for i in y) for y in cartesian_product_iterator([[0..ceil(sqrt(n))],[0..ceil(sqrt(n))],[0..ceil(sqrt(n))]])] %o A270781 [x for x in A if not(x in T)] # _Tom Edgar_, Mar 24 2016 %Y A270781 Cf. A000225. %Y A270781 Intersection of A214515 and A004215. %Y A270781 Difference of A214515 and A270783. %K A270781 nonn %O A270781 1,1 %A A270781 _Griffin N. Macris_, Mar 23 2016