OFFSET
1,3
COMMENTS
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..5000
FORMULA
EXAMPLE
a(10)=4, since Lucas(4)=7<=10 but Lucas(5)=11>10.
MATHEMATICA
Join[{1}, Table[Floor[Log[GoldenRatio, n + 1/2]], {n, 2, 50}]] (* G. C. Greubel, Dec 24 2017 *)
PROG
(PARI) for(n=1, 50, print1(floor(log((2*n+1)/2)/log((1+sqrt(5))/2)), ", ")) \\ G. C. Greubel, Sep 09 2018
(Magma) [Floor(Log((2*n+1)/2)/Log((1+Sqrt(5))/2)): n in [2..50]]; // G. C. Greubel, Sep 09 2018
(Python)
from itertools import count, islice
def A130241_gen(): # generator of terms
a, b = 1, 3
for i in count(1):
yield from (i, )*(b-a)
a, b = b, a+b
CROSSREFS
KEYWORD
nonn
AUTHOR
Hieronymus Fischer, May 19 2007, Jul 02 2007
STATUS
approved