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.

A010914 Pisot sequence E(5,17), a(n) = floor(a(n-1)^2 / a(n-2) + 1/2).

Original entry on oeis.org

5, 17, 58, 198, 676, 2308, 7880, 26904, 91856, 313616, 1070752, 3655776, 12481600, 42614848, 145496192, 496755072, 1696027904, 5790601472, 19770350080, 67500197376, 230460089344, 786839962624, 2686439671808, 9172078761984, 31315435704320, 106917585293312
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{4, -2}, {5, 17}, 26] (* Jean-François Alcover, Jan 09 2019 *)
  • PARI
    {a(n) = if( n<0, 0, real( (10 + 7 * quadgen(8)) / 2 * (2 + quadgen(8))^n ))} /* Michael Somos, Sep 03 2013 */
    
  • PARI
    {a(n) = if( n<0, 0, n += 3 ; 2^ceil((n - 4)/2) * polcoeff( (1 + x - 3*x^2 - x^3) / (1 - 6*x^2 + x^4) + x * O(x^n), n))} /* Michael Somos, Sep 03 2013 */
    
  • PARI
    Vec((5-3*x)/(1-4*x+2*x^2) + O(x^30)) \\ Colin Barker, Dec 06 2015

Formula

From Max Alekseyev, Sep 03 2013: (Start)
It is not hard to show that this sequence satisfies the following simple linear recurrence relation: a(n) = 4*a(n-1) - 2*a(n-2).
Proof: Let a(n) = A010914(n) be the sequence defined by the recurrence a(n) = floor( a(n-1)^2/a(n-2) + 1/2 ) and initial terms a(0)=5 and a(1)=17. Define a sequence b(n) by the recurrence b(n) = 4*b(n-1) - 2*b(n-2) and the same initial terms b(0)=a(0)=5 and b(1)=a(1)=17. We want to prove that a(n)=b(n) for all n.
The main trick is that instead of proving that the sequence a() satisfies the recurrence for the sequence b(), we will do it the other way around: prove that b() satisfies the recurrence for a(). This will imply that these two sequences coincide.
To prove that b() satisfies the recurrence for a(), it is enough to show that abs( b(n-1)^2 - b(n)*b(n-2) ) < b(n-2)/2. To do this, we will use the explicit formula for b(n) that
b(n) = (10+7*sqrt(2))/4 * (2+sqrt(2))^n + (10-7*sqrt(2))/4 * (2-sqrt(2))^n.
Computing abs( b(n-1)^2 - b(n)*b(n-2) ), one finds that it equals 2^n times a constant. At the same time, b(n) grows as (2+sqrt(2))^n (up to a constant) which allows one to easily prove (e.g., by induction on n) that abs( b(n-1)^2 - b(n)*b(n-2) ) < b(n-2)/2. (End)
For positive n, a(n) equals [1,1;1,3]^n.[1,2].[1.2], which means calculate the n-th power of the specific 2 X 2 matrix, multiply from the right by the column vector [1,2], and finally take the dot product of this column vector with the vector [1,2]. - John M. Campbell, Jul 09 2011
a(n) is the 3rd subdiagonal of array A228405. - Richard R. Forberg, Sep 02 2013
a(n) = A079496(n+3) * A016116(n). - Michael Somos, Sep 03 2013
a(n) - a(n-1)^2 / a(n-2) = 2^floor(n/2) / A143609(n+1) < 1/2 if n>1. - Michael Somos, Sep 03 2013
G.f.: (5-3*x) / (1-4*x+2*x^2). - Colin Barker, Dec 06 2015