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.

A112309 Triangle read by rows: row n gives terms in lazy Fibonacci representation of n.

This page as a plain text file.
%I A112309 #20 Aug 28 2025 08:20:42
%S A112309 1,2,1,2,1,3,2,3,1,2,3,2,5,1,2,5,1,3,5,2,3,5,1,2,3,5,1,3,8,2,3,8,1,2,
%T A112309 3,8,2,5,8,1,2,5,8,1,3,5,8,2,3,5,8,1,2,3,5,8,2,5,13,1,2,5,13,1,3,5,13,
%U A112309 2,3,5,13,1,2,3,5,13,1,3,8,13,2,3,8,13,1,2,3,8,13,2,5,8,13,1,2,5,8,13,1,3
%N A112309 Triangle read by rows: row n gives terms in lazy Fibonacci representation of n.
%C A112309 Write n as a sum c_2 F_2 + c_3 F_3 + ..., where the F_i are Fibonacci numbers and the c_i are 0 or 1. The lazy expansion is the minimal one in the lexicographic order, in contrast to the Zeckendorf expansion (A035517, A007895), which is the maximal one.
%C A112309 In other words we give preference to the smallest Fibonacci numbers.
%H A112309 Rémy Sigrist, <a href="/A112309/b112309.txt">Table of n, a(n) for n = 1..8253</a> (rows for n = 1..985 flattened)
%H A112309 Rémy Sigrist, <a href="/A112309/a112309.gp.txt">PARI program</a>
%H A112309 W. Steiner, <a href="https://web.archive.org/web/2024*/https://www.fq.math.ca/Papers1/43-1/paper43-1-8.pdf">The joint distribution of greedy and lazy Fibonacci expansions</a>, Fib. Q., 43 (No. 1, 2005), 60-69.
%e A112309 Triangle begins:
%e A112309 1 meaning 1 = 1
%e A112309 2 meaning 2 = 2
%e A112309 1 2 meaning 3 = 1+2
%e A112309 1 3 meaning 4 = 1+3
%e A112309 2 3 meaning 5 = 2+3
%e A112309 1 2 3 meaning 6 = 1+2+3 (and not the Zeckendorf expansion 1+5)
%e A112309 2 5 meaning 7 = 2+5
%p A112309 A112309 := proc(n)
%p A112309     local z,d ;
%p A112309     z := convert(A104326(n),base,10) ;
%p A112309     for d from 1 to nops(z) do
%p A112309         if op(d,z) > 0 then
%p A112309             printf("%d,",combinat[fibonacci](d+1)) ;
%p A112309         end if;
%p A112309     end do:
%p A112309 end proc:
%p A112309 for n from 1 to 20 do
%p A112309     A112309(n) ;
%p A112309 end do: # _R. J. Mathar_, Aug 28 2025
%t A112309 DeleteCases[IntegerDigits[Range[200], 2], {___, 0, 0, ___}]
%t A112309 A112309 = Map[DeleteCases[Reverse[#] Fibonacci[Range[Length[#]] + 1], 0] &, DeleteCases[IntegerDigits[-1 + Range[200], 2], {___, 0, 0, ___}]]
%t A112309 A112310 = Map[Length, A112309]
%t A112309 (* _Peter J. C. Moses_, Mar 03 2015 *)
%o A112309 (PARI) See Links section.
%Y A112309 Cf. A000045, A112310, A035517, A007895.
%K A112309 nonn,tabf,easy,changed
%O A112309 1,2
%A A112309 _N. J. A. Sloane_, Dec 01 2005
%E A112309 Extended by _Ray Chandler_, Dec 01 2005