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.

A256664 Nonpositive part of the minimal alternating Fibonacci representation of n.

This page as a plain text file.
%I A256664 #4 Apr 09 2015 07:58:50
%S A256664 0,0,0,0,1,0,2,1,0,5,3,2,1,0,8,8,5,5,3,2,1,0,13,13,13,14,8,8,8,5,5,3,
%T A256664 2,1,0,21,21,21,22,21,23,22,13,13,13,13,14,8,8,8,5,5,3,2,1,0,34,34,34,
%U A256664 35,34,36,35,34,39,37,36,35,21,21,21,21,22,21,23
%N A256664 Nonpositive part of the minimal alternating Fibonacci representation of n.
%C A256664 See A256655 for definitions.
%H A256664 Clark Kimberling, <a href="/A256664/b256664.txt">Table of n, a(n) for n = 0..1000</a>
%F A256664 A256663(n) - A256664(n) = n.
%e A256664 R(9) = 13 - 5 + 1, so that a(9) = 5.
%t A256664 b[n_] = Fibonacci[n]; bb = Table[b[n], {n, 1, 70}];
%t A256664 h[0] = {1}; h[n_] := Join[h[n - 1], Table[b[n + 2], {k, 1, b[n]}]];
%t A256664 g = h[23];  r[0] = {0};
%t A256664 r[n_] := If[MemberQ[bb, n], {n}, Join[{g[[n]]}, -r[g[[n]] - n]]];
%t A256664 Table[Total[Abs[r[n]]], {n, 0, 100}] (* A256662 *)
%t A256664 Table[Total[(Abs[r[n]] + r[n])/2], {n, 0, 100}]  (* A256663 *)
%t A256664 Table[Total[(Abs[r[n]] - r[n])/2], {n, 0, 100}]  (* A256664 *)
%Y A256664 Cf. A000045, A256655, A256662, A256663.
%K A256664 nonn,easy
%O A256664 0,7
%A A256664 _Clark Kimberling_, Apr 08 2015