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.

A356399 a(n) is the smallest term (in absolute value) in the negaFibonacci representation of n.

This page as a plain text file.
%I A356399 #9 Aug 07 2022 15:37:05
%S A356399 1,2,1,-1,5,1,2,1,-1,-3,1,-1,13,1,2,1,-1,5,1,2,1,-1,-3,1,-1,-8,1,2,1,
%T A356399 -1,-3,1,-1,34,1,2,1,-1,5,1,2,1,-1,-3,1,-1,13,1,2,1,-1,5,1,2,1,-1,-3,
%U A356399 1,-1,-8,1,2,1,-1,-3,1,-1,-21,1,2,1,-1,5,1,2,1,-1
%N A356399 a(n) is the smallest term (in absolute value) in the negaFibonacci representation of n.
%C A356399 See A139764 and A356400 for similar sequences.
%C A356399 For n > 1, the greatest term in the negaFibonacci representation of n is A280511(n-1).
%H A356399 Rémy Sigrist, <a href="/A356399/b356399.txt">Table of n, a(n) for n = 1..10946</a>
%H A356399 Wikipedia, <a href="https://en.wikipedia.org/wiki/NegaFibonacci_coding">NegaFibonacci coding</a>
%H A356399 <a href="/index/Z#Zeckendorf">Index entries for sequences related to Zeckendorf expansion of n</a>
%F A356399 a(n) = n iff n belongs to A001519.
%e A356399 For n = 11:
%e A356399 - using F(-k) = A039834(k):
%e A356399 - 11 = F(-1) + F(-4) + F(-7),
%e A356399 - so a(11) = F(-1) = 1.
%o A356399 (PARI) a(n) = { my (v=0, neg=0, pos=0, f); for (e=0, oo, f=fibonacci(-1-e); if (f<0, neg+=f, pos+=f); if (neg <=n && n <= pos, while (n, if (f<0, neg-=f, pos-=f); if (neg > n || n > pos, v=f; n-=f;); f=fibonacci(-1-e--);); return (v););); }
%Y A356399 Cf. A001519, A039834, A139764, A280511, A356400.
%K A356399 sign,base
%O A356399 1,2
%A A356399 _Rémy Sigrist_, Aug 06 2022