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.

A331084 The number of terms in the negaFibonacci representation of -n (A215023).

This page as a plain text file.
%I A331084 #9 Jan 09 2020 03:06:19
%S A331084 1,2,1,2,3,2,2,1,2,3,2,3,4,3,3,2,3,3,2,2,1,2,3,2,3,4,3,3,2,3,4,3,4,5,
%T A331084 4,4,3,4,4,3,3,2,3,4,3,4,4,3,3,2,3,3,2,2,1,2,3,2,3,4,3,3,2,3,4,3,4,5,
%U A331084 4,4,3,4,4,3,3,2,3,4,3,4,5,4,4,3,4,5,4
%N A331084 The number of terms in the negaFibonacci representation of -n (A215023).
%C A331084 The Fibonacci numbers F(2*n - 1) are the indices of records of this sequence.
%H A331084 Amiram Eldar, <a href="/A331084/b331084.txt">Table of n, a(n) for n = 1..10000</a>
%F A331084 a(A000045(2*n)) = 1.
%F A331084 a(A000045(2*n - 1)) = n.
%e A331084 The negaFibonacci representation of 2 is A215023(2) = 1001, thus a(2) = 1 + 0 + 0 + 1 = 2.
%t A331084 ind[n_] := Floor[Log[Abs[n]*Sqrt[5] + 1/2]/Log[GoldenRatio]]; f[1] = 1; f[n_] := If[n > 0, i = ind[n - 1]; If[EvenQ[i], i++]; i, i = ind[-n]; If[OddQ[i], i++]; i]; nf[n_] := Module[{k = n, s = 0}, While[k != 0, i = f[k]; s += 1; k -= Fibonacci[-i]]; s]; a[n_] := nf[-n]; Array[a, 100]
%Y A331084 Cf. A000045, A215023, A331083.
%Y A331084 Cf. A000120, A007895, A007953, A053735, A095791.
%K A331084 nonn,base
%O A331084 1,2
%A A331084 _Amiram Eldar_, Jan 08 2020