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.

A256662 Sum of absolute values of terms in the minimal alternating Fibonacci representation of n.

This page as a plain text file.
%I A256662 #4 Apr 09 2015 08:02:55
%S A256662 0,1,2,3,6,5,10,9,8,19,16,15,14,13,30,31,26,27,24,23,22,21,48,49,50,
%T A256662 53,42,43,44,39,40,37,36,35,34,77,78,79,82,81,86,85,68,69,70,71,74,63,
%U A256662 64,65,60,61,58,57,56,55,124,125,126,129,128,133,132,131
%N A256662 Sum of absolute values of terms in the minimal alternating Fibonacci representation of n.
%C A256662 The terms are distinct.  See A256655 for definitions.
%H A256662 Clark Kimberling, <a href="/A256662/b256662.txt">Table of n, a(n) for n = 0..1000</a>
%e A256662 Minimal alternating Fibonacci representations:
%e A256662 R(0) = 0
%e A256662 R(1) = 1
%e A256662 R(2) = 2
%e A256662 R(3) = 3
%e A256662 R(4) = 5 - 1, so that a(4) = 6.
%e A256662 R(9) = 13 - 5 + 1, so that a(9) = 19.
%t A256662 b[n_] = Fibonacci[n]; bb = Table[b[n], {n, 1, 70}];
%t A256662 h[0] = {1}; h[n_] := Join[h[n - 1], Table[b[n + 2], {k, 1, b[n]}]];
%t A256662 g = h[23];  r[0] = {0};
%t A256662 r[n_] := If[MemberQ[bb, n], {n}, Join[{g[[n]]}, -r[g[[n]] - n]]];
%t A256662 Table[Total[Abs[r[n]]], {n, 0, 100}] (* A256662 *)
%t A256662 Table[Total[(Abs[r[n]] + r[n])/2], {n, 0, 100}]  (* A256663 *)
%t A256662 Table[Total[(Abs[r[n]] - r[n])/2], {n, 0, 100}]  (* A256664 *)
%Y A256662 Cf. A000045, A256655.
%K A256662 nonn,easy
%O A256662 0,3
%A A256662 _Clark Kimberling_, Apr 08 2015