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.

A079935 a(n) = 4*a(n-1) - a(n-2) with a(1) = 1, a(2) = 3.

Original entry on oeis.org

1, 3, 11, 41, 153, 571, 2131, 7953, 29681, 110771, 413403, 1542841, 5757961, 21489003, 80198051, 299303201, 1117014753, 4168755811, 15558008491, 58063278153, 216695104121, 808717138331, 3018173449203, 11263976658481, 42037733184721, 156886956080403
Offset: 1

Views

Author

Benoit Cloitre and Paul D. Hanna, Jan 20 2003

Keywords

Comments

See A001835 for another version.
Greedy frac multiples of sqrt(3): a(1)=1, Sum_{n>0} frac(a(n)*x) < 1 at x=sqrt(3).
The n-th greedy frac multiple of x is the smallest integer that does not cause Sum_{k=1..n} frac(a(k)*x) to exceed unity; an infinite number of terms appear as the denominators of the convergents to the continued fraction of x.
Binomial transform of A002605. - Paul Barry, Sep 17 2003
In general, Sum_{k=0..n} binomial(2n-k,k)*j^(n-k) = (-1)^n* U(2n, i*sqrt(j)/2), i=sqrt(-1). - Paul Barry, Mar 13 2005
The Hankel transform of this sequence is [1,2,0,0,0,0,0,0,0,0,0,...]. - Philippe Deléham, Nov 21 2007
From Richard Choulet, May 09 2010: (Start)
This sequence is a particular case of the following situation:
a(0)=1, a(1)=a, a(2)=b with the recurrence relation a(n+3) = (a(n+2)*a(n+1)+q)/a(n)
where q is given in Z to have Q = (a*b^2 + q*b + a + q)/(a*b) itself in Z.
The g.f is f: f(z) = (1 + a*z + (b-Q)*z^2 + (a*b + q - a*Q)*z^3)/(1 - Q*z^2 + z^4);
so we have the linear recurrence: a(n+4) = Q*a(n+2) - a(n).
The general form of a(n) is given by:
a(2*m) = Sum_{p=0..floor(m/2)} (-1)^p*binomial(m-p,p)*Q^(m-2*p) + (b-Q)*Sum_{p=0..floor((m-1)/2)} (-1)^p*binomial(m-1-p,p)*Q^(m-1-2*p) and
a(2*m+1) = a*Sum_{p=0..floor(m/2)} (-1)^p*binomial(m-p,p)*Q^(m-2*p) + (a*b+q-a*Q)*Sum_{p=0..floor((m-1)/2)} (-1)^p*binomial(m-1-p,p)*Q^(m-1-2*p).
(End)
x-values in the solution to 3*x^2 - 2 = y^2. - Sture Sjöstedt, Nov 25 2011
From Wolfdieter Lang, Oct 12 2020: (Start)
[X(n) = S(n, 4) - S(n-1, 4), Y(n) = X(n-1)] gives all positive solutions of X^2 + Y^2 - 4*X*Y = -2, for n = -oo..+oo, where the Chebyshev S-polynomials are given in A049310, with S(-1, 0) = 0, and S(-|n|, x) = - S(|n|-2, x), for |n| >= 2.
This binary indefinite quadratic form has discriminant D = +12. There is only this family representing -2 properly with X and Y positive, and there are no improper solutions.
See also the preceding comment by Sture Sjöstedt.
See the formula for a(n) = X(n-1), for n >= 1, in terms of S-polynomials below.
This comment is inspired by a paper by Robert K. Moniot (private communication). See his Oct 04 2020 comment in A027941 related to the case of x^2 + y^2 - 3*x*y = -1 (special Markov solutions). (End)
a(n) is also the output of Tesler's formula for the number of perfect matchings of an m x n Mobius band where m and n are both even, specialized to m=2. (The twist is on the length-n side.) - Sarah-Marie Belcastro, Feb 15 2022

Examples

			a(4) = 41 since frac(1*x) + frac(3*x) + frac(11*x) + frac(41*x) < 1, while frac(1*x) + frac(3*x) + frac(11*x) + frac(k*x) > 1 for all k > 11 and k < 41.
		

Crossrefs

Cf. A002530 (denominators of convergents to sqrt(3)), A079934, A079936, A001353.
Cf. A001835 (same except for the first term).
Row 4 of array A094954.
Cf. similar sequences listed in A238379.

Programs

  • Haskell
    a079935 n = a079935_list !! (n-1)
    a079935_list =
       1 : 3 : zipWith (-) (map (4 *) $ tail a079935_list) a079935_list
    -- Reinhard Zumkeller, Aug 14 2011
    
  • Magma
    I:=[1,3]; [n le 2 select I[n] else 4*Self(n-1)-Self(n-2): n in [1..40]]; // Vincenzo Librandi, Jun 06 2015
    
  • Maple
    f:= gfun:-rectoproc({a(n) = 4*a(n-1) - a(n-2),a(1)=1,a(2)=3}, a(n), remember):
    seq(f(n),n=1..30); # Robert Israel, Jun 05 2015
  • Mathematica
    a[n_] := (MatrixPower[{{1, 2}, {1, 3}}, n].{{1}, {1}})[[1, 1]]; Table[ a[n], {n, 0, 23}] (* Robert G. Wilson v, Jan 13 2005 *)
    LinearRecurrence[{4,-1},{1,3},30] (* or *) CoefficientList[Series[ (1-x)/(1-4x+x^2),{x,0,30}],x]  (* Harvey P. Dale, Apr 26 2011 *)
    a[n_] := Sqrt[2/3] Cosh[(-1 - 2 n) ArcCsch[Sqrt[2]]];
    Table[Simplify[a[n-1]], {n, 1, 12}] (* Peter Luschny, Oct 13 2020 *)
  • PARI
    a(n)=([0,1; -1,4]^(n-1)*[1;3])[1,1] \\ Charles R Greathouse IV, Mar 18 2017
    
  • PARI
    my(x='x+O('x^30)); Vec((1-x)/(1-4*x+x^2)) \\ G. C. Greubel, Feb 25 2019
  • Sage
    [lucas_number1(n,4,1)-lucas_number1(n-1,4,1) for n in range(1, 25)] # Zerinvary Lajos, Apr 29 2009
    

Formula

For n > 0, a(n) = ceiling( (2+sqrt(3))^n/(3+sqrt(3)) ).
From Paul Barry, Sep 17 2003: (Start)
G.f.: (1-x)/(1-4*x+x^2).
E.g.f.: exp(2*x)*(sinh(sqrt(3)*x)/sqrt(3) + cosh(sqrt(3)*x)).
a(n) = ( (3+sqrt(3))*(2+sqrt(3))^n + (3-sqrt(3))*(2-sqrt(3))^n )/6 (offset 0). (End)
a(n) = Sum_{k=0..n} binomial(2*n-k, k)*2^(n-k). - Paul Barry, Jan 22 2005 [offset 0]
a(n) = (-1)^n*U(2*n, i*sqrt(2)/2), U(n, x) Chebyshev polynomial of second kind, i=sqrt(-1). - Paul Barry, Mar 13 2005 [offset 0]
a(n) = Jacobi_P(n,-1/2,1/2,2)/Jacobi_P(n,-1/2,1/2,1). - Paul Barry, Feb 03 2006 [offset 0]
a(n) = sqrt(2+(2-sqrt(3))^(2*n-1) + (2+sqrt(3))^(2*n-1))/sqrt(6). - Gerry Martens, Jun 05 2015
a(n) = (1/2 + sqrt(3)/6)*(2-sqrt(3))^n + (1/2 - sqrt(3)/6)*(2+sqrt(3))^n. - Robert Israel, Jun 05 2015
a(n) = S(n-1,4) - S(n-2,4) = (-1)^(n-1)*S(2*(n-1), i*sqrt(2)), with Chebyshev S-polynomials (A049310), the imaginary unit i, S(-1, x) = 0, for n >= 1. See also the formula above by Paul Barry (with offset 0). - Wolfdieter Lang, Oct 12 2020
a(n) = sqrt(2/3)*cosh((-1 - 2*n) arccsch(sqrt(2))), where arccsch is the inverse hyperbolic cosecant function (with offset 0). - Peter Luschny, Oct 13 2020
From Peter Bala, May 04 2025: (Start)
a(n) = (1/sqrt(3)) * sqrt(1 - T(2*n-1, -2)), where T(k, x) denotes the k-th Chebyshev polynomial of the first kind.
a(n) divides a(3*n-1); a(n) divides a(5*n-2); in general, for k >= 0, a(n) divides a((2*k+1)*n - k).
The aerated sequence [b(n)]n>=1 = [1, 0, 3, 0, 11, 0, 41, 0, ...] is a fourth-order linear divisibility sequence; that is, if n | m then b(n) | b(m). It is the case P1 = 0, P2 = -6, Q = 1 of the 3-parameter family of divisibility sequences found by Williams and Guy.
Sum_{n >= 2} 1/(a(n) - 1/a(n)) = 1/2 (telescoping series: for n >= 1, 1/(a(n) - 1/a(n)) = 1/A052530(n-1) - 1/A052530(n).) (End)