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.

Showing 1-10 of 15 results. Next

A002605 a(n) = 2*(a(n-1) + a(n-2)), a(0) = 0, a(1) = 1.

Original entry on oeis.org

0, 1, 2, 6, 16, 44, 120, 328, 896, 2448, 6688, 18272, 49920, 136384, 372608, 1017984, 2781184, 7598336, 20759040, 56714752, 154947584, 423324672, 1156544512, 3159738368, 8632565760, 23584608256, 64434348032, 176037912576, 480944521216, 1313964867584
Offset: 0

Views

Author

Keywords

Comments

Individually, both this sequence and A028859 are convergents to 1 + sqrt(3). Mutually, both sequences are convergents to 2 + sqrt(3) and 1 + sqrt(3)/2. - Klaus E. Kastberg (kastberg(AT)hotkey.net.au), Nov 04 2001
The number of (s(0), s(1), ..., s(n+1)) such that 0 < s(i) < 6 and |s(i) - s(i-1)| <= 1 for i = 1, 2, ..., n + 1, s(0) = 2, s(n+1) = 3. - Herbert Kociemba, Jun 02 2004
The same sequence may be obtained by the following process. Starting a priori with the fraction 1/1, the denominators of fractions built according to the rule: add top and bottom to get the new bottom, add top and 4 times the bottom to get the new top. The limit of the sequence of fractions is sqrt(4). - Cino Hilliard, Sep 25 2005
The Hankel transform of this sequence is [1, 2, 0, 0, 0, 0, 0, 0, 0, ...]. - Philippe Deléham, Nov 21 2007
[1, 3; 1, 1]^n *[1, 0] = [A026150(n), a(n)]. - Gary W. Adamson, Mar 21 2008
(1 + sqrt(3))^n = A026150(n) + a(n)*sqrt(3). - Gary W. Adamson, Mar 21 2008
a(n+1) is the number of ways to tile a board of length n using red and blue tiles of length one and two. - Geoffrey Critzer, Feb 07 2009
Starting with offset 1 = INVERT transform of the Jacobsthal sequence, A001045: (1, 1, 3, 5, 11, 21, ...). - Gary W. Adamson, May 12 2009
Starting with "1" = INVERTi transform of A007482: (1, 3, 11, 39, 139, ...). - Gary W. Adamson, Aug 06 2010
An elephant sequence, see A175654. For the corner squares four A[5] vectors, with decimal values 85, 277, 337 and 340, lead to this sequence (without the leading 0). For the central square these vectors lead to the companion sequence A026150, without the first leading 1. - Johannes W. Meijer, Aug 15 2010
The sequence 0, 1, -2, 6, -16, 44, -120, 328, -896, ... (with alternating signs) is the Lucas U(-2,-2)-sequence. - R. J. Mathar, Jan 08 2013
a(n+1) counts n-walks (closed) on the graph G(1-vertex;1-loop,1-loop,2-loop,2-loop). - David Neil McGrath, Dec 11 2014
Number of binary strings of length 2*n - 2 in the regular language (00+11+0101+1010)*. - Jeffrey Shallit, Dec 14 2015
For n >= 1, a(n) equals the number of words of length n - 1 over {0, 1, 2, 3} in which 0 and 1 avoid runs of odd lengths. - Milan Janjic, Dec 17 2015
a(n+1) is the number of compositions of n into parts 1 and 2, both of two kinds. - Gregory L. Simay, Sep 20 2017
Number of associative, quasitrivial, and order-preserving binary operations on the n-element set {1, ..., n} that have neutral elements. - J. Devillet, Sep 28 2017
(1 + sqrt(3))^n = A026150(n) + a(n)*sqrt(3), for n >= 0; integers in the real quadratic number field Q(sqrt(3)). - Wolfdieter Lang, Feb 10 2018
Starting with 1, 2, 6, 16, ..., number of permutations of length n>0 avoiding the partially ordered pattern (POP) {1>3, 1>4} of length 4. That is, number of length n permutations having no subsequences of length 4 in which the first element is larger than the third and fourth elements. - Sergey Kitaev, Dec 09 2020
a(n) is the number of tilings of a 2 X n board missing one corner cell, with 1 X 1 and L-shaped tiles (where the L-shaped tiles cover 3 squares). Compare to A127864. - Greg Dresden and Yilin Zhu, Jul 17 2025

References

  • John Derbyshire, Prime Obsession, Joseph Henry Press, April 2004, p. 16.

Crossrefs

First differences are given by A026150.
a(n) = A073387(n, 0), n>=0 (first column of triangle).
Equals (1/3) A083337. First differences of A077846. Pairwise sums of A028860 and abs(A077917).
a(n) = A028860(n)/2 apart from the initial terms.
Row sums of A081577 and row sums of triangle A156710.
The following sequences (and others) belong to the same family: A001333, A000129, A026150, A046717, A015518, A084057, A063727, A002533, A002532, A083098, A083099, A083100, A015519.
Cf. A175289 (Pisano periods).
Cf. A002530.
Cf. A127864.

Programs

  • Haskell
    a002605 n = a002605_list !! n
    a002605_list =
       0 : 1 : map (* 2) (zipWith (+) a002605_list (tail a002605_list))
    -- Reinhard Zumkeller, Oct 15 2011
    
  • Magma
    [Floor(((1 + Sqrt(3))^n - (1 - Sqrt(3))^n)/(2*Sqrt(3))): n in [0..30]]; // Vincenzo Librandi, Aug 18 2011
    
  • Magma
    [n le 2 select n-1 else 2*Self(n-1) + 2*Self(n-2): n in [1..30]]; // G. C. Greubel, Jan 07 2018
  • Maple
    a[0]:=0:a[1]:=1:for n from 2 to 50 do a[n]:=2*a[n-1]+2*a[n-2]od: seq(a[n], n=0..33); # Zerinvary Lajos, Dec 15 2008
    a := n -> `if`(n<3, n, 2^(n-1)*hypergeom([1-n/2, (1-n)/2], [1-n], -2));
    seq(simplify(a(n)), n=0..29); # Peter Luschny, Dec 16 2015
  • Mathematica
    Expand[Table[((1 + Sqrt[3])^n - (1 - Sqrt[3])^n)/(2Sqrt[3]), {n, 0, 30}]] (* Artur Jasinski, Dec 10 2006 *)
    a[n_]:=(MatrixPower[{{1,3},{1,1}},n].{{1},{1}})[[2,1]]; Table[a[n],{n,-1,40}] (* Vladimir Joseph Stephan Orlovsky, Feb 19 2010 *)
    LinearRecurrence[{2, 2}, {0, 1}, 30] (* Robert G. Wilson v, Apr 13 2013 *)
    Round@Table[Fibonacci[n, Sqrt[2]] 2^((n - 1)/2), {n, 0, 20}] (* Vladimir Reshetnikov, Oct 15 2016 *)
    nxt[{a_,b_}]:={b,2(a+b)}; NestList[nxt,{0,1},30][[All,1]] (* Harvey P. Dale, Sep 17 2022 *)
  • PARI
    Vec(x/(1-2*x-2*x^2)+O(x^99)) \\ Charles R Greathouse IV, Jun 10 2011
    
  • PARI
    A002605(n)=([2,2;1,0]^n)[2,1] \\ M. F. Hasler, Aug 06 2018
    
  • Sage
    [lucas_number1(n,2,-2) for n in range(0, 30)] # Zerinvary Lajos, Apr 22 2009
    
  • Sage
    a = BinaryRecurrenceSequence(2,2)
    print([a(n) for n in (0..29)])  # Peter Luschny, Aug 29 2016
    

Formula

a(n) = (-I*sqrt(2))^(n-1)*U(n-1, I/sqrt(2)) where U(n, x) is the Chebyshev U-polynomial. - Wolfdieter Lang
G.f.: x/(1 - 2*x - 2*x^2).
From Paul Barry, Sep 17 2003: (Start)
E.g.f.: x*exp(x)*(sinh(sqrt(3)*x)/sqrt(3) + cosh(sqrt(3)*x)).
a(n) = (1 + sqrt(3))^(n-1)*(1/2 + sqrt(3)/6) + (1 - sqrt(3))^(n-1)*(1/2 - sqrt(3)/6), for n>0.
Binomial transform of 1, 1, 3, 3, 9, 9, ... Binomial transform is A079935. (End)
a(n) = Sum_{k=0..floor(n/2)} binomial(n - k, k)*2^(n - k). - Paul Barry, Jul 13 2004
a(n) = A080040(n) - A028860(n+1). - Creighton Dement, Jan 19 2005
a(n) = Sum_{k=0..n} A112899(n,k). - Philippe Deléham, Nov 21 2007
a(n) = Sum_{k=0..n} A063967(n,k). - Philippe Deléham, Nov 03 2006
a(n) = ((1 + sqrt(3))^n - (1 - sqrt(3))^n)/(2*sqrt(3)).
a(n) = Sum_{k=0..n} binomial(n, 2*k + 1) * 3^k.
Binomial transform of expansion of sinh(sqrt(3)x)/sqrt(3) (0, 1, 0, 3, 0, 9, ...). E.g.f.: exp(x)*sinh(sqrt(3)*x)/sqrt(3). - Paul Barry, May 09 2003
a(n) = (1/3)*Sum_{k=1..5} sin(Pi*k/2)*sin(2*Pi*k/3)*(1 + 2*cos(Pi*k/6))^n, n >= 1. - Herbert Kociemba, Jun 02 2004
a(n+1) = ((3 + sqrt(3))*(1 + sqrt(3))^n + (3 - sqrt(3))*(1 - sqrt(3))^n)/6. - Al Hakanson (hawkuu(AT)gmail.com), Jun 29 2009
Antidiagonals sums of A081577. - J. M. Bergot, Dec 15 2012
G.f.: Q(0)*x/2, where Q(k) = 1 + 1/(1 - x*(4*k + 2 + 2*x)/(x*(4*k + 4 + 2*x) + 1/Q(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Aug 30 2013
a(n) = 2^(n - 1)*hypergeom([1 - n/2, (1 - n)/2], [1 - n], -2) for n >= 3. - Peter Luschny, Dec 16 2015
Sum_{k=0..n} a(k)*2^(n-k) = a(n+2)/2 - 2^n. - Greg Dresden, Feb 11 2022
a(n) = 2^floor(n/2) * A002530(n). - Gregory L. Simay, Sep 22 2022
From Peter Bala, May 08 2024: (Start)
G.f.: x/(1 - 2*x - 2*x^2) = Sum_{n >= 0} x^(n+1) *( Product_{k = 1..n} (k + 2*x + 1)/(1 + k*x) )
Also x/(1 - 2*x - 2*x^2) = Sum_{n >= 0} (2*x)^n *( x*Product_{k = 1..n} (m*k + 2 - m + x)/(1 + 2*m*k*x) ) for arbitrary m (both series are telescoping). (End)
a(n) = A127864(n-1) + A127864(n-2). - Greg Dresden and Yilin Zhu, Jul 17 2025

Extensions

Edited by N. J. A. Sloane, Apr 15 2009

A001835 a(n) = 4*a(n-1) - a(n-2), with a(0) = 1, a(1) = 1.

Original entry on oeis.org

1, 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, 585510091136891
Offset: 0

Views

Author

Keywords

Comments

See A079935 for another version.
Number of ways of packing a 3 X 2*(n-1) rectangle with dominoes. - David Singmaster.
Equivalently, number of perfect matchings of the P_3 X P_{2(n-1)} lattice graph. - Emeric Deutsch, Dec 28 2004
The terms of this sequence are the positive square roots of the indices of the octagonal numbers (A046184) - Nicholas S. Horne (nairon(AT)loa.com), Dec 13 1999
Terms are the solutions to: 3*x^2 - 2 is a square. - Benoit Cloitre, Apr 07 2002
Gives solutions x > 0 of the equation floor(x*r*floor(x/r)) == floor(x/r*floor(x*r)) where r = 1 + sqrt(3). - Benoit Cloitre, Feb 19 2004
a(n) = L(n-1,4), where L is defined as in A108299; see also A001834 for L(n,-4). - Reinhard Zumkeller, Jun 01 2005
Values x + y, where (x, y) solves for x^2 - 3*y^2 = 1, i.e., a(n) = A001075(n) + A001353(n). - Lekraj Beedassy, Jul 21 2006
Number of 01-avoiding words of length n on alphabet {0,1,2,3} which do not end in 0. (E.g., for n = 2 we have 02, 03, 11, 12, 13, 21, 22, 23, 31, 32, 33.) - Tanya Khovanova, Jan 10 2007
sqrt(3) = 2/2 + 2/3 + 2/(3*11) + 2/(11*41) + 2/(41*153) + 2/(153*571) + ... - Gary W. Adamson, Dec 18 2007
The lower principal convergents to 3^(1/2), beginning with 1/1, 5/3, 19/11, 71/41, comprise a strictly increasing sequence; numerators = A001834, denominators = A001835. - Clark Kimberling, Aug 27 2008
From Gary W. Adamson, Jun 21 2009: (Start)
A001835 and A001353 = bisection of denominators of continued fraction [1, 2, 1, 2, 1, 2, ...]; i.e., bisection of A002530.
a(n) = determinant of an n*n tridiagonal matrix with 1's in the super- and subdiagonals and (3, 4, 4, 4, ...) as the main diagonal.
Also, the product of the eigenvalues of such matrices: a(n) = Product_{k=1..(n-1)/2)} (4 + 2*cos(2*k*Pi/n).
(End)
Let M = a triangle with the even-indexed Fibonacci numbers (1, 3, 8, 21, ...) in every column, and the leftmost column shifted up one row. a(n) starting (1, 3, 11, ...) = lim_{n->oo} M^n, the left-shifted vector considered as a sequence. - Gary W. Adamson, Jul 27 2010
a(n+1) is the number of compositions of n when there are 3 types of 1 and 2 types of other natural numbers. - Milan Janjic, Aug 13 2010
For n >= 2, a(n) equals the permanent of the (2*n-2) X (2*n-2) tridiagonal matrix with sqrt(2)'s along the main diagonal, and 1's along the superdiagonal and the subdiagonal. - John M. Campbell, Jul 08 2011
Primes in the sequence are apparently those in A096147. - R. J. Mathar, May 09 2013
Except for the first term, positive values of x (or y) satisfying x^2 - 4xy + y^2 + 2 = 0. - Colin Barker, Feb 04 2014
Except for the first term, positive values of x (or y) satisfying x^2 - 14xy + y^2 + 32 = 0. - Colin Barker, Feb 10 2014
The (1,1) element of A^n where A = (1, 1, 1; 1, 2, 1; 1, 1, 2). - David Neil McGrath, Jul 23 2014
Yong Hao Ng has shown that for any n, a(n) is coprime with any member of A001834 and with any member of A001075. - René Gy, Feb 25 2018
a(n+1) is the number of spanning trees of the graph T_n, where T_n is a 2 X n grid with an additional vertex v adjacent to (1,1) and (2,1). - Kevin Long, May 04 2018
a(n)/A001353(n) is the resistance of an n-ladder graph whose edges are replaced by one-ohm resistors. The resistance in ohms is measured at two nodes at one end of the ladder. It approaches sqrt(3) - 1 for n -> oo. See A342568, A357113, and A357115 for related information. - Hugo Pfoertner, Sep 17 2022
a(n) is the number of ways to tile a 1 X (n-1) strip with three types of tiles: small isosceles right triangles (with small side length 1), 1 X 1 squares formed by joining two of those right triangles along the hypotenuse, and large isosceles right triangles (with large side length 2) formed by joining two of those right triangles along a short leg. As an example, here is one of the a(6)=571 ways to tile a 1 X 5 strip with these kinds of tiles:
| / \ |\ /| |
|/_\|\/_||. - Greg Dresden and Arjun Datta, Jun 30 2023
From Klaus Purath, May 11 2024: (Start)
For any two consecutive terms (a(n), a(n+1)) = (x,y): x^2 - 4xy + y^2 = -2 = A028872(-1). In general, the following applies to all sequences (t) satisfying t(i) = 4t(i-1) - t(i-2) with t(0) = 1 and two consecutive terms (x,y): x^2 - 4xy + y^2 = A028872(t(1)-2). This includes and interprets the Feb 04 2014 comments here and on A001075 by Colin Barker and the Dec 12 2012 comment on A001353 by Max Alekseyev. By analogy to this, for three consecutive terms (x,y,z) y^2 - xz = A028872(t(1)-2). This includes and interprets the Jul 10 2021 comment on A001353 by Bernd Mulansky.
If (t) is a sequence satisfying t(k) = 3t(k-1) + 3t(k-2) - t(k-3) or t(k) = 4t(k-1) - t(k-2) without regard to initial values and including this sequence itself, then a(n) = (t(k+2n+1) + t(k))/(t(k+n+1) + t(k+n)) always applies, as long as t(k+n+1) + t(k+n) != 0 for integer k and n >= 1. (End)
Binomial transform of 1, 0, 2, 4, 12, ... (A028860 without the initial -1) and reverse binomial transform of 1, 2, 6, 24, 108, ... (A094433 without the initial 1). - Klaus Purath, Sep 09 2024

References

  • Julio R. Bastida, Quadratic properties of a linearly recurrent sequence. Proceedings of the Tenth Southeastern Conference on Combinatorics, Graph Theory and Computing (Florida Atlantic Univ., Boca Raton, Fla., 1979), pp. 163-166, Congress. Numer., XXIII-XXIV, Utilitas Math., Winnipeg, Man., 1979. MR0561042 (81e:10009).
  • Leonhard Euler, (E388) Vollstaendige Anleitung zur Algebra, Zweiter Theil, reprinted in: Opera Omnia. Teubner, Leipzig, 1911, Series (1), Vol. 1, p. 375.
  • F. Faase, On the number of specific spanning subgraphs of the graphs G X P_n, Ars Combin. 49 (1998), 129-154.
  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 1990, p. 329.
  • Serge Lang, Introduction to Diophantine Approximations, Addison-Wesley, New York, 1966.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • R. P. Stanley, Enumerative Combinatorics I, p. 292.

Crossrefs

Row 3 of array A099390.
Essentially the same as A079935.
First differences of A001353.
Partial sums of A052530.
Pairwise sums of A006253.
Bisection of A002530, A005246 and A048788.
First column of array A103997.
Cf. A001519, A003699, A082841, A101265, A125077, A001353, A001542, A096147 (subsequence of primes).

Programs

  • GAP
    a:=[1,1];; for n in [3..20] do a[n]:=4*a[n-1]-a[n-2]; od; a; # G. C. Greubel, Dec 23 2019
  • Haskell
    a001835 n = a001835_list !! n
    a001835_list =
       1 : 1 : zipWith (-) (map (4 *) $ tail a001835_list) a001835_list
    -- Reinhard Zumkeller, Aug 14 2011
    
  • Magma
    [n le 2 select 1 else 4*Self(n-1)-Self(n-2): n in [1..25]]; // Vincenzo Librandi, Sep 16 2016
    
  • Maple
    f:=n->((3+sqrt(3))^(2*n-1)+(3-sqrt(3))^(2*n-1))/6^n; [seq(simplify(expand(f(n))),n=0..20)]; # N. J. A. Sloane, Nov 10 2009
  • Mathematica
    CoefficientList[Series[(1-3x)/(1-4x+x^2), {x, 0, 24}], x] (* Jean-François Alcover, Jul 25 2011, after g.f. *)
    LinearRecurrence[{4,-1},{1,1},30] (* Harvey P. Dale, Jun 08 2013 *)
    Table[Round@Fibonacci[2n-1, Sqrt[2]], {n, 0, 20}] (* Vladimir Reshetnikov, Sep 15 2016 *)
    Table[(3*ChebyshevT[n, 2] - ChebyshevU[n, 2])/2, {n, 0, 20}] (* G. C. Greubel, Dec 23 2019 *)
  • PARI
    {a(n) = real( (2 + quadgen(12))^n * (1 - 1 / quadgen(12)) )} /* Michael Somos, Sep 19 2008 */
    
  • PARI
    {a(n) = subst( (polchebyshev(n) + polchebyshev(n-1)) / 3, x, 2)} /* Michael Somos, Sep 19 2008 */
    
  • Sage
    [lucas_number1(n,4,1)-lucas_number1(n-1,4,1) for n in range(25)] # Zerinvary Lajos, Apr 29 2009
    
  • Sage
    [(3*chebyshev_T(n,2) - chebyshev_U(n,2))/2 for n in (0..20)] # G. C. Greubel, Dec 23 2019
    

Formula

G.f.: (1 - 3*x)/(1 - 4*x + x^2). - Simon Plouffe in his 1992 dissertation
a(1-n) = a(n).
a(n) = ((3 + sqrt(3))^(2*n - 1) + (3 - sqrt(3))^(2*n - 1))/6^n. - Dean Hickerson, Dec 01 2002
a(n) = (8 + a(n-1)*a(n-2))/a(n-3). - Michael Somos, Aug 01 2001
a(n+1) = Sum_{k=0..n} 2^k * binomial(n + k, n - k), n >= 0. - Len Smiley, Dec 09 2001
Limit_{n->oo} a(n)/a(n-1) = 2 + sqrt(3). - Gregory V. Richardson, Oct 10 2002
a(n) = 2*A061278(n-1) + 1 for n > 0. - Bruce Corrigan (scentman(AT)myfamily.com), Nov 04 2002
Let q(n, x) = Sum_{i=0..n} x^(n-i)*binomial(2*n - i, i); then q(n, 2) = a(n+1). - Benoit Cloitre, Nov 10 2002
a(n+1) = Sum_{k=0..n} ((-1)^k)*((2*n+1)/(2*n + 1 - k))*binomial(2*n + 1 - k, k)*6^(n - k) (from standard T(n,x)/x, n >= 1, Chebyshev sum formula). The Smiley and Cloitre sum representation is that of the S(2*n, i*sqrt(2))*(-1)^n Chebyshev polynomial. - Wolfdieter Lang, Nov 29 2002
a(n) = S(n-1, 4) - S(n-2, 4) = T(2*n-1, sqrt(3/2))/sqrt(3/2) = S(2*(n-1), i*sqrt(2))*(-1)^(n - 1), with S(n, x) := U(n, x/2), resp. T(n, x), Chebyshev's polynomials of the second, resp. first, kind. See A049310 and A053120. S(-1, x) = 0, S(-2, x) = -1, S(n, 4) = A001353(n+1), T(-1, x) = x.
a(n+1) = sqrt((A001834(n)^2 + 2)/3), n >= 0 (see Cloitre comment).
Sequence satisfies -2 = f(a(n), a(n+1)) where f(u, v) = u^2 + v^2 - 4*u*v. - Michael Somos, Sep 19 2008
a(n) = (1/6)*(3*(2 - sqrt(3))^n + sqrt(3)*(2 - sqrt(3))^n + 3*(2 + sqrt(3))^n - sqrt(3)*(2 + sqrt(3))^n) (Mathematica's solution to the recurrence relation). - Sarah-Marie Belcastro, Jul 04 2009
If p[1] = 3, p[i] = 2, (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) = (a(n-1)^2 + 2)/a(n-2). - Irene Sermon, Oct 28 2013
a(n) = A001353(n+1) - 3*A001353(n). - R. J. Mathar, Oct 30 2015
a(n) = a(n-1) + 2*A001353(n-1). - Kevin Long, May 04 2018
From Franck Maminirina Ramaharo, Nov 11 2018: (Start)
a(n) = (-1)^n*(A125905(n) + 3*A125905(n-1)), n > 0.
E.g.f.: exp^(2*x)*(3*cosh(sqrt(3)*x) - sqrt(3)*sinh(sqrt(3)*x))/3. (End)
From Peter Bala, Feb 12 2024: (Start)
For n in Z, a(n) = A001353(n) + A001353(1-n).
For n, j, k in Z, a(n)*a(n+j+k) - a(n+j)*a(n+k) = 2*A001353(j)*A001353(k). The case j = 1, k = 2 is given above. (End)

A030195 a(n) = 3*a(n-1) + 3*a(n-2), a(0)=0, a(1)=1.

Original entry on oeis.org

0, 1, 3, 12, 45, 171, 648, 2457, 9315, 35316, 133893, 507627, 1924560, 7296561, 27663363, 104879772, 397629405, 1507527531, 5715470808, 21668995017, 82153397475, 311467177476, 1180861724853, 4476986706987, 16973545295520
Offset: 0

Views

Author

Keywords

Comments

Scaled Chebyshev U-polynomials evaluated at I*sqrt(3)/2.
Number of zeros in the substitution system {0 -> 1111100, 1 -> 10} at step n from initial string "1" (1 -> 10 -> 101111100 -> ...). - Ilya Gutkovskiy, Apr 10 2017
a(n+1) is the number of compositions of n having parts 1 and 2, both of three kinds. - Gregory L. Simay, Sep 21 2017
More generally, define a(n) = k*a(n-1) + k*a(n-2), a(0) = 0 and a(1) = 1. Then g.f. a(n) = 1/(1 - k*x - k*x^2) and a(n+1) is the number of compositions of n having parts 1 and 2, both of k kinds. - Gregory L. Simay, Sep 22 2017

Examples

			G.f. = x + 3*x^2 + 12*x^3 + 45*x^4 + 171*x^5 + 648*x^6 + 2457*x^7 + ...
		

Crossrefs

Programs

  • Haskell
    a030195 n = a030195_list !! n
    a030195_list =
       0 : 1 : map (* 3) (zipWith (+) a030195_list (tail a030195_list))
    -- Reinhard Zumkeller, Oct 14 2011
    
  • Magma
    I:=[0,1]; [n le 2 select I[n] else 3*Self(n-1) + 3*Self(n-2): n in [1..30]]; // G. C. Greubel, Jan 24 2018
  • Mathematica
    CoefficientList[Series[1/(1-3x-3x^2), {x, 0, 25}], x] (* Zerinvary Lajos, Mar 22 2007 *)
    LinearRecurrence[{3, 3}, {0, 1}, 24] (* Or *)
    RecurrenceTable[{a[n] == 3 a[n - 1] + 3 a[n - 2], a[0] == 0, a[1] == 1}, a, {n, 0, 23}] (* Robert G. Wilson v, Aug 18 2012 *)
  • PARI
    {a(n) = n--; polchebyshev(n, 2, I*sqrt(3)/2) * (-I*sqrt(3))^n};
    
  • Sage
    [lucas_number1(n,3,-3) for n in range(0, 25)] # Zerinvary Lajos, Apr 22 2009
    

Formula

a(n+1) = (-I*sqrt(3))^n*U(n, I*sqrt(3)/2).
G.f.: x / (1 - 3*x - 3*x^2).
a(n+1) = Sum_{k=0..floor(n/2)} 3^(n-k)*binomial(n-k, k). - Emeric Deutsch, Nov 14 2001
a(n) = (p^n - q^n)/sqrt(21); p = (3 + sqrt 21)/2, q = (3 - sqrt 21)/2. - Gary W. Adamson, Jul 02 2003
For n > 0, a(n) = Sum_{k=0..n-1} (2^k)*A063967(n-1,k). - Gerald McGarvey, Jul 23 2006
a(n+1) = Sum_{k=0..n} 2^k*A063967(n,k). - Philippe Deléham, Nov 03 2006

Extensions

Edited by Ralf Stephan, Aug 02 2004
I simplified the definition. As a result the offsets in some of the formulas may need to shifted by 1. - N. J. A. Sloane, Apr 01 2006
Formulas shifted to match offset. - Charles R Greathouse IV, Jan 31 2011

A127864 Number of tilings of a 2 X n board with 1 X 1 and L-shaped tiles (where the L-shaped tiles cover 3 squares).

Original entry on oeis.org

1, 1, 5, 11, 33, 87, 241, 655, 1793, 4895, 13377, 36543, 99841, 272767, 745217, 2035967, 5562369, 15196671, 41518081, 113429503, 309895169, 846649343, 2313089025, 6319476735, 17265131521, 47169216511, 128868696065, 352075825151, 961889042433, 2627929735167
Offset: 0

Views

Author

Silvia Heubach (sheubac(AT)calstatela.edu), Feb 03 2007

Keywords

Comments

The signed version of this sequence appears as A077917.

Examples

			a(2) = 5 because the 2 X 2 board can be tiled either with 4 squares or with a single L-shaped tile (in four orientations) together with a single square tile.
		

Crossrefs

Programs

  • Magma
    I:=[1,1,5]; [n le 3 select I[n] else Self(n-1) + 4*Self(n-2) + 2*Self(n-3): n in [1..41]]; // G. C. Greubel, Dec 08 2022
    
  • Mathematica
    CoefficientList[Series[1/(1-x-4*x^2-2*x^3), {x,0,30}], x]
  • SageMath
    A028860 = BinaryRecurrenceSequence(2,2,-1,1)
    def A127864(n): return A028860(n+2) + (-1)^n
    [A127864(n) for n in range(51)] # G. C. Greubel, Dec 08 2022

Formula

a(n) = a(n-1) + 4*a(n-2) + 2*a(n-3).
a(n) = (-1)^n + (1/sqrt(3)) * ((1+sqrt(3))^n - (1-sqrt(3))^n).
G.f.: 1/(1 - x - 4*x^2 - 2*x^3).
a(n) = A028860(n+2) + (-1)^n. - R. J. Mathar, Oct 29 2010
E.g.f.: exp(-x) + (2/sqrt(3))*exp(x)*sinh(sqrt(3)*x). - G. C. Greubel, Dec 08 2022
From Greg Dresden, Nov 10 2024: (Start)
a(n) = 1 + 4*a(n-2) + 6*Sum_{i=0..n-3} a(i) for n>1.
a(2*n) = a(n)^2 + 4*a(n-1)^2 + 4*a(n-1)*a(n-2) for n>1. (End)

A106435 a(n) = 3*a(n-1) + 3*a(n-2), a(0)=0, a(1)=3.

Original entry on oeis.org

0, 3, 9, 36, 135, 513, 1944, 7371, 27945, 105948, 401679, 1522881, 5773680, 21889683, 82990089, 314639316, 1192888215, 4522582593, 17146412424, 65006985051, 246460192425, 934401532428, 3542585174559, 13430960120961
Offset: 0

Views

Author

Roger L. Bagula, May 29 2005

Keywords

Comments

The first entry of the vector v[n] = M*v[n-1], where M is the 2 x 2 matrix [[0,3],[1,3]] and v[1] is the column vector [0,1]. The characteristic polynomial of the matrix M is x^2-3x-3.

Crossrefs

Programs

  • Haskell
    a106435 n = a106435_list !! n
    a106435_list = 0 : 3 : map (* 3) (zipWith (+) a106435_list (tail
    a106435_list))
    -- Reinhard Zumkeller, Oct 15 2011
    
  • Magma
    a:=[0,3]; [n le 2 select a[n] else    3*Self(n-1) + 3*Self(n-2) : n in [1..24]]; // Marius A. Burtea, Jan 21 2020
    
  • Magma
    R:=PowerSeriesRing(Rationals(), 25); Coefficients(R!(3*x/(1-3*x-3*x^2))); // Marius A. Burtea, Jan 21 2020
    
  • Maple
    seq(coeff(series(3*x/(1-3*x-3*x^2), x, n+1), x, n), n = 0..30); # G. C. Greubel, Mar 12 2020
  • Mathematica
    LinearRecurrence[{3,3}, {0,3}, 30] (* G. C. Greubel, Mar 12 2020 *)
  • PARI
    a(n)=([0,3;1,3]^n)[1,2]
    
  • Sage
    [3^((n+1)/2)*i^(1-n)*chebyshev_U(n-1, i*sqrt(3)/2) for n in (0..30)] # G. C. Greubel, Mar 12 2020

Formula

G.f.: 3*x/(1-3*x-3*x^2). - Philippe Deléham, Nov 19 2008
From G. C. Greubel, Mar 12 2020: (Start)
a(n) = 3^((n+1)/2) * Fibonacci(n, sqrt(3)), where F(n, x) is the Fibonacci polynomial.
a(n) = 3^((n+1)/2)*i^(1-n)*ChebyshevU(n-1, i*sqrt(3)/2). (End)

Extensions

Edited by N. J. A. Sloane, May 20 2006 and May 29 2006
Offset corrected by Reinhard Zumkeller, Oct 15 2011

A083337 a(n) = 2*a(n-1) + 2*a(n-2); a(0)=0, a(1)=3.

Original entry on oeis.org

0, 3, 6, 18, 48, 132, 360, 984, 2688, 7344, 20064, 54816, 149760, 409152, 1117824, 3053952, 8343552, 22795008, 62277120, 170144256, 464842752, 1269974016, 3469633536, 9479215104, 25897697280, 70753824768, 193303044096, 528113737728, 1442833563648, 3941894602752, 10769456332800
Offset: 0

Views

Author

Mario Catalani (mario.catalani(AT)unito.it), Apr 29 2003

Keywords

Crossrefs

Programs

  • Haskell
    a083337 n = a083337_list !! n
    a083337_list =
       0 : 3 : map (* 2) (zipWith (+) a083337_list (tail a083337_list))
    -- Reinhard Zumkeller, Oct 15 2011
    
  • Mathematica
    CoefficientList[Series[3x/(1-2x-2x^2), {x, 0, 25}], x]
    s = Sqrt[3]; a[n_] := Simplify[s*((1 + s)^n - (1 - s)^n)/2]; Array[a, 30, 0] (* or *)
    LinearRecurrence[{2, 2}, {0, 3}, 31] (* Robert G. Wilson v, Aug 07 2018 *)
  • PARI
    apply( a(n)=([1,1;3,1]^n)[2,1], [0..30]) \\ or: ([2,2;1,0]^n)[2,1]*3. - M. F. Hasler, Aug 06 2018

Formula

G.f.: 3x/(1 - 2x - 2x^2).
a(n) = a(n-1) + 3*A026150(n-1). a(n)/A026150(n) converges to sqrt(3).
a(n) = lower left term of [1,1; 3,1]^n. - Gary W. Adamson, Mar 12 2008

Extensions

Edited and definition completed by M. F. Hasler, Aug 06 2018

A108898 a(n+3) = 3*a(n+2) - 2*a(n), a(0) = -1, a(1) = 1, a(2) = 3.

Original entry on oeis.org

-1, 1, 3, 11, 31, 87, 239, 655, 1791, 4895, 13375, 36543, 99839, 272767, 745215, 2035967, 5562367, 15196671, 41518079, 113429503, 309895167, 846649343, 2313089023, 6319476735, 17265131519, 47169216511, 128868696063, 352075825151, 961889042431, 2627929735167, 7179637555199
Offset: 0

Views

Author

Creighton Dement, Jul 16 2005

Keywords

Comments

In reference to the program code, "ibasek" corresponds to the floretion 'ik'. Sequences in this same batch are "kbase" = A005665 (Tower of Hanoi with cyclic moves only.) and "ibase" = A077846.

Crossrefs

Programs

  • Haskell
    a108898 n = a108898_list !! n
    a108898_list = -1 : 1 : 3 :
       zipWith (-) (map (* 3) $ drop 2 a108898_list) (map (* 2) a108898_list)
    -- Reinhard Zumkeller, Oct 15 2011
    
  • Maple
    seriestolist(series((-1+4*x)/((x-1)*(2*x^2+2*x-1)), x=0,31)); -or- Floretion Algebra Multiplication Program, FAMP Code: 2ibaseksumseq[A*B] with A = + 'i + 'ii' + 'ij' + 'ik' and B = + .5'i + .5'j - .5'k + .5i' - .5j' + .5k' + .5'ij' + .5'ik' - .5'ji' - .5'ki'; Sumtype is set to:sum[(Y[0], Y[1], Y[2]),mod(3)
  • Mathematica
    LinearRecurrence[{3, 0, -2}, {-1, 1, 3}, 40] (* Paolo Xausa, Aug 21 2024 *)
  • PARI
    Vec(-(1 - 4*x) / ((1 - x)*(1 - 2*x - 2*x^2)) + O(x^40)) \\ Colin Barker, Apr 29 2019

Formula

a(n) = A028860(n+2)-1.
G.f.: (-1+4*x)/((x-1)*(2*x^2+2*x-1)).
From Colin Barker, Apr 29 2019: (Start)
a(n) = (-1 + (-(1-sqrt(3))^n + (1+sqrt(3))^n)/sqrt(3)).
a(n) = 3*a(n-1) - 2*a(n-3) for n>2.
(End)

A221463 T(n,k)=Number of 0..k arrays of length n with each element unequal to at least one neighbor, starting with 0.

Original entry on oeis.org

0, 0, 1, 0, 2, 1, 0, 3, 4, 2, 0, 4, 9, 12, 3, 0, 5, 16, 36, 32, 5, 0, 6, 25, 80, 135, 88, 8, 0, 7, 36, 150, 384, 513, 240, 13, 0, 8, 49, 252, 875, 1856, 1944, 656, 21, 0, 9, 64, 392, 1728, 5125, 8960, 7371, 1792, 34, 0, 10, 81, 576, 3087, 11880, 30000, 43264, 27945, 4896, 55, 0, 11
Offset: 1

Views

Author

R. H. Hardin, general recursion proved by Robert Israel in the Sequence Fans Mailing List, Jan 17 2013

Keywords

Comments

Table starts
..0.....0.......0........0.........0..........0..........0...........0
..1.....2.......3........4.........5..........6..........7...........8
..1.....4.......9.......16........25.........36.........49..........64
..2....12......36.......80.......150........252........392.........576
..3....32.....135......384.......875.......1728.......3087........5120
..5....88.....513.....1856......5125......11880......24353.......45568
..8...240....1944.....8960.....30000......81648.....192080......405504
.13...656....7371....43264....175625.....561168....1515031.....3608576
.21..1792...27945...208896...1028125....3856896...11949777....32112640
.34..4896..105948..1008640...6018750...26508384...94253656...285769728
.55.13376..401679..4870144..35234375..182191680..743424031..2543058944
.89.36544.1522881.23515136.206265625.1252200384.5863743809.22630629376

Examples

			Some solutions for n=6 k=4
..0....0....0....0....0....0....0....0....0....0....0....0....0....0....0....0
..4....2....1....3....3....2....2....1....4....2....3....1....3....2....3....3
..1....4....0....1....2....4....3....0....2....0....3....3....2....0....0....4
..0....0....3....4....2....3....2....1....0....3....2....4....3....3....4....1
..1....2....1....2....1....0....3....4....0....1....3....1....3....0....2....0
..0....3....2....3....3....1....4....0....4....2....0....0....0....4....0....3
		

Crossrefs

Column 1 is A000045(n-1)
Column 2 is A028860(n+1)
Column 3 is A106435(n-1)
Column 4 is A094013
Column 5 is A106565(n-1)
Row 2 is A000027
Row 3 is A000290
Row 4 is A011379

Formula

Recursion for column k:
k=1: a(n) = a(n-1) +a(n-2)
k=2: a(n) = 2*a(n-1) +2*a(n-2)
k=3: a(n) = 3*a(n-1) +3*a(n-2)
k=4: a(n) = 4*a(n-1) +4*a(n-2)
k=5: a(n) = 5*a(n-1) +5*a(n-2)
k=6: a(n) = 6*a(n-1) +6*a(n-2)
k=7: a(n) = 7*a(n-1) +7*a(n-2)
Empirical for row n:
n=2: a(k) = 1*k
n=3: a(k) = 1*k^2
n=4: a(k) = 1*k^3 + 1*k^2
n=5: a(k) = 1*k^4 + 2*k^3
n=6: a(k) = 1*k^5 + 3*k^4 + 1*k^3
n=7: a(k) = 1*k^6 + 4*k^5 + 3*k^4
n=8: a(k) = 1*k^7 + 5*k^6 + 6*k^5 + 1*k^4
n=9: a(k) = 1*k^8 + 6*k^7 + 10*k^6 + 4*k^5
n=10: a(k) = 1*k^9 + 7*k^8 + 15*k^7 + 10*k^6 + 1*k^5
n=11: a(k) = 1*k^10 + 8*k^9 + 21*k^8 + 20*k^7 + 5*k^6
n=12: a(k) = 1*k^11 + 9*k^10 + 28*k^9 + 35*k^8 + 15*k^7 + 1*k^6
n=13: a(k) = 1*k^12 + 10*k^11 + 36*k^10 + 56*k^9 + 35*k^8 + 6*k^7
n=14: a(k) = 1*k^13 + 11*k^12 + 45*k^11 + 84*k^10 + 70*k^9 + 21*k^8 + 1*k^7
n=15: a(k) = 1*k^14 + 12*k^13 + 55*k^12 + 120*k^11 + 126*k^10 + 56*k^9 + 7*k^8
Apparently then T(n,k) = sum { binomial(n-2-i,i)*k^(n-1-i) , 0<=2*i<=n-2 }.
The formula reduces to T(n,k) = [4*k^(n-1)*(1+G)^(2*n-2) +4^n] /[2^(n+1) *G *(1+G)^(n-1)] for even n and to T(n,k) = [4*k^(n-1) *(1+G)^(2*n-2) -4^n] /[2^(n+1) *G *(1+G)^(n-1)] for odd n, where G=sqrt(1+4/k). - R. J. Mathar, Jan 21 2013

A293005 Number of associative, quasitrivial, and order-preserving binary operations on the n-element set {1,...,n}.

Original entry on oeis.org

0, 1, 4, 12, 34, 94, 258, 706, 1930, 5274, 14410, 39370, 107562, 293866, 802858, 2193450, 5992618, 16372138, 44729514, 122203306, 333865642, 912137898, 2492007082, 6808289962, 18600594090, 50817768106, 138836724394, 379308985002, 1036291418794, 2831200807594
Offset: 0

Views

Author

J. Devillet, Sep 28 2017

Keywords

Crossrefs

Programs

  • PARI
    concat(0, Vec(x*(1 + x) / ((1 - x)*(1 - 2*x - 2*x^2)) + O(x^30))) \\ Colin Barker, Sep 28 2017

Formula

G.f.: x(x+1) / (2x^3-3*x+1).
a(0) = 0, a(1) = 1, a(n+2)-2*a(n+1)-2*a(n) = 2.
3*a(n)+2 = Sum_{k>=0} (2*binomial(n,2*k)+3*binomial(n,2*k+1))*3^k.
From Colin Barker, Sep 28 2017: (Start)
a(n) = (-4 - (1-sqrt(3))^n*(-2+sqrt(3)) + (1+sqrt(3))^n*(2+sqrt(3))) / 6.
a(n) = 3*a(n-1) - 2*a(n-2) for n>2. (End)
E.g.f.: exp(x)*(2*cosh(sqrt(3)*x) + sqrt(3)*sinh(sqrt(3)*x) - 2)/3. - Stefano Spezia, Apr 11 2025

A293006 Expansion of 2*x^2*(x+1) / (2*x^3-3*x+1).

Original entry on oeis.org

0, 0, 2, 8, 24, 68, 188, 516, 1412, 3860, 10548, 28820, 78740, 215124, 587732, 1605716, 4386900, 11985236, 32744276, 89459028, 244406612, 667731284, 1824275796, 4984014164, 13616579924, 37201188180, 101635536212, 277673448788, 758617970004, 2072582837588
Offset: 0

Views

Author

J. Devillet, Sep 28 2017

Keywords

Comments

Number of associative, quasitrivial, and order-preserving binary operations on the n-element set {1,...,n} that have annihilator elements.

Crossrefs

Programs

  • Maple
    f:= gfun:-rectoproc({a(n) = 3*a(n-1) - 2*a(n-3),a(0)=0,a(1)=0,a(2)=2,a(3)=8},a(n),remember):
    map(f, [$0..100]); # Robert Israel, Sep 28 2017
  • Mathematica
    Join[{0}, LinearRecurrence[{3, 0, -2}, {0, 2, 8}, 30]] (* Jean-François Alcover, Sep 19 2018 *)
  • PARI
    concat(vector(2), Vec(2*x^2*(1 + x) / ((1 - x)*(1 - 2*x - 2*x^2)) + O(x^30))) \\ Colin Barker, Sep 28 2017

Formula

a(n) = 2*A293005(n-1), a(0) = 0.
From Colin Barker, Sep 28 2017: (Start)
a(n) = (-8 + (1-sqrt(3))^(1+n) + (1+sqrt(3))^(1+n)) / 6 for n>0.
a(n) = 3*a(n-1) - 2*a(n-2) for n>3.
(End)
Showing 1-10 of 15 results. Next