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 A364754 #22 Dec 31 2023 00:47:09 %S A364754 0,1,5,23,99,421,1785,7563,32039,135721,574925,2435423,10316619, %T A364754 43701901,185124225,784198803,3321919439,14071876561,59609425685, %U A364754 252509579303,1069647742899,4531100550901,19194049946505,81307300336923,344423251294199,1459000305513721,6180424473349085 %N A364754 Smallest nonnegative integer not expressible by the addition and subtraction of fewer than n Lucas numbers. %H A364754 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (5,-3,-1). %F A364754 a(0) = 0. %F A364754 a(n) = (A000032(3*n-1)-1)/2, for n > 0. %F A364754 a(n) = 1 + Sum_{i=1..n-1} A000032(3*i), for n > 0. %F A364754 G.f.: x*(1 + x^2)/((1 - x)*(1 - 4*x - x^2)). - _Stefano Spezia_, Oct 21 2023 %e A364754 a(0) = 0, since 0 is expressible as the sum of 0 Lucas numbers. %e A364754 a(1) = 1, since 1 is a Lucas number. %e A364754 a(2) = 5, since 2, 3, and 4 are all Lucas numbers; while 5=1+4, the sum of 2 Lucas numbers. %e A364754 a(3) = 23, since integers less than 23 are expressible with 2 or fewer Lucas numbers, while 23 = 1+4+18 requires 3 terms. %t A364754 a[n_] := (LucasL[3*n - 1] - 1)/2; a[0] = 0; Array[a, 27, 0] (* _Amiram Eldar_, Oct 21 2023 *) %o A364754 (Python) %o A364754 from sympy import lucas %o A364754 a = lambda n: n and (lucas(3*n-1)-1)//2 %Y A364754 Cf. A000032, A004146 (adding positive Lucas numbers), A365907 (adding any Lucas numbers). %Y A364754 Cf. A001076 (with Fibonacci numbers). %K A364754 nonn,easy %O A364754 0,3 %A A364754 _Mike Speciner_, Oct 20 2023