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.

A257019 Numbers whose quarter-square representation consists of two terms.

This page as a plain text file.
%I A257019 #4 Apr 15 2015 15:42:26
%S A257019 3,5,7,8,10,11,13,14,17,18,21,22,24,26,27,29,31,32,34,37,38,40,43,44,
%T A257019 46,48,50,51,53,55,57,58,60,62,65,66,68,70,73,74,76,78,82,83,85,87,91,
%U A257019 92,94,96,99,101,102,104,106,109,111,112,114,116,119,122,123
%N A257019 Numbers whose quarter-square representation consists of two terms.
%C A257019 Every positive integer is a sum of at most four distinct quarter squares (see A257019).
%H A257019 Clark Kimberling, <a href="/A257019/b257019.txt">Table of n, a(n) for n = 1..1000</a>
%e A257019 Quarter-square representations:
%e A257019 r(0) = 0, one term
%e A257019 r(1) = 1, one term
%e A257019 r(3) = 2 + 1, two terms, so a(1) = 3
%t A257019 z = 100; b[n_] := Floor[(n + 1)^2/4]; bb = Table[b[n], {n, 0, 100}];
%t A257019 s[n_] := Table[b[n], {k, b[n + 1] - b[n]}];
%t A257019 h[1] = {1}; h[n_] := Join[h[n - 1], s[n]];
%t A257019 g = h[100]; r[0] = {0};
%t A257019 r[n_] := If[MemberQ[bb, n], {n}, Join[{g[[n]]}, r[n - g[[n]]]]];
%t A257019 u = Table[Length[r[n]], {n, 0, 4 z}];(* A257023 *)
%t A257019 Flatten[-1 + Position[u, 1]]; (* A002620 *)
%t A257019 Flatten[-1 + Position[u, 2]]; (* A257019 *)
%t A257019 Flatten[-1 + Position[u, 3]]; (* A257020 *)
%t A257019 Flatten[-1 + Position[u, 4]]; (* A257021 *)
%Y A257019 Cf. A002620, A257020, A257021, A257023.
%K A257019 nonn,easy
%O A257019 1,1
%A A257019 _Clark Kimberling_, Apr 15 2015