A022801 n-th Lucas number (A000204(n)) + n-th non-Lucas number (A090946(n+1)).
3, 8, 10, 15, 20, 28, 41, 60, 90, 138, 215, 339, 540, 863, 1385, 2229, 3594, 5802, 9374, 15153, 24503, 39631, 64109, 103713, 167793, 271476, 439238, 710682, 1149887, 1860535, 3010387, 4870886, 7881236, 12752084, 20633281, 33385325, 54018565
Offset: 1
Programs
-
Maple
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)
-
Mathematica
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 *)
-
Python
from sympy import lucas def A022801(n): def f(x): if x<=2: return n+1 a, b, c = 1, 3, 0 while b<=x: a, b = b, a+b c += 1 return n+1+c m, k = n+1, f(n+1) while m != k: m, k = k, f(k) return m+lucas(n) # Chai Wah Wu, Sep 10 2024
Formula
Extensions
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
More terms from Emeric Deutsch, Jan 14 2005