cp's OEIS Frontend

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.

A173714 Floor(Lucas(n+1)/2), Lucas(n) = A000032(n).

Original entry on oeis.org

0, 1, 2, 3, 5, 9, 14, 23, 38, 61, 99, 161, 260, 421, 682, 1103, 1785, 2889, 4674, 7563, 12238, 19801, 32039, 51841, 83880, 135721, 219602, 355323, 574925, 930249, 1505174
Offset: 0

Views

Author

Gary Detlefs, Nov 25 2010

Keywords

Comments

Sequences of the form a(0)=1, a(1)=b,
a(n) = a(n-1) + a(n-2) + 1 if n mod 3 =2, else
a(n) = a(n-1) + a(n-2) have a closed form of
a(n) = F(n-1)*a + F(n)*b + floor(F(n+1)/2),
where F(n)= Fibonacci(n) = A000045(n), floor(F(n+1)/2) = A004695(n+1).
We can generalize the definition of this sequence by changing the added 1 to any value of k and changing the last term of the formula to floor(F(n+1)/2)*k.
Two variants: if we add the constant at n mod 3 = 0, then a(n)=F(n-1)*a + F(n)*b + floor(F(n)/2), and if for n mod 3 =1, then a(n)=F(n-1)*a + F(n)*b + floor(F(n-1)/2).

Examples

			a(5) = a(4) + a(3) + 1 = 5 +3 +1 =9 because 5 mod 3 = 2.
a(6) = a(5) + a(4) = 9 +5 =14 because 6 mod 3 <>2.
		

Programs

  • Magma
    [Floor(Lucas(n+1)/2): n in [0..50]]; // Vincenzo Librandi, Apr 24 2011
  • Maple
    with(combinat):
    g:=(a,b,n)->fibonacci(n-1)*a+fibonacci(n)*b + floor(fibonacci(n+1)/2):
    seq(g(0,1,n),n=0..30)
  • Mathematica
    Table[Floor[LucasL[n + 1]/2], {n,0,50}] (* G. C. Greubel, Nov 24 2016 *)

Formula

a(0)= 0, a(1)=1, a(n)=a(n-1)+a(n-2)+1 if n mod 3 =2, else a(n)=a(n-1)+a(n-2).
G.f.: x*(1+x-x^3)/[(1-x-x^2)*(1-x^3)].
a(n) = a(n-1) +a(n-2) +(1+(-1)^Fib(n+1))/2.
a(n) = A000204(n+1)/2 + A099837(n+1)/6 - 1/3. - R. J. Mathar, Nov 26 2010
a(n) = Fibonacci(n) + floor(Fibonacci(n+1)/2). - Gary Detlefs, Dec 10 2010