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.

A131340 Number of 0's in minimal Lucas representation (A130310) of n.

This page as a plain text file.
%I A131340 #9 Jul 05 2025 09:40:51
%S A131340 1,0,2,3,2,2,4,3,3,3,5,4,4,4,4,3,3,6,5,5,5,5,4,4,5,4,4,4,7,6,6,6,6,5,
%T A131340 5,6,5,5,5,6,5,5,5,5,4,4,8,7,7,7,7,6,6,7,6,6,6,7,6,6,6,6,5,5,7,6,6,6,
%U A131340 6,5,5,6,5,5,5,9,8,8,8,8,7,7,8,7,7,7,8
%N A131340 Number of 0's in minimal Lucas representation (A130310) of n.
%H A131340 Amiram Eldar, <a href="/A131340/b131340.txt">Table of n, a(n) for n = 1..10000</a>
%H A131340 Ron Knott, <a href="http://www.maths.surrey.ac.uk/hosted-sites/R.Knott/Fibonacci/fibrep.html">Using the Fibonacci numbers to represent whole numbers</a>.
%t A131340 a[n_] := Module[{s = {}, m = n, k = 1}, While[m > 0, If[m == 1, k = 1; AppendTo[s, k]; m = 0, If[m == 2, k = 0; AppendTo[s, k]; m = 0, While[LucasL[k] <= m, k++]; k--; AppendTo[s, k]; m -= LucasL[k]; k = 1]]]; Total[1 - IntegerDigits[Total[2^s], 2]]]; Array[a, 100] (* _Amiram Eldar_, Jul 05 2025 *)
%Y A131340 Cf. A131341, A000032, A102364.
%K A131340 nonn
%O A131340 1,3
%A A131340 _Casey Mongoven_, Jun 29 2007
%E A131340 More terms from _Amiram Eldar_, Jul 05 2025