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.
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, 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, 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
Offset: 1
Keywords
Examples
a(2)=0, since Lucas(0)=2; a(10)=4, since Lucas(4) = 7 < 10 but Lucas(5) = 11 > 10.
Links
- G. C. Greubel, Table of n, a(n) for n = 1..10000
Crossrefs
Programs
-
Mathematica
Join[{1, 0}, Table[Floor[Log[GoldenRatio, n + 1/2]], {n, 3, 50}]] (* G. C. Greubel, Dec 21 2017 *)
-
Python
from itertools import islice, count def A130247_gen(): # generator of terms yield from (1,0) a, b = 3, 4 for i in count(2): yield from (i,)*(b-a) a, b = b, a+b A130247_list = list(islice(A130247_gen(),40)) # Chai Wah Wu, Jun 08 2022
Formula
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.
a(n) = A130241(n) except for n=2.
G.f.: g(x) = (1/(1-x))*(Sum_{k>=1} x^Lucas(k)) - x^2.
a(n) = floor(log_phi(n+1/2)) for n >= 3, where phi is the golden ratio.
Comments