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.
%I A130247 #21 Jun 09 2022 02:27:03 %S A130247 1,0,2,3,3,3,4,4,4,4,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7, %T A130247 7,7,7,7,7,7,7,7,7,7,7,7,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, %U A130247 8,8,8,8,8,8,8,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9 %N A130247 Inverse Lucas (A000032) numbers: index k of a Lucas number such that Lucas(k)=n; max(k|Lucas(k) < n), if there is no such index. %C A130247 Inverse of the Lucas sequence (A000032), since a(Lucas(n))=n for n >= 0 (see A130241 and A130242 for other versions). Same as A130241 except for n=1. %H A130247 G. C. Greubel, <a href="/A130247/b130247.txt">Table of n, a(n) for n = 1..10000</a> %F A130247 a(n)=c(n), if (n^2-4)/5 is a square number, a(n)=s(n), if (n^2+4)/5 is a square number and a(n)=floor(log_phi(n)) otherwise, where s(n)=floor(arcsinh(n/2)/log(phi)), c(n)=floor(arccosh(n/2)/log(phi)) and phi=(1+sqrt(5))/2. %F A130247 a(n) = A130241(n) except for n=2. %F A130247 G.f.: g(x) = (1/(1-x))*(Sum_{k>=1} x^Lucas(k)) - x^2. %F A130247 a(n) = floor(log_phi(n+1/2)) for n >= 3, where phi is the golden ratio. %e A130247 a(2)=0, since Lucas(0)=2; a(10)=4, since Lucas(4) = 7 < 10 but Lucas(5) = 11 > 10. %t A130247 Join[{1, 0}, Table[Floor[Log[GoldenRatio, n + 1/2]], {n, 3, 50}]] (* _G. C. Greubel_, Dec 21 2017 *) %o A130247 (Python) %o A130247 from itertools import islice, count %o A130247 def A130247_gen(): # generator of terms %o A130247 yield from (1,0) %o A130247 a, b = 3, 4 %o A130247 for i in count(2): %o A130247 yield from (i,)*(b-a) %o A130247 a, b = b, a+b %o A130247 A130247_list = list(islice(A130247_gen(),40)) # _Chai Wah Wu_, Jun 08 2022 %Y A130247 For partial sums see A130248. Other related sequences: A000032, A130241, A130242, A130245, A130249, A130255, A130259. Indicator sequence A102460. For Fibonacci inverse see A130233 - A130240, A104162. %K A130247 nonn %O A130247 1,3 %A A130247 _Hieronymus Fischer_, May 19 2007, Jul 02 2007