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 A022801 #26 Sep 10 2024 11:03:58 %S A022801 3,8,10,15,20,28,41,60,90,138,215,339,540,863,1385,2229,3594,5802, %T A022801 9374,15153,24503,39631,64109,103713,167793,271476,439238,710682, %U A022801 1149887,1860535,3010387,4870886,7881236,12752084,20633281,33385325,54018565 %N A022801 n-th Lucas number (A000204(n)) + n-th non-Lucas number (A090946(n+1)). %F A022801 a(n) = A000204(n) + A090946(n + 1). - _Sean A. Irvine_, May 21 2019 %p A022801 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 A022801 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 A022801 (Python) %o A022801 from sympy import lucas %o A022801 def A022801(n): %o A022801 def f(x): %o A022801 if x<=2: return n+1 %o A022801 a, b, c = 1, 3, 0 %o A022801 while b<=x: %o A022801 a, b = b, a+b %o A022801 c += 1 %o A022801 return n+1+c %o A022801 m, k = n+1, f(n+1) %o A022801 while m != k: m, k = k, f(k) %o A022801 return m+lucas(n) # _Chai Wah Wu_, Sep 10 2024 %K A022801 nonn,easy %O A022801 1,1 %A A022801 _Clark Kimberling_ %E A022801 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 A022801 More terms from _Emeric Deutsch_, Jan 14 2005