Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #11 Jun 23 2021 10:51:24
%S 0,1,2,2,2,3,3,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,
%T 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,
%U 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7
%N Number of Jacobsthal-Lucas numbers m <= n.
%H Michael De Vlieger, <a href="/A345380/b345380.txt">Table of n, a(n) for n = 0..10000</a>
%H Dorin Andrica, Ovidiu Bagdasar, and George Cătălin Tųrcąs, <a href="https://doi.org/10.2478/auom-2021-0002">On some new results for the generalised Lucas sequences</a>, An. Şt. Univ. Ovidius Constanţa (Romania, 2021) Vol. 29, No. 1, 17-36. See Section 5.6, pp. 35, Table 7.
%e a(0)=0 since the least term in A014551 is 1.
%e a(1)=1 since A014551(0) = 2 is followed in that sequence by 1.
%e a(k)=2 for 2 <= k <= 4 since the first terms of A014551 are {2, 1, 5}.
%t Block[{a = 1, b = -2, nn = 105, u, v = {}}, u = {2, a}; Do[AppendTo[u, Total[{-b, a} u[[-2 ;; -1]]]]; AppendTo[v, Count[u, _?(# <= i &)]], {i, nn}]; {Boole[First[u] <= 0]}~Join~v] (* or *)
%t {0}~Join~Accumulate@ ReplacePart[ConstantArray[0, Last[#]], Map[# -> 1 &, #]] &@ LinearRecurrence[{1, 2}, {2, 1}, 8] (* _Michael De Vlieger_, Jun 16 2021 *)
%Y Cf. A014551, A108852 (Fibonacci), A130245 (Lucas), A130253.
%K nonn,easy
%O 0,3
%A _Ovidiu Bagdasar_, Jun 16 2021