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.

A356327 Replace 2^k in binary expansion of n with A039834(1+k).

This page as a plain text file.
%I A356327 #23 Sep 01 2022 02:15:40
%S A356327 0,1,-1,0,2,3,1,2,-3,-2,-4,-3,-1,0,-2,-1,5,6,4,5,7,8,6,7,2,3,1,2,4,5,
%T A356327 3,4,-8,-7,-9,-8,-6,-5,-7,-6,-11,-10,-12,-11,-9,-8,-10,-9,-3,-2,-4,-3,
%U A356327 -1,0,-2,-1,-6,-5,-7,-6,-4,-3,-5,-4,13,14,12,13,15,16
%N A356327 Replace 2^k in binary expansion of n with A039834(1+k).
%C A356327 This sequence has similarities with A022290, and is related to negaFibonacci representations.
%H A356327 Rémy Sigrist, <a href="/A356327/b356327.txt">Table of n, a(n) for n = 0..8191</a>
%H A356327 Wikipedia, <a href="https://en.wikipedia.org/wiki/NegaFibonacci_coding">NegaFibonacci coding</a>
%H A356327 <a href="/index/Z#Zeckendorf">Index entries for sequences related to Zeckendorf expansion of n</a>
%F A356327 a(n) = Sum_{k>=0} A030308(n,k)*A039834(1+k).
%F A356327 a(A215024(n)) = n.
%F A356327 a(A215025(n)) = -n.
%F A356327 a(A003714(n)) = A309076(n).
%F A356327 Empirically:
%F A356327 - a(n) = 0 iff n = 0 or n belongs to A072197,
%F A356327 - a(n) = 1 iff n belongs to A020989,
%F A356327 - a(2*A215024(n)) = -A000201(n) for n > 0,
%F A356327 - a(3*A215024(n)) = -A060143(n),
%F A356327 - a(floor(A215024(n)/2)) = -A060143(n),
%F A356327 - a(4*A215024(n)) = A001950(n) for n > 0,
%F A356327 - a(floor(A215024(n)/4)) = A189663(n) for n > 0,
%F A356327 - a(2*A215025(n)) = A026351(n),
%F A356327 - a(3*A215025(n)) = A019446(n) for n > 0,
%F A356327 - a(floor(A215025(n)/2)) = A019446(n) for n > 0,
%F A356327 - a(4*A215025(n)) = -A004957(n),
%F A356327 - a(floor(A215025(n)/4)) = -A060144(n+1) for n >= 0.
%e A356327 For n = 13:
%e A356327 - 13 = 2^3 + 2^2 + 2^0,
%e A356327 - so a(13) = A039834(4) + A039834(3) + A039834(1) = -3 + 2 + 1 = 0.
%t A356327 Table[Reverse[#].Fibonacci[-Range[Length[#]]] &@ IntegerDigits[n, 2], {n, 0, 69}] (* _Rémy Sigrist_, Aug 05 2022 *)
%o A356327 (PARI) a(n) = { my (v=0, k); while (n, n-=2^k=valuation(n, 2); v+=fibonacci(-1-k)); return (v) }
%o A356327 (Python)
%o A356327 from sympy import fibonacci
%o A356327 def A356327(n): return sum(fibonacci(-a)*int(b) for a, b in enumerate(bin(n)[:1:-1],start=1)) # _Chai Wah Wu_, Aug 31 2022
%Y A356327 Cf. A000201, A001950, A003714, A004957, A020989, A022290, A026351, A039834, A060144, A072197, A189663, A215024, A215025, A309076, A356325, A356326.
%K A356327 sign,base
%O A356327 0,5
%A A356327 _Rémy Sigrist_, Aug 03 2022