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 A307510 #19 Apr 15 2019 16:27:01 %S A307510 0,0,0,0,1,0,0,2,0,0,4,0,3,8,0,6,16,0,12,4,9,24,8,18,0,16,36,12,32,0, %T A307510 24,54,0,48,20,36,81,40,72,30,64,0,60,108,45,96,40,90,48,80,144,60, %U A307510 135,72,120,54,0,192,108,180,96,160,72,162,256,144,240,100 %N A307510 a(n) is the greatest product i*j*k*l where i^2 + j^2 + k^2 + l^2 = n and 0 <= i <= j <= k <= l. %C A307510 The sequence is well defined as every nonnegative integer can be represented as a sum of four squares in at least one way. %H A307510 Robert Israel, <a href="/A307510/b307510.txt">Table of n, a(n) for n = 0..10000</a> %H A307510 Rémy Sigrist, <a href="/A307510/a307510.png">Colored scatterplot of the first 20000 terms</a> (where the color is function of the parity of n) %H A307510 Rémy Sigrist, <a href="/A307510/a307510.txt">C program for A307510</a> %H A307510 Wikipedia, <a href="https://en.wikipedia.org/wiki/Lagrange%27s_four-square_theorem">Lagrange's four-square theorem</a> %F A307510 a(n) = 0 iff n belongs to A000534. %F A307510 a(n) <= (n/4)^2, with equality if and only if n is an even square. - _Robert Israel_, Apr 15 2019 %e A307510 For n = 34: %e A307510 - 34 can be expressed in 4 ways as a sum of four squares: %e A307510 i^2 + j^2 + k^2 + l^2 i*j*k*l %e A307510 --------------------- ------- %e A307510 0^2 + 0^2 + 3^2 + 5^2 0 %e A307510 0^2 + 3^2 + 3^2 + 4^2 0 %e A307510 1^2 + 1^2 + 4^2 + 4^2 16 %e A307510 1^2 + 2^2 + 2^2 + 5^2 20 %e A307510 - a(34) = max(0, 16, 20) = 20. %p A307510 g:= proc(n, k) option remember; local a; %p A307510 if k = 1 then if issqr(n) then return sqrt(n) else return -infinity fi fi; %p A307510 max(0,seq(a*procname(n-a^2, k-1), a=1..floor(sqrt(n)))) %p A307510 end proc: %p A307510 seq(g(n, 4), n=0..100); # _Robert Israel_, Apr 15 2019 %t A307510 Array[Max[Times @@ # & /@ PowersRepresentations[#, 4, 2]] &, 68, 0] (* _Michael De Vlieger_, Apr 13 2019 *) %o A307510 (C) See Links section. %Y A307510 See A307531 for the additive variant. %Y A307510 Cf. A000534, A002635, A122922. %K A307510 nonn,look %O A307510 0,8 %A A307510 _Rémy Sigrist_, Apr 11 2019