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 A257022 #5 Apr 15 2015 15:43:27 %S A257022 0,1,2,1,4,1,6,1,2,9,1,2,12,1,2,1,16,1,2,1,20,1,2,1,4,25,1,2,1,4,30,1, %T A257022 2,1,4,1,36,1,2,1,4,1,42,1,2,1,4,1,6,49,1,2,1,4,1,6,56,1,2,1,4,1,6,1, %U A257022 64,1,2,1,4,1,6,1,72,1,2,1,4,1,6,1,2,81 %N A257022 Trace of n in the quarter-sum representation of n. %C A257022 Every positive integer is a sum of at most four distinct quarter squares, of which the least term is the trace; see A257019. %H A257022 Clark Kimberling, <a href="/A257022/b257022.txt">Table of n, a(n) for n = 0..1000</a> %e A257022 Quarter-square representations: %e A257022 r(0) = 0, so a(0) = 0 %e A257022 r(1) = 1, so a(1) = 1 %e A257022 r(2) = 2, so a(2) = 2 %e A257022 r(3) = 2 + 1, so a(3) = 1 %t A257022 z = 100; b[n_] := Floor[(n + 1)^2/4]; bb = Table[b[n], {n, 0, 100}]; %t A257022 s[n_] := Table[b[n], {k, b[n + 1] - b[n]}]; %t A257022 h[1] = {1}; h[n_] := Join[h[n - 1], s[n]]; %t A257022 g = h[200]; r[0] = {0}; %t A257022 r[n_] := If[MemberQ[bb, n], {n}, Join[{g[[n]]}, r[n - g[[n]]]]]; %t A257022 Table[Last[r[n]], {n, 0, 3 z}] (* A257022 *) %Y A257022 Cf. A002620, A257019, A257020, A257021, A257023. %K A257022 nonn,easy %O A257022 0,3 %A A257022 _Clark Kimberling_, Apr 15 2015