%I #26 Sep 10 2024 11:03:58
%S 3,8,10,15,20,28,41,60,90,138,215,339,540,863,1385,2229,3594,5802,
%T 9374,15153,24503,39631,64109,103713,167793,271476,439238,710682,
%U 1149887,1860535,3010387,4870886,7881236,12752084,20633281,33385325,54018565
%N n-th Lucas number (A000204(n)) + n-th non-Lucas number (A090946(n+1)).
%F a(n) = A000204(n) + A090946(n + 1). - _Sean A. Irvine_, May 21 2019
%p with(combinat): lucas:= n->fibonacci(n+1)+fibonacci(n-1): n:=1: for k from 1 to 7 do for nonlucas from lucas(k)+1 to lucas(k+1)-1 do printf("%d, ",nonlucas+lucas(n)) :n:=n+1 od od: # C. Ronaldo (aga_new_ac(AT)hotmail.com)
%t Module[{nn=40,luc,nluc},luc=LucasL[Range[nn]];nluc=Complement[Range[ Last[ luc]],luc];Total/@Thread[{luc,Take[nluc,Length[luc]]}]] (* _Harvey P. Dale_, May 02 2019 *)
%o (Python)
%o from sympy import lucas
%o def A022801(n):
%o def f(x):
%o if x<=2: return n+1
%o a, b, c = 1, 3, 0
%o while b<=x:
%o a, b = b, a+b
%o c += 1
%o return n+1+c
%o m, k = n+1, f(n+1)
%o while m != k: m, k = k, f(k)
%o return m+lucas(n) # _Chai Wah Wu_, Sep 10 2024
%K nonn,easy
%O 1,1
%A _Clark Kimberling_
%E Thanks to Karima MOUSSAOUI (bouyao(AT)wanadoo.fr), who noticed that there were two versions of this sequence, differing at about the 22nd term, Feb 28 2004
%E More terms from _Emeric Deutsch_, Jan 14 2005