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.

A052924 Expansion of g.f.: (1-x)/(1 - 3*x - x^2).

Original entry on oeis.org

1, 2, 7, 23, 76, 251, 829, 2738, 9043, 29867, 98644, 325799, 1076041, 3553922, 11737807, 38767343, 128039836, 422886851, 1396700389, 4612988018, 15235664443, 50319981347, 166195608484, 548906806799, 1812916028881
Offset: 0

Views

Author

encyclopedia(AT)pommard.inria.fr, Jan 25 2000

Keywords

Comments

Euler encountered this sequence when finding the largest root of z^2 - 3z - 1 = 0. - V. Frederick Rickey (fred-rickey(AT)usma.edu), Aug 20 2003
Let M = a triangle with the Pell series A000129 (1, 2, 5, 12, ...) in each column, with the leftmost column shifted upwards one row. A052924 starting (1, 2, 7, 23, ...) = lim_{n->infinity} M^n, the left-shifted vector considered as a sequence. - Gary W. Adamson, Jul 31 2010
a(n) is the number of compositions of n when there are 2 types of 1 and 3 types of other natural numbers. - Milan Janjic, Aug 13 2010
Equals partial sums of A108300 prefaced with a 1: (1, 1, 5, 16, 53, 175, 578, ...). - Gary W. Adamson, Feb 15 2012

References

  • L. Euler, Introductio in analysin infinitorum, 1748, section 338. English translation by John D. Blanton, Introduction to Analysis of the Infinite, 1988, Springer, p. 286.

Crossrefs

A108300 (first differences), A006190 (partial sums), A355981 (primes).

Programs

  • GAP
    a:=[1,2];; for n in [3..30] do a[n]:=3*a[n-1]+a[n-2]; od; a; # G. C. Greubel, Jun 09 2019
  • Magma
    R:=PowerSeriesRing(Integers(), 30); Coefficients(R!( (1-x)/(1-3*x-x^2) )); // G. C. Greubel, Jun 09 2019
    
  • Maple
    spec:= [S,{S=Sequence(Prod(Sequence(Z),Union(Z,Z,Prod(Z,Z))))}, unlabeled]: seq(combstruct[count](spec,size=n), n=0..30);
    seq(coeff(series((1-x)/(1-3*x-x^2), x, n+1), x, n), n = 0..30); # G. C. Greubel, Oct 16 2019
  • Mathematica
    CoefficientList[Series[(1-x)/(1-3*x-x^2), {x,0,30}], x] (* G. C. Greubel, Jun 09 2019 *)
  • PARI
    Vec((1-x)/(1-3*x-x^2)+O(x^30)) \\ Charles R Greathouse IV, Nov 20 2011
    
  • Sage
    ((1-x)/(1-3*x-x^2)).series(x, 30).coefficients(x, sparse=False) # G. C. Greubel, Jun 09 2019
    

Formula

a(n) = 3*a(n-1) + a(n-2).
a(n) = Sum_{alpha=RootOf(-1+3*x+x^2)} (1/13)*(1+5*alpha)*alpha^(-1-n).
With offset 1: a(1)=1; for n > 1, a(n) = Sum_{i=1..3*n-4} a(ceiling(i/3)). - Benoit Cloitre, Jan 04 2004
Binomial transform of A006130. a(n) = (1/2 - sqrt(13)/26)*(3/2 - sqrt(13)/2)^n + (1/2 + sqrt(13)/26)*(3/2 + sqrt(13)/2)^n. - Paul Barry, Jul 20 2004
From Creighton Dement, Nov 04 2004: (Start)
a(n) = A006190(n+1) - A006190(n);
4*a(n) = 9*A006190(n+1) - A006497(n+1) - 2*A003688(n+1). (End)
Numerators in continued fraction [1, 2, 3, 3, 3, ...], where the latter = 0.69722436226...; the length of an inradius of a right triangle with legs 2 and 3. - Gary W. Adamson, Dec 19 2007
If p[1]=2, p[i]=3, (i>1), and if A is Hessenberg matrix of order n defined by: A[i,j] = p[j-i+1], (i<=j), A[i,j] = -1, (i=j+1), and A[i,j]=0 otherwise. Then, for n >= 1, a(n-1) = det A. - Milan Janjic, Apr 29 2010
a(n) = A006190(n) + A003688(n). - R. J. Mathar, Jul 06 2012
a(n) = Sum_{k=0..n-2} A168561(n-2,k)*3^k + 2 * Sum_{k=0..n-1} A168561(n-1,k)*3^k, n>0. - R. J. Mathar, Feb 14 2024
From Peter Bala, Jul 08 2025: (Start)
The following series telescope:
Sum_{n >= 1} 1/(a(n) + 3*(-1)^(n+1)/a(n)) = 1/2, since 1/(a(n) + 3*(-1)^(n+1)/a(n)) = b(n) - b(n+1), where b(n) = (1/3) * (a(n) + a(n-1)) / (a(n)*a(n-1)).
Sum_{n >= 1} (-1)^(n+1)/(a(n) + 3*(-1)^(n+1)/a(n)) = 1/6, since 1/(a(n) + 3*(-1)^(n+1)/a(n)) = c(n) + c(n+1), where c(n) = (1/3) * (a(n) - a(n-1)) / (a(n)*a(n-1)). (End)

Extensions

More terms from James Sellers, Jun 06 2000