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 A123999 #9 Jun 13 2016 08:49:50 %S A123999 1,4,6,4,5,12,12,4,6,16,18,12,8,16,24,12,1,12,18,12,6,4,12,12,0,0,6,4, %T A123999 4,0,0,4,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, %U A123999 0,0,0,0,0,0,0,0,0,0,0 %N A123999 Number of ordered ways of writing n as a sum of 4 squares of nonnegative numbers less than 4. %C A123999 Through n = 15, a(n) = number of ordered ways to write n as the sum of 4 squares. For n > 15, we must exclude sums which include 4^2, 5^2, 6^2 and the like. The values of n such that a(n) = 0 are 16, 24, 25, 29, 30, 32, 33, 34, 35 and all n > 36. Without the restriction on the size of squares, all natural numbers can be written as the sum of 4 squares, as Lagrange proved in 1750. This sequence is to 4 as A123337 Number of ordered ways to write n as the sum of 5 squares less than 5, is to 5. %F A123999 a(n) = Card{(a,b,c,d) such that 0<=a,b,c,d<4 and a^2 + b^2 + c^2 + d^2 = n}. %e A123999 a(0) = 1 because of the unique sum 0 = 0^2 + 0^2 + 0^2 + 0^2. %e A123999 a(1) = 4 because of the 4 permutations 1 = 0^2 + 0^2 + 0^2 + 1^2 = 0^2 + 0^2 + 1^2 + 0^2 = 0^2 + 1^2 + 0^2 + 0^2 = 1^2 + 0^2 + 0^2 + 0^2. %e A123999 a(4) = 5 because of 4 = 1^2 + 1^2 + 1^2 + 1^2 plus the 4 permutations of 4 = 0^2 + 0^2 + 0^2 + 2^2. %e A123999 a(16) = 1 because 16 = 2^2 + 2^2 + 2^2 + 2^2. %t A123999 a[n_] := Total[ Length /@ Permutations /@ IntegerPartitions[n, {4}, Range[0, 3]^2]]; a /@ Range[0, 72] (* _Giovanni Resta_, Jun 13 2016 *) %Y A123999 Cf. A000118, A014110, A123337. %K A123999 easy,nonn %O A123999 0,2 %A A123999 _Jonathan Vos Post_, Oct 31 2006 %E A123999 Corrected typo in third example Dave Zobel (dzobel(AT)alumni.caltech.edu), Mar 07 2009 %E A123999 a(16) and related example corrected by _Giovanni Resta_, Jun 13 2016