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.

A256697 Trace of the minimal alternating triangular-number representation of n.

This page as a plain text file.
%I A256697 #4 Apr 13 2015 09:39:42
%S A256697 0,1,-1,3,1,-1,6,-3,1,-1,10,-1,-3,1,-1,15,1,-1,-3,1,-1,21,-6,1,-1,-3,
%T A256697 1,-1,28,3,-6,1,-1,-3,1,-1,36,-1,3,-6,1,-1,-3,1,-1,45,1,-1,3,-6,1,-1,
%U A256697 -3,1,-1,55,-10,1,-1,3,-6,1,-1,-3,1,-1,66,1,-10,1,-1
%N A256697 Trace of the minimal alternating triangular-number representation of n.
%C A256697 See A255974 for definitions.
%D A256697 0
%H A256697 Clark Kimberling, <a href="/A256697/b256697.txt">Table of n, a(n) for n = 0..1000</a>
%e A256697 R(0) = 0; trace = 0
%e A256697 R(1) = 1; trace = 1
%e A256697 R(2) = 3 - 1; trace = -1
%e A256697 R(3) = 3; trace = 3
%e A256697 R(4) = 6 - 3 + 1; trace = 1
%e A256697 R(5) = 6 - 1; trace = -1
%e A256697 R(8) = 10 - 3 + 1; trace = 1
%e A256697 R(11) = 15 - 6 + 3 - 1; trace = -1
%t A256697 b[n_] := n (n + 1)/2; bb = Table[b[n], {n, 0, 1000}];
%t A256697 s[n_] := Table[b[n], {k, 1, n}];
%t A256697 h[1] = {1}; h[n_] := Join[h[n - 1], s[n]];
%t A256697 g = h[100]; r[0] = {0};
%t A256697 r[n_] := If[MemberQ[bb, n], {n}, Join[{g[[n]]}, -r[g[[n]] - n]]]
%t A256697 t = Table[r[n], {n, 0, 120}]  (* A255974 representations *)
%t A256697 t = Table[Last[r[n]], {n, 0, 120}] (* A256697 *)
%Y A256697 Cf. A255974, A256698, A256699.
%K A256697 easy,sign
%O A256697 0,4
%A A256697 _Clark Kimberling_, Apr 11 2015