A352717 Greatest Lucas number that does not exceed n.
1, 1, 3, 4, 4, 4, 7, 7, 7, 7, 11, 11, 11, 11, 11, 11, 11, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47
Offset: 1
Keywords
Examples
The Lucas numbers, beginning with 1, are 1, 3, 4, 7, 11, 18, ..., so that a(5) = 4.
Programs
-
Mathematica
Flatten[Map[ConstantArray[LucasL[#], LucasL[# - 1]] &, Range[15]]] (* Peter J. C. Moses, Apr 30 2022 *)
-
Python
from itertools import islice def A352717_gen(): # generator of terms a, b = 1, 3 while True: yield from (a,)*(b-a) a, b = b, a+b A352717_list = list(islice(A352717_gen(),40)) # Chai Wah Wu, Jun 08 2022