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-9 of 9 results.

A025192 a(0)=1; a(n) = 2*3^(n-1) for n >= 1.

Original entry on oeis.org

1, 2, 6, 18, 54, 162, 486, 1458, 4374, 13122, 39366, 118098, 354294, 1062882, 3188646, 9565938, 28697814, 86093442, 258280326, 774840978, 2324522934, 6973568802, 20920706406, 62762119218, 188286357654, 564859072962, 1694577218886, 5083731656658, 15251194969974
Offset: 0

Views

Author

Keywords

Comments

Warning: there is considerable overlap between this entry and the essentially identical A008776.
Shifts one place left when plus-convolved (PLUSCONV) with itself. a(n) = 2*Sum_{i=0..n-1} a(i). - Antti Karttunen, May 15 2001
Let M = { 0, 1, ..., 2^n-1 } be the set of all n-bit numbers. Consider two operations on this set: "sum modulo 2^n" (+) and "bitwise exclusive or" (XOR). The results of these operations are correlated.
To give a numerical measure, consider the equations over M: u = x + y, v = x XOR y and ask for how many pairs (u,v) is there a solution? The answer is exactly a(n) = 2*3^(n-1) for n >= 1. The fraction a(n)/4^n of such pairs vanishes as n goes to infinity. - Max Alekseyev, Feb 26 2003
Number of (s(0), s(1), ..., s(2n+2)) such that 0 < s(i) < 6 and |s(i) - s(i-1)| = 1 for i = 1,2,...,2n+2, s(0) = 3, s(2n+2) = 3. - Herbert Kociemba, Jun 10 2004
Number of compositions of n into parts of two kinds. For a string of n objects, before the first, choose first kind or second kind; before each subsequent object, choose continue, first kind, or second kind. For example, compositions of 3 are 3; 2,1; 1,2; and 1,1,1. Using parts of two kinds, these produce respectively 2, 4, 4 and 8 compositions, 2+4+4+8 = 18. - Franklin T. Adams-Watters, Aug 18 2006
In the compositions the kinds of parts are ordered inside a run of identical parts, see example. Replacing "ordered" by "unordered" gives A052945. - Joerg Arndt, Apr 28 2013
Number of permutations of {1, 2, ..., n+1} such that no term is more than 2 larger than its predecessor. For example, a(3) = 18 because all permutations of {1, 2, 3, 4} are valid except 1423, 1432, 2143, 3142, 2314, 3214, in which 1 is followed by 4. Proof: removing (n + 1) gives a still-valid sequence. For n >= 2, can insert (n + 1) either at the beginning or immediately following n or immediately following (n - 1), but nowhere else. Thus the number of such permutations triples when we increase the sequence length by 1. - Joel B. Lewis, Nov 14 2006
Antidiagonal sums of square array A081277. - Philippe Deléham, Dec 04 2006
Equals row sums of triangle A160760. - Gary W. Adamson, May 25 2009
Let M = a triangle with (1, 2, 4, 8, ...) as the left border and all other columns = (0, 1, 2, 4, 8, ...). A025192 = lim_{n->oo} M^n, the left-shifted vector considered as a sequence. - Gary W. Adamson, Jul 27 2010
Number of nonisomorphic graded posets with 0 and uniform hasse graph of rank n with no 3-element antichain. ("Uniform" used in the sense of Retakh, Serconek and Wilson. By "graded" we mean that all maximal chains have the same length n.) - David Nacin, Feb 13 2012
Equals partial sums of A003946 prefaced with a 1: (1, 1, 4, 12, 36, 108, ...). - Gary W. Adamson, Feb 15 2012
Number of vertices (or sides) of the (n-1)-th iteration of a Gosper island. - Arkadiusz Wesolowski, Feb 07 2013
Row sums of triangle in A035002. - Jon Perry, May 30 2013
a(n) counts walks (closed) on the graph G(1-vertex; 1-loop, 1-loop, 2-loop, 2-loop, 3-loop, 3-loop, ...). - David Neil McGrath, Jan 01 2015
From Tom Copeland, Dec 03 2015: (Start)
For n > 0, a(n) are the traces of the even powers of the adjacency matrix M of the simple Lie algebra B_3, tr(M^(2n)) where M = Matrix(row 1; row 2; row 3) = Matrix[0,1,0; 1,0,2; 0,1,0], same as the traces of Matrix[0,2,0; 1,0,1; 0,1,0] (cf. Damianou). The traces of the odd powers vanish.
The characteristic polynomial of M equals determinant(x*I - M) = x^3 - 3x = A127672(3,x), so 1 - 3*x^2 = det(I - x M) = exp(-Sum_{n>=1} tr(M^n) x^n / n), implying Sum_{n>=1} a(n+1) x^(2n) / (2n) = -log(1 - 3*x^2), giving a logarithmic generating function for the aerated sequence, excluding a(0) and a(1).
a(n+1) = tr(M^(2n)), where tr(M^n) = 3^(n/2) + (-1)^n * 3^(n/2) = 2^n*(cos(Pi/6)^n + cos(5*Pi/6)^n) = n-th power sum of the eigenvalues of M = n-th power sum of the zeros of the characteristic polynomial.
The relation det(I - x M) = exp(-Sum_{n>=1} tr(M^n) x^n / n) = Sum_{n>=0} P_n(-tr(M), -tr(M^2), ..., -tr(M^n)) x^n/n! = exp(P.(-tr(M), -tr(M^2), ...)x), where P_n(x(1), ..., x(n)) are the partition polynomials of A036039 implies that with x(2n) = -tr(M^(2n)) = -a(n+1) for n > 0 and x(n) = 0 otherwise, the partition polynomials evaluate to zero except for P_2(x(1), x(2)) = P_2(0,-6) = -6.
Because of the inverse relation between the partition polynomials of A036039 and the Faber polynomials F_k(b1,b2,...,bk) of A263916, F_k(0,-3,0,0,...) = tr(M^k) gives aerated a(n), excluding n=0,1. E.g., F_2(0,-3) = -2(-3) = 6, F_4(0,-3,0,0) = 2 (-3)^2 = 18, and F_6(0,-3,0,0,0,0) = -2(-3)^3 = 54. (Cf. A265185.)
(End)
Number of permutations of length n > 0 avoiding the partially ordered pattern (POP) {1>2, 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 the largest. - Sergey Kitaev, Dec 08 2020
For n > 0, a(n) is the number of 3-colorings of the grid graph P_2 X P_(n-1). More generally, for q > 1, the number of q-colorings of the grid graph P_2 X P_n is given by q*(q - 1)*((q - 1)*(q - 2) + 1)^(n - 1). - Sela Fried, Sep 25 2023
For n > 1, a(n) is the largest solution to the equation phi(x) = a(n-1). - M. Farrokhi D. G., Oct 25 2023
Number of dotted compositions of degree n. - Diego Arcis, Feb 01 2024

Examples

			There are a(3)=18 compositions of 3 into 2 kinds of parts. Here p:s stands for "part p of sort s":
01:  [ 1:0  1:0  1:0  ]
02:  [ 1:0  1:0  1:1  ]
03:  [ 1:0  1:1  1:0  ]
04:  [ 1:0  1:1  1:1  ]
05:  [ 1:0  2:0  ]
06:  [ 1:0  2:1  ]
07:  [ 1:1  1:0  1:0  ]
08:  [ 1:1  1:0  1:1  ]
09:  [ 1:1  1:1  1:0  ]
10:  [ 1:1  1:1  1:1  ]
11:  [ 1:1  2:0  ]
12:  [ 1:1  2:1  ]
13:  [ 2:0  1:0  ]
14:  [ 2:0  1:1  ]
15:  [ 2:1  1:0  ]
16:  [ 2:1  1:1  ]
17:  [ 3:0  ]
18:  [ 3:1  ]
- _Joerg Arndt_, Apr 28 2013
G.f. = 1 + 2*x + 6*x^2 + 18*x^3 + 54*x^4 + 162*x^5 + 486*x^6 + 1458*x^7 + ...
		

References

  • Richard P. Stanley, Enumerative combinatorics, Vol. 1, Cambridge University Press, Cambridge, 1997, pp. 96-100.

Crossrefs

First differences of 3^n (A000244). Other self-convolved sequences: A000108, A007460, A007461, A007462, A007463, A007464, A061922.
Apart from initial term, same as A008776.

Programs

  • Haskell
    a025192 0 = 1
    a025192 n = 2 * 3 ^ (n -1)
    a025192_list = 1 : iterate (* 3) 2  -- Reinhard Zumkeller, Nov 27 2012
  • Maple
    A025192 := proc(n): if n=0 then 1 else 2*3^(n-1) fi: end: seq(A025192(n),n=0..26);
  • Mathematica
    Join[{1},2*3^(Range[30]-1)]  (* Harvey P. Dale, Mar 22 2011 *)
  • PARI
    a(n)=max(1,2*3^(n-1)) \\ Charles R Greathouse IV, Jul 25 2011
    
  • PARI
    Vec((1-x)/(1-3*x) + O(x^100)) \\ Altug Alkan, Dec 05 2015
    
  • Python
    [1]+[2*3**(n-1) for n in range(1,30)] # David Nacin, Mar 04 2012
    

Formula

G.f.: (1-x)/(1-3*x).
E.g.f.: (2*exp(3*x) + exp(0))/3. - Paul Barry, Apr 20 2003
a(n) = phi(3^n) = A000010(A000244(n)). - Labos Elemer, Apr 14 2003
a(0) = 1, a(n) = Sum_{k=0..n-1} (a(k) + a(n-k-1)). - Benoit Cloitre, Jun 24 2003
a(n) = A002326((3^n-1)/2). - Vladimir Shevelev, May 26 2008
a(1) = 2, a(n) = 3*a(n-1). - Vincenzo Librandi, Jan 01 2011
a(n) = lcm(a(n-1), Sum_{k=1..n-1} a(k)) for n >= 3. - David W. Wilson, Sep 27 2011
a(n) = ((2*n-1)*a(n-1) + (3*n-6)*a(n-2))/(n-1); a(0)=1, a(1)=2. - Sergei N. Gladkovskii, Jul 16 2012
From Sergei N. Gladkovskii, Jul 17 2012: (Start)
For the e.g.f. E(x) = (2/3)*exp(3*x) + exp(0)/3 we have
E(x) = 2*G(0)/3 where G(k) = 1 + k!/(3*(9*x)^k - 3*(9*x)^(2*k+1)/((9*x)^(k+1) + (k+1)!/G(k+1))); (continued fraction, 3rd kind, 3-step).
E(x) = 1+2*x/(G(0)-3*x) where G(k) = 3*x + 1 + k - 3*x*(k+1)/G(k+1); (continued fraction, Euler's 1st kind, 1-step). (End)
a(n) = A114283(0,0). - Reinhard Zumkeller, Nov 27 2012
G.f.: 1 + ((1/2)/G(0) - 1)/x where G(k) = 1 - 2^k/(2 - 4*x/(2*x - 2^k/G(k+1) )); (recursively defined continued fraction). - Sergei N. Gladkovskii, Dec 22 2012
G.f.: 1 + x*W(0), where W(k) = 1 + 1/(1 - x*(2*k+3)/(x*(2*k+4) + 1/W(k+1))); (continued fraction). - Sergei N. Gladkovskii, Aug 28 2013
G.f.: 1 / (1 - 2*x / (1 - x)). - Michael Somos, Apr 03 2014
Construct the power matrix T(n,j) = [A(n)^*j]*[S(n)^*(j-1)] where A(n)=(2,2,2,...) and S(n)=(0,1,0,0,...). (* is convolution operation.) Then a(n) = Sum_{j=1..n} T(n,j). - David Neil McGrath, Jan 01 2015
G.f.: 1 + 2*x/(1 + 2*x)*( 1 + 5*x/(1 + 5*x)*( 1 + 8*x/(1 + 8*x)*( 1 + 11*x/(1 + 11*x)*( 1 + .... - Peter Bala, May 27 2017
Sum_{n>=0} 1/a(n) = 7/4. - Bernard Schott, Oct 02 2021
From Amiram Eldar, May 08 2023: (Start)
Sum_{n>=0} (-1)^n/a(n) = 5/8.
Product_{n>=1} (1 - 1/a(n)) = A132019. (End)

Extensions

Additional comments from Barry E. Williams, May 27 2000
a(22) corrected by T. D. Noe, Feb 08 2008
Maple programs simplified by Johannes W. Meijer, Jun 02 2011

A026150 a(0) = a(1) = 1; a(n+2) = 2*a(n+1) + 2*a(n).

Original entry on oeis.org

1, 1, 4, 10, 28, 76, 208, 568, 1552, 4240, 11584, 31648, 86464, 236224, 645376, 1763200, 4817152, 13160704, 35955712, 98232832, 268377088, 733219840, 2003193856, 5472827392, 14952042496, 40849739776
Offset: 0

Views

Author

Keywords

Comments

a(n+1)/A002605(n) converges to sqrt(3). - Mario Catalani (mario.catalani(AT)unito.it), Apr 22 2003
a(n+1)/a(n) converges to 1 + sqrt(3) = 2.732050807568877293.... - Philippe Deléham, Jul 03 2005
Binomial transform of expansion of cosh(sqrt(3)x) (A000244 with interpolated zeros); inverse binomial transform of A001075. - Philippe Deléham, Jul 04 2005
The same sequence may be obtained by the following process. Starting a priori with the fraction 1/1, the numerators of fractions built according to the rule: add top and bottom to get the new bottom, add top and 3 times the bottom to get the new top. The limit of the sequence of fractions is sqrt(3). - Cino Hilliard, Sep 25 2005
Inverse binomial transform of A001075: (1, 2, 7, 26, 97, 362, ...). - Gary W. Adamson, Nov 23 2007
Starting (1, 4, 10, 28, 76, ...), the sequence is the binomial transform of [1, 3, 3, 9, 9, 27, 27, 81, 81, ...], and inverse binomial transform of A001834: (1, 5, 19, 71, 265, ...). - Gary W. Adamson, Nov 30 2007
[1, 3; 1, 1]^n * [1,0] = [a(n), A002605(n)]. - Gary W. Adamson, Mar 21 2008
(1 + sqrt(3))^n = a(n) + A002605(n)*(sqrt(3)). - Gary W. Adamson, Mar 21 2008
Equals right border of triangle A143908. Also, starting (1, 4, 10, 28, ...) = row sums of triangle A143908 and INVERT transform of (1, 3, 3, 3, ...). - Gary W. Adamson, Sep 06 2008
a(n) is the number of compositions of n when there are 1 type of 1 and 3 types of other natural numbers. - Milan Janjic, Aug 13 2010
An elephant sequence, see A175655. For the central square four A[5] vectors, with decimal values 85, 277, 337 and 340, lead to this sequence (without the first leading 1). For the corner squares these vectors lead to the companion sequence A002605 (without the leading 0). - Johannes W. Meijer, Aug 15 2010
Pisano period lengths: 1, 1, 1, 1, 24, 1, 48, 1, 3, 24, 10, 1, 12, 48, 24, 1,144, 3,180, 24, ... - R. J. Mathar, Aug 10 2012
(1 + sqrt(3))^n = a(n) + A002605(n)*sqrt(3), for n >= 0; integers in the real quadratic number field Q(sqrt(3)). - Wolfdieter Lang, Feb 10 2018
a(n) is also the number of solutions for cyclic three-dimensional stable matching instances with master preference lists of size n (Escamocher and O'Sullivan 2018). - Guillaume Escamocher, Jun 15 2018
Starting from a(1), first differences of A005665. - Ivan N. Ianakiev, Nov 22 2019
Number of 3-permutations of n elements avoiding the patterns 231, 312. See Bonichon and Sun. - Michel Marcus, Aug 19 2022

Examples

			G.f. = 1 + x + 4*x^2 + 10*x^3 + 28*x^4 + 76*x^5 + 208*x^6 + 568*x^7 + ...
		

References

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

Crossrefs

First differences of A002605.
The following sequences (and others) belong to the same family: A001333, A000129, A026150, A002605, A046717, A015518, A084057, A063727, A002533, A002532, A083098, A083099, A083100, A015519.

Programs

  • Haskell
    a026150 n = a026150_list !! n
    a026150_list = 1 : 1 : map (* 2) (zipWith (+) a026150_list (tail
    a026150_list))
    -- Reinhard Zumkeller, Oct 15 2011
    
  • Magma
    [n le 2 select 1 else 2*Self(n-1) + 2*Self(n-2): n in [1..30]]; // G. C. Greubel, Jan 07 2018
  • Maple
    with(combstruct):ZL0:=S=Prod(Sequence(Prod(a, Sequence(b))), a):ZL1:=Prod(begin_blockP, Z, end_blockP):ZL2:=Prod(begin_blockLR, Z, Sequence(Prod(mu_length, Z), card>=1), end_blockLR): ZL3:=Prod(begin_blockRL, Sequence(Prod(mu_length, Z), card>=1), Z, end_blockRL):Q:=subs([a=Union(ZL2,ZL2,ZL2), b=ZL1], ZL0), begin_blockP=Epsilon, end_blockP=Epsilon, begin_blockLR=Epsilon, end_blockLR=Epsilon, begin_blockRL=Epsilon, end_blockRL=Epsilon, mu_length=Epsilon:temp15:=draw([S, {Q}, unlabelled], size=15):seq(count([S, {Q}, unlabelled], size=n)/3, n=2..27); # Zerinvary Lajos, Mar 08 2008
  • Mathematica
    Expand[Table[((1 + Sqrt[3])^n + (1 - Sqrt[3])^n)/(2), {n, 0, 30}]] (* Artur Jasinski, Dec 10 2006 *)
    LinearRecurrence[{2, 2}, {1, 1}, 30] (* T. D. Noe, Mar 25 2011 *)
    Round@Table[LucasL[n, Sqrt[2]] 2^(n/2 - 1), {n, 0, 20}] (* Vladimir Reshetnikov, Oct 15 2016 *)
  • Maxima
    a(n) := if n<=1 then 1 else 2*a(n-1)+2*a(n-2);
    makelist(a(n),n,0,20); /* Emanuele Munarini, Apr 14 2017 */
    
  • PARI
    {a(n) = if( n<0, 0, real((1 + quadgen(12))^n))};
    
  • Sage
    from sage.combinat.sloane_functions import recur_gen2; it = recur_gen2(1,1,2,2); [next(it) for i in range(30)] # Zerinvary Lajos, Jun 25 2008
    
  • Sage
    [lucas_number2(n,2,-2)/2 for n in range(0, 26)] # Zerinvary Lajos, Apr 30 2009
    

Formula

a(n) = (1/2)*((1 + sqrt(3))^n + (1 - sqrt(3))^n). - Benoit Cloitre, Oct 28 2002
G.f.: (1 - x)/(1 - 2*x - 2*x^2).
a(n) = a(n-1) + A083337(n-1). A083337(n)/a(n) converges to sqrt(3). - Mario Catalani (mario.catalani(AT)unito.it), Apr 29 2003
From Paul Barry, May 15 2003: (Start)
a(n) = Sum_{k=0..floor(n/2)} C(n, 2k)*3^k;
E.g.f.: exp(x)*cosh(sqrt(3)x). (End)
a(n) = Sum_{k=0..n} A098158(n,k)*3^(n - k). - Philippe Deléham, Dec 26 2007
a(n) = upper left and lower right terms of [1, 1; 3, 1]^n. (1 + sqrt(3))^n = a(n) + A083337(n)/(sqrt(3)). - Gary W. Adamson, Mar 12 2008
a(n) = A080040(n)/2. - Philippe Deléham, Nov 19 2008
If p[1] = 1, and 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) = det A. - Milan Janjic, Apr 29 2010
a(n) = 2 * A052945(n-1). - Vladimir Joseph Stephan Orlovsky, Mar 24 2011
a(n) = round((1 + sqrt(3))^n/2) for n > 0. - Bruno Berselli, Feb 04 2013
G.f.: G(0)/2, where G(k)= 1 + 1/(1 - x*(3*k - 1)/(x*(3*k + 2) - 1/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, May 25 2013
a(n) = (-sqrt(2)*i)^n*T(n,sqrt(2)*i/2), with i = sqrt(-1) and the Chebyshev T-polynomials (A053120). - Wolfdieter Lang, Feb 10 2018

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

Original entry on oeis.org

1, 3, 8, 22, 60, 164, 448, 1224, 3344, 9136, 24960, 68192, 186304, 508992, 1390592, 3799168, 10379520, 28357376, 77473792, 211662336, 578272256, 1579869184, 4316282880, 11792304128, 32217174016, 88018956288, 240472260608, 656982433792, 1794909388800, 4903783645184, 13397386067968
Offset: 0

Views

Author

Keywords

Comments

Number of words of length n without adjacent 0's from the alphabet {0,1,2}. For example, a(2) counts 01,02,10,11,12,20,21,22. - Antonio G. Astudillo (afg_astudillo(AT)hotmail.com), Jun 12 2001
Individually, both this sequence and A002605 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 [Can someone clarify what is meant by the obscure second phrase, "Mutually..."? - M. F. Hasler, Aug 06 2018]
Add a loop at two vertices of the graph C_3=K_3. a(n) counts walks of length n+1 between these vertices. - Paul Barry, Oct 15 2004
Prefaced with a 1 as (1 + x + 3x^2 + 8x^3 + 22x^4 + ...) = 1 / (1 - x - 2x^2 - 3x^3 - 5x^4 - 8x^5 - 13x^6 - 21x^7 - ...). - Gary W. Adamson, Jul 28 2009
Equals row 2 of the array in A180165, and the INVERTi transform of A125145. - Gary W. Adamson, Aug 14 2010
Pisano period lengths: 1, 1, 3, 1, 24, 3, 48, 1, 9, 24, 10, 3, 12, 48, 24, 1, 144, 9, 180, 24, .... - R. J. Mathar, Aug 10 2012
Also the number of independent vertex sets and vertex covers in the n-centipede graph. - Eric W. Weisstein, Sep 21 2017
From Gus Wiseman, May 19 2020: (Start)
Conjecture: Also the number of length n + 1 sequences that cover an initial interval of positive integers and whose non-adjacent parts are weakly decreasing. For example, (3,2,3,1,2) has non-adjacent pairs (3,3), (3,1), (3,2), (2,1), (2,2), (3,2), all of which are weakly decreasing, so is counted under a(11). The a(1) = 1 through a(3) = 8 sequences are:
(1) (11) (111)
(12) (121)
(21) (211)
(212)
(221)
(231)
(312)
(321)
The case of compositions is A333148, or A333150 for strict compositions, or A333193 for strictly decreasing parts. A version for ordered set partitions is A332872. Standard composition numbers of these compositions are A334966. Unimodal normal sequences are A227038. See also: A001045, A001523, A032020, A100471, A100881, A115981, A329398, A332836, A332872.
(End)
Number of 2-compositions of n+1 restricted to parts 1 and 2 (and allowed zeros); see Hopkins & Ouvry reference. - Brian Hopkins, Aug 16 2020
The number of ternary strings of length n not containing 00. Complement of A186244. - R. J. Mathar, Feb 13 2022

References

  • S. J. Cyvin and I. Gutman, Kekulé structures in benzenoid hydrocarbons, Lecture Notes in Chemistry, No. 46, Springer, New York, 1988 (see p. 73).

Crossrefs

Cf. A155020 (same sequence with term 1 prepended).
Cf. A002605.

Programs

  • Haskell
    a028859 n = a028859_list !! n
    a028859_list =
       1 : 3 : map (* 2) (zipWith (+) a028859_list (tail a028859_list))
    -- Reinhard Zumkeller, Oct 15 2011
    
  • Maple
    a[0]:=1:a[1]:=3:for n from 2 to 24 do a[n]:=2*a[n-1]+2*a[n-2] od: seq(a[n],n=0..24); # Emeric Deutsch
  • Mathematica
    a[n_]:=(MatrixPower[{{1,3},{1,1}},n].{{2},{1}})[[2,1]]; Table[a[n],{n,0,40}] (* Vladimir Joseph Stephan Orlovsky, Feb 20 2010 *)
    Table[2^(n - 1) Hypergeometric2F1[(1 - n)/2, -n/2, -n, -2], {n, 20}] (* Eric W. Weisstein, Jun 14 2017 *)
    LinearRecurrence[{2, 2}, {1, 3}, 20] (* Eric W. Weisstein, Jun 14 2017 *)
  • PARI
    a(n)=([1,3;1,1]^n*[2;1])[2,1] \\ Charles R Greathouse IV, Mar 27 2012
    
  • PARI
    A028859(n)=([1,1]*[2,2;1,0]^n)[1] \\ M. F. Hasler, Aug 06 2018

Formula

a(n) = a(n-1) + A052945(n) = A002605(n) + A002605(n-1).
G.f.: -(x+1)/(2*x^2+2*x-1).
a(n) = [(1+sqrt(3))^(n+2)-(1-sqrt(3))^(n+2)]/(4*sqrt(3)). - Emeric Deutsch, Feb 01 2005
If p[i]=fibonacci(i+1) and if A is the 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, May 08 2010
a(n) = 3^n - A186244(n). - Toby Gottfried, Mar 07 2013
E.g.f.: exp(x)*(cosh(sqrt(3)*x) + 2*sinh(sqrt(3)*x)/sqrt(3)). - Stefano Spezia, Mar 02 2024

Extensions

Definition completed by M. F. Hasler, Aug 06 2018

A184686 T(n,k)=Number of (n+1)X(k+1) binary arrays with every 2X2 subblock singular.

Original entry on oeis.org

10, 28, 28, 76, 128, 76, 208, 544, 544, 208, 568, 2384, 3360, 2384, 568, 1552, 10384, 21968, 21968, 10384, 1552, 4240, 45392, 140816, 221968, 140816, 45392, 4240, 11584, 198352, 909520, 2171152, 2171152, 909520, 198352, 11584, 31648, 867152, 5858896
Offset: 1

Views

Author

R. H. Hardin Jan 19 2011

Keywords

Comments

Table starts
....10.......28.........76..........208............568.............1552
....28......128........544.........2384..........10384............45392
....76......544.......3360........21968.........140816...........909520
...208.....2384......21968.......221968........2171152.........21547024
...568....10384.....140816......2171152.......31817360........476660624
..1552....45392.....909520.....21547024......476660624......10876933264
..4240...198352....5858896....212829840.....7079094288.....245133874960
.11584...867152...37779664...2107074576...105530924944....5556396815504
.31648..3791056..243525712..20846869136..1570852959248..125663816659728
.86464.16575056.1569965008.206331811088.23397537190544.2845061488472976

Examples

			Some solutions for 4X3
..0..1..1....1..0..0....0..0..1....0..0..0....1..0..0....0..0..1....0..1..1
..0..0..0....0..0..1....1..0..1....1..0..0....0..0..1....1..0..1....0..0..0
..1..0..0....0..0..0....1..0..1....0..0..0....0..0..0....0..0..0....0..0..0
..0..0..0....0..0..0....0..0..1....0..1..1....0..1..0....1..1..0....1..0..1
		

Crossrefs

Column 1 is A026150(n+2)=2*A052945(n+1)

A077846 Expansion of g.f. 1/(1 - 3*x + 2*x^3).

Original entry on oeis.org

1, 3, 9, 25, 69, 189, 517, 1413, 3861, 10549, 28821, 78741, 215125, 587733, 1605717, 4386901, 11985237, 32744277, 89459029, 244406613, 667731285, 1824275797, 4984014165, 13616579925, 37201188181, 101635536213, 277673448789, 758617970005, 2072582837589, 5662401615189
Offset: 0

Views

Author

N. J. A. Sloane, Nov 17 2002

Keywords

Comments

Number of (s(0), s(1), ..., s(n+2)) such that 0 < s(i) < 6 and |s(i) - s(i-1)| <= 1 for i = 1..n+2, s(0) = 1, s(n+2) = 3. - Herbert Kociemba, Jun 17 2004
A Whitney transform of 2^n (see Benoit Cloitre formula and A004070). The Whitney transform maps the sequence with g.f. g(x) to that with g.f. (1/(1-x))g(x(1+x)). - Paul Barry, Feb 16 2005

Crossrefs

First differences are in A002605.

Programs

  • Mathematica
    CoefficientList[Series[1 / (1 - 3 x + 2 x^3), {x, 0, 40}], x] (* Vincenzo Librandi, Jun 19 2013 *)
    LinearRecurrence[{3,0,-2},{1,3,9},40] (* Harvey P. Dale, Apr 27 2014 *)
  • PARI
    a(n)=sum(i=0,n,sum(j=0,n,2^j*binomial(j,i-j)))
    
  • PARI
    Vec(1/(1-3*x+2*x^3) + O(x^100)) \\ Altug Alkan, Mar 24 2016

Formula

a(n) = 3*a(n-1) - 2*a(n-3) = 2*A057960(n) - 1 = round(2*A028859(n)/sqrt(3) - 1/3) = Sum_{i} b(n, i), where b(n, 0) = b(n, 6) = 0, b(0, 3) = 1, b(0, i) = 0 if i <> 3 and b(n+1, i) = b(n, i-1) + b(n, i) + b(n, i+1) if 0 < i < 6 (i.e., the number of three-choice paths along a corridor width 5, starting from the middle). - Henry Bottomley, Mar 06 2003
Binomial transform of A068911. a(n) = (1+sqrt(3))^n*(2+sqrt(3))/3 + (1-sqrt(3))^n*(2-sqrt(3))/3 - 1/3. - Paul Barry, Feb 17 2004
a(0)=1; for n >= 1, a(n) = ceiling((1+sqrt(3))*a(n-1)). - Benoit Cloitre, Jun 19 2004
a(n) = Sum_{i=0..n} Sum_{j=0..n} 2^j*binomial(j, i-j). - Benoit Cloitre, Oct 23 2004
a(n) = 2*(a(n-1) + a(n-2)) + 1, n > 1. - Gary Detlefs, Jun 20 2010
a(n) = (2*A052945(n+1) - 1)/3. - R. J. Mathar, Mar 31 2011
a(n) = floor((1+sqrt(3))^(n+2)/6). - Bruno Berselli, Feb 05 2013
a(n) = (-2 + (1-sqrt(3))^(n+2) + (1+sqrt(3))^(n+2))/6. - Alexander R. Povolotsky, Feb 13 2016
E.g.f.: exp(x)*(4*cosh(sqrt(3)*x) + 2*sqrt(3)*sinh(sqrt(3)*x) - 1)/3. - Stefano Spezia, Mar 02 2024

Extensions

Name changed by Arkadiusz Wesolowski, Dec 06 2011

A054120 Triangular array T(n,k): start with T(n,0)=T(n,n)=1 for n >= 0; recursively, draw vertical lines through T(n-1,k-1) if present and T(n-1,k) if present; then T(n,k) is the sum of T(i,j) that lie on or between the lines and not below T(n,k).

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 1, 6, 6, 1, 1, 9, 18, 9, 1, 1, 12, 39, 39, 12, 1, 1, 15, 69, 114, 69, 15, 1, 1, 18, 108, 261, 261, 108, 18, 1, 1, 21, 156, 507, 750, 507, 156, 21, 1, 1, 24, 213, 879, 1779, 1779, 879, 213, 24, 1, 1, 27, 279, 1404, 3672, 5058
Offset: 0

Views

Author

Keywords

Comments

Conjecture: T(n,k) = T(n-1,k-1) + 2*T(n-2,k-1) + T(n-1,k) (except for T(0,0) = 1 and T(2,1) = 3 and assuming that T(n,k) = 0 for elements outside the triangular array). - Gerald McGarvey, Sep 20 2007
Conjecture: T(n,k) = A081577(n,k) - A081577(n-2,k-1). (A081577 is Pascal-(1,2,1) array). - Gerald McGarvey, Sep 20 2007
From Russell Jay Hendel, Jun 02 2015: (Start)
We prove the 1st McGarvey conjecture, (A) T(n,k)=T(n-1,k-1)+2*T(n-2,k-1)+T(n-1,k), with McGarvey's added modifications that n >= 3 and that T(n,k)=0 for n<0, k<0, and k>n. We make explicit that the rows and columns of the triangle start at 0 and furthermore, that both diagonals are at 45 degrees to the perpendicular (in both directions). Note that we use letters (A), (B), (C) to indicate equations.
We indicate the set of numbers corresponding to the half-line starting at T(n,k) with(B) L(n,k)={T(n,k), T(n-2,k-1), T(n-4,k-2),T(n-6,k-3),...}. There is no loss of generality in extending this line upwards indefinitely since most of the numbers lying on a half-ray are 0 anyway. If S_1, S_2, S_3 are sets, then the notation SUM(S_1,S_2, S_3) will indicate the sum of all elements in S_1, S_2 and S_3.
Using two applications of (B) we have the identity (C) L(n,k)={T(n,k)} UNION L(n-2,k-1). The definition of T(n,k) is given by (D) T(n,k)=SUM(L(n-1,k-1),L(n-2,k-1),L(n-1,k)). Combining (D) with (C), we immediately have (E), T(n,k)=T(n-1,k-1)+T(n-2,k-1)+T(n-1,k)+SUM(L(n-3,k-2), L(n-4,k-2), L(n-3,k-1)). By another application of (D), we have (F), T(n-2,k-1)=SUM(L(n-3,k-2),L(n-4,k-2),L(n-3,k-1)). Combining (E) and (F), we obtain (A) as required.
We illustrate the proof with n=5 and k=3. We first calculate T(3,2). By (D), we have (G) T(3,2)=6=SUM(L(2,1),L(1,1),L(2,2)) with L(2,1)={3,1,0,0,0,...}, L(1,1)={1,0,0,....} and L(2,2)={1,0,0,...}. By another application of (D), we have T(5,3)=39=(SUM(L(4,2),L(3,2),L(4,3)) where L(4,2)={18,3,1,...}={18} UNION L(2,1), L(3,2)={6,1,0,...}={6} UNION L(1,1), and L(4,3) = {1,0,0,...}={1} UNION L(2,2). Combining this last equation with (G), we have T(5,3)=39=18+6+1+SUM(L(2,1),L(1,1),L(2,2))=18+6+1+6=18+2*6+1 as required.
Note: There are two parts to the definition of the triangle:(i) T(n,0)=1, and ii) equation (D). Since (D) does not apply to T(0,0), (A) does not hold there. Since (D) applied to T(2,1) refers back to T(0,0), (A) does not hold there either. This explains the McGarvey requirement that n>=3. (End)
Consider the array with g.f. (1-u*v)/(1-u-v-2*u*v). The triangle appears to be that symmetric array read by antidiagonals. - R. J. Mathar, Jan 26 2022

Examples

			Rows:
1;
1,1;
1,3,1;
1,6,6,1;
1,9,18,9,1;
1,12,39,39,12,1;
		

Crossrefs

Row sums: A052945. A054122 (diagonal), A052392 (subdiagonal).

A005666 Minimal number of moves for the cyclic variant of the Towers of Hanoi for 3 pegs and n disks, with the final peg two steps away.

Original entry on oeis.org

0, 2, 7, 21, 59, 163, 447, 1223, 3343, 9135, 24959, 68191, 186303, 508991, 1390591, 3799167, 10379519, 28357375, 77473791, 211662335, 578272255, 1579869183, 4316282879, 11792304127, 32217174015, 88018956287, 240472260607, 656982433791, 1794909388799
Offset: 0

Views

Author

Keywords

Comments

Original name was: Tower of Hanoi with 3 pegs and cyclic moves only (counterclockwise). - Jianing Song, Nov 01 2024

References

  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 1990, p. 18.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A005665, A052945 (first differences).
Cf. A338024, A292764, A338089 (4 pegs).

Programs

  • Magma
    [Floor((1/(4*Sqrt(3)))*((1+Sqrt(3))^(n+2)-(1-Sqrt(3))^(n+2))-1): n in [0..30]]; // Vincenzo Librandi, Sep 03 2015
  • Mathematica
    CoefficientList[Series[z (2 + z)/(z - 1)/(2 z^2 + 2 z - 1), {z, 0, 22}], z] (* Michael De Vlieger, Sep 02 2015 *)
    LinearRecurrence[{3,0,-2},{0,2,7},30] (* Harvey P. Dale, Jul 28 2025 *)

Formula

a(n) = (1/(4*s3))*((1+s3)^(n+2)-(1-s3)^(n+2))-1 where s3 = sqrt(3).
a(n) = A028859(n) - 1.
G.f.: x*(2+x) / ( (x-1)*(2*x^2+2*x-1) ). - Simon Plouffe in his 1992 dissertation
From Paul Zimmermann, Feb 07 2018: (Start)
a(n) = 2*a(n-1)+2*a(n-2)+3 (same recurrence as A005665).
a(n) = 2*a(n-1)+c(n-1)+2 where c(n) = 2*a(n-1)+1 stands for A005665. (End)
E.g.f.: exp(x)*(3*cosh(sqrt(3)*x) + 2*sqrt(3)*sinh(sqrt(3)*x) - 3)/3. - Stefano Spezia, Apr 11 2025

Extensions

Name clarified by Paul Zimmermann, Feb 09 2018
New name based on the name of A338024, A292764, and A338089 by Jianing Song, Nov 01 2024

A105474 Triangle read by rows: T(n,k) is number of compositions of n into k parts when each odd part can be of two kinds.

Original entry on oeis.org

2, 1, 4, 2, 4, 8, 1, 9, 12, 16, 2, 8, 30, 32, 32, 1, 14, 37, 88, 80, 64, 2, 12, 66, 136, 240, 192, 128, 1, 19, 75, 257, 440, 624, 448, 256, 2, 16, 116, 352, 890, 1312, 1568, 1024, 512, 1, 24, 126, 564, 1401, 2844, 3696, 3840, 2304, 1024, 2, 20, 180, 720, 2370, 5004
Offset: 1

Views

Author

Emeric Deutsch, Apr 09 2005

Keywords

Examples

			T(4,2)=9 because we have (1,3),(1',3),(1,3'),(1',3'),(3,1),(3',1),(3,1'),(3',1') and (2,2).
Triangle begins:
2;
1,4;
2,4,8;
1,9,12,16;
2,8,30,32,32;
		

Crossrefs

Row sums yield A052945.

Programs

  • Maple
    G:=t*z*(2+z)/(1-2*t*z-z^2-t*z^2): Gser:=simplify(series(G,z=0,14)): for n from 1 to 12 do P[n]:=sort(coeff(Gser,z^n)) od: for n from 1 to 12 do seq(coeff(P[n],t^k),k=1..n) od; # yields sequence in triangular form

Formula

G.f.=tz(2+z)/(1-2tz-z^2-tz^2).

A125226 Array, read by antidiagonals, where A(1,1) = A(1,2) = A(2,1) = A(2,2) = 1, A(n,k) = 0 if n<1 or k<1, otherwise A(n,k) = A(n-2,k-2) + A(n-1,k-2) + A(n-2,k-1) + A(n-1,k-1).

Original entry on oeis.org

1, 1, 1, 0, 1, 0, 0, 2, 2, 0, 0, 1, 4, 1, 0, 0, 0, 4, 4, 0, 0, 0, 0, 3, 9, 3, 0, 0, 0, 0, 1, 11, 11, 1, 0, 0, 0, 0, 0, 8, 21, 8, 0, 0, 0, 0, 0, 0, 4, 27, 27, 4, 0, 0, 0, 0, 0, 0, 1, 23, 52, 23, 1, 0, 0, 0, 0, 0, 0, 0, 13, 67, 67, 13, 0, 0, 0, 0, 0, 0, 0, 0, 5, 62, 127, 62, 5, 0, 0, 0, 0, 0, 0, 0, 0, 1, 41
Offset: 1

Views

Author

Gerald McGarvey, Jan 14 2007

Keywords

Comments

It appears that the main diagonal (1,1,4,9,21,...) is A051292 (Whitney number of level n of the lattice of the ideals of the crown of size 2 n). It appears that if b(n) = the n-th antidiagonal sum - A108014(n-1) then the sequence b(n) is the sequence 1,0,-2,0,1,0 repeated. n-th row sum = A052945(n).

Examples

			Array begins:
  1 1 0 0 0 0 0 ...
  1 1 2 1 0 0 0 ...
  0 2 4 4 3 1 0 ...
  ...
		

Crossrefs

Programs

  • PARI
    A=matrix(22,22);A[1,1]=1;A[1,2]=1;A[2,1]=1;A[2,2]=1;A[3,2]=2;A[2,3]=2;A[2,4]=1;A[4,2]=1; for(n=3,22,for(k=3,22,A[n,k]=A[n-2,k-2]+A[n-1,k-2]+A[n-2,k-1]+A[n-1,k-1])); for(n=1,22,for(i=1,n,print1(A[n-i+1,i],", ")))

Formula

A(1,1) = A(1,2) = A(2,1) = A(2,2) = 1, A(n,k) = 0 if n<1 or k<1, otherwise A(n,k) = A(n-2,k-2) + A(n-1,k-2) + A(n-2,k-1) + A(n-1,k-1)
Showing 1-9 of 9 results.