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.

A105073 Define a(1)=0, a(2)=2 then a(n) = 3*a(n-1) - a(n-2), a(n+1) = 3*a(n)-a(n-1) and a(n+2) = 3*a(n+1) - a(n) + 2.

Original entry on oeis.org

0, 2, 6, 16, 44, 116, 304, 798, 2090, 5472, 14328, 37512, 98208, 257114, 673134, 1762288, 4613732, 12078908, 31622992, 82790070, 216747218, 567451584, 1485607536, 3889371024, 10182505536, 26658145586, 69791931222, 182717648080, 478361013020, 1252365390980
Offset: 1

Views

Author

Pierre CAMI, Apr 06 2005

Keywords

Comments

From Jon E. Schoenfield, Jan 18 2019: (Start)
Previously, the Name had included the comment, "This sequence is such that 20*(a(n)^2) + 20*a(n) + 1 = j^2 = a square."
However, Anthony Hernandez observed that this statement is not true for all terms; e.g., at a(4)=16, 20*16^2 + 20*16 + 1 = 5441, a nonsquare.
It is true that 20*a(n)^2 + 20*a(n) + 1 = A305315(n/3)^2 when n == 0 (mod 3) and A305316((n-2)/3)^2 when n == 2 (mod 3); however, for n == 1 (mod 3) with n > 1, sqrt(20*a(n)^2 + 20*a(n) + 1) is a noninteger number whose fractional part apparently approaches 3 - sqrt(5) as n increases, and Andrey Zabolotskiy observes that round(sqrt(20*a(n)^2 + 20*a(n) + 1) + sqrt(5)) appears to be equal to A002878(n). (End)

Crossrefs

Programs

  • Magma
    I:=[0,2,6,16,44]; [n le 5 select I[n] else 3*Self(n-1) - Self(n-2) + Self(n-3) - 3*Self(n-4) + Self(n-5): n in [1..35]]; // Vincenzo Librandi, Jan 13 2019
  • Mathematica
    a[n_]:=(1/6)*(Fibonacci[2*n+4] - 2*Fibonacci[2*n] - 2*Cos[(n+2)*(2*Pi/3)] - 4 ); Array[a,50] (* Stefano Spezia, Jan 11 2019 *)
    RecurrenceTable[{a[1]==0, a[2]==2, a[3]==6, a[4]==16, a[5]==44, a[n]== 3 a[n-1] - a[n-2] + a[n-3] - 3 a[n-4] + a[n-5]}, a, {n, 35}] (* Vincenzo Librandi, Jan 13 2019 *)

Formula

a(n) = (1/6)*(Fibonacci(2n+4) - 2*Fibonacci(2n) - 2*cos((n+2)(2*Pi/3)) - 4). - Ralf Stephan, May 20 2007
From R. J. Mathar, Nov 13 2009: (Start)
a(n) = 3*a(n-1) - a(n-2) + a(n-3) - 3*a(n-4) + a(n-5).
G.f.: 2*x^2/((1-x) * (1+x+x^2) * (1-3*x+x^2)).
a(n) = A061347(n+2)/6 + A001519(n+2)/2 - 2/3. (End)
a(n) = floor(A027941(n)/2). - Anthony Hernandez, Jan 03 2019

Extensions

Extended by R. J. Mathar, Nov 13 2009