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 10 results.

A006012 a(0) = 1, a(1) = 2, a(n) = 4*a(n-1) - 2*a(n-2), n >= 2.

Original entry on oeis.org

1, 2, 6, 20, 68, 232, 792, 2704, 9232, 31520, 107616, 367424, 1254464, 4283008, 14623104, 49926400, 170459392, 581984768, 1987020288, 6784111616, 23162405888, 79081400320, 270000789504, 921840357376, 3147359850496
Offset: 0

Views

Author

Keywords

Comments

Number of (s(0), s(1), ..., s(2n)) such that 0 < s(i) < 8 and |s(i) - s(i-1)| = 1 for i = 1,2,...,2n, s(0) = 4, s(2n) = 4. - Herbert Kociemba, Jun 12 2004
a(n-1) counts permutations pi on [n] for which the pairs {i, pi(i)} with i < pi(i), considered as closed intervals [i+1,pi(i)], do not overlap; equivalently, for each i in [n] there is at most one j <= i with pi(j) > i. Counting these permutations by the position of n yields the recurrence relation. - David Callan, Sep 02 2003
a(n) is the sum of (n+1)-th row terms of triangle A140070. - Gary W. Adamson, May 04 2008
The binomial transform is in A083878, the Catalan transform in A084868. - R. J. Mathar, Nov 23 2008
Equals row sums of triangle A152252. - Gary W. Adamson, Nov 30 2008
Counts all paths of length (2*n), n >= 0, starting at the initial node on the path graph P_7, see the second Maple program. - Johannes W. Meijer, May 29 2010
From L. Edson Jeffery, Apr 04 2011: (Start)
Let U_1 and U_3 be the unit-primitive matrices (see [Jeffery])
U_1 = U_(8,1) = [(0,1,0,0); (1,0,1,0); (0,1,0,1); (0,0,2,0)] and
U_3 = U_(8,3) = [(0,0,0,1); (0,0,2,0); (0,2,0,1); (2,0,2,0)]. Then a(n) = (1/4) * Trace(U_1^(2*n)) = (1/2^(n+2)) * Trace(U_3^(2*n)). (See also A084130, A001333.) (End)
Pisano period lengths: 1, 1, 8, 1, 24, 8, 6, 1, 24, 24, 120, 8, 168, 6, 24, 1, 8, 24, 360, 24, ... - R. J. Mathar, Aug 10 2012
a(n) is the first superdiagonal of array A228405. - Richard R. Forberg, Sep 02 2013
Conjecture: With offset 1, a(n) is the number of permutations on [n] with no subsequence abcd such that (i) bc are adjacent in position and (ii) max(a,c) < min(b,d). For example, the 4 permutations of [4] not counted by a(4) are 1324, 1423, 2314, 2413. - David Callan, Aug 27 2014
The conjecture of David Callan above is correct - with offset 1, a(n) is the number of permutations on [n] with no subsequence abcd such that (i) bc are adjacent in position and (ii) max(a,c) < min(b,d). - Yonah Biers-Ariel, Jun 27 2017
From Gary W. Adamson, Jul 22 2016: (Start)
A production matrix for the sequence is M =
1, 1, 0, 0, 0, 0, ...
1, 0, 3, 0, 0, 0, ...
1, 0, 0, 3, 0, 0, ...
1, 0, 0, 0, 3, 0, ...
1, 0, 0, 0, 0, 3, ...
...
Take powers of M, extracting the upper left terms; getting the sequence starting: (1, 1, 2, 6, 20, 68, ...). (End)
From Gary W. Adamson, Jul 24 2016: (Start)
The sequence is the INVERT transform of the powers of 3 prefaced with a "1": (1, 1, 3, 9, 27, ...) and is N=3 in an infinite of analogous sequences starting:
N=1 (A000079): 1, 2, 4, 8, 16, 32, ...
N=2 (A001519): 1, 2, 5, 13, 34, 89, ...
N=3 (A006012): 1, 2, 6, 20, 68, 232, ...
N=4 (A052961): 1, 2, 7, 29, 124, 533, ...
N=5 (A154626): 1, 2, 8, 40, 208, 1088, ...
N=6: 1, 2, 9, 53, 326, 2017, ...
... (End)
Number of permutations of length n > 0 avoiding the partially ordered pattern (POP) {1>2, 1>3, 4>2, 4>3} of length 4. That is, number of length n permutations having no subsequences of length 4 in which the first and fourth elements are larger than the second and third elements. - Sergey Kitaev, Dec 08 2020
a(n-1) is the number of permutations of [n] that can be obtained by placing n points on an X-shape (two crossing lines with slopes 1 and -1), labeling them 1,2,...,n by increasing y-coordinate, and then reading the labels by increasing x-coordinate. - Sergi Elizalde, Sep 27 2021
Consider a stack of pancakes of height n, where the only allowed operation is reversing the top portion of the stack. First, perform a series of reversals of decreasing sizes, followed by a series of reversals of increasing sizes. The number of distinct permutations of the initial stack that can be reached through these operations is a(n). - Thomas Baruchel, May 12 2025
Number of permutations of [n] that are correctly sorted after performing one left-to-right pass and one right-to-left pass of the cocktail sort. - Thomas Baruchel, May 16 2025

References

  • D. H. Greene and D. E. Knuth, Mathematics for the Analysis of Algorithms. Birkhäuser, Boston, 3rd edition, 1990, p. 86.
  • D. E. Knuth, The Art of Computer Programming. Addison-Wesley, Reading, MA, Vol. 3, Sect 5.4.8 Answer to Exer. 8.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Haskell
    a006012 n = a006012_list !! n
    a006012_list = 1 : 2 : zipWith (-) (tail $ map (* 4) a006012_list)
    (map (* 2) a006012_list)
    -- Reinhard Zumkeller, Oct 03 2011
    
  • Magma
    [n le 2 select n else 4*Self(n-1)- 2*Self(n-2): n in [1..30]]; // Vincenzo Librandi, Apr 05 2011
    
  • Maple
    A006012:=-(-1+2*z)/(1-4*z+2*z**2); # Simon Plouffe in his 1992 dissertation
    with(GraphTheory): G:=PathGraph(7): A:= AdjacencyMatrix(G): nmax:=24; n2:=2*nmax: for n from 0 to n2 do B(n):=A^n; a(n):=add(B(n)[1,k],k=1..7); od: seq(a(2*n),n=0..nmax); # Johannes W. Meijer, May 29 2010
  • Mathematica
    LinearRecurrence[{4,-2},{1,2},50] (* or *) With[{c=Sqrt[2]}, Simplify[ Table[((2+c)^n+(3+2c)(2-c)^n)/(2(2+c)),{n,50}]]] (* Harvey P. Dale, Aug 29 2011 *)
  • PARI
    {a(n) = real(((2 + quadgen(8))^n))}; /* Michael Somos, Feb 12 2004 */
    
  • PARI
    {a(n) = if( n<0, 2^n, 1) * polsym(x^2 - 4*x + 2, abs(n))[abs(n)+1] / 2}; /* Michael Somos, Feb 12 2004 */
    
  • PARI
    Vec((1-2*x)/(1-4*x+2*x^2) + O(x^100)) \\ Altug Alkan, Dec 05 2015
    
  • Python
    l = [1, 2]
    for n in range(2, 101): l.append(4 * l[n - 1] - 2 * l[n - 2])
    print(l)  # Indranil Ghosh, Jul 02 2017
    
  • SageMath
    A006012=BinaryRecurrenceSequence(4,-2,1,2)
    print([A006012(n) for n in range(41)]) # G. C. Greubel, Aug 27 2025

Formula

G.f.: (1-2*x)/(1 - 4*x + 2*x^2).
a(n) = 2*A007052(n-1) = A056236(n)/2.
Limit_{n -> oo} a(n)/a(n-1) = 2 + sqrt(2). - Zak Seidov, Oct 12 2002
From Paul Barry, May 08 2003: (Start)
Binomial transform of A001333.
E.g.f.: exp(2*x)*cosh(sqrt(2)*x). (End)
a(n) = Sum_{k=0..floor(n/2)} binomial(n, 2k)*2^(n-k) = Sum_{k=0..n} binomial(n, k)*2^(n-k/2)(1+(-1)^k)/2. - Paul Barry, Nov 22 2003 (typo corrected by Manfred Scheucher, Jan 17 2023)
a(n) = ((2+sqrt(2))^n + (2-sqrt(2))^n)/2.
a(n) = Sum_{k=0..n} 2^k*A098158(n,k). - Philippe Deléham, Dec 04 2006
a(n) = A007070(n) - 2*A007070(n-1). - R. J. Mathar, Nov 16 2007
a(n) = Sum_{k=0..n} A147703(n,k). - Philippe Deléham, Nov 29 2008
a(n) = Sum_{k=0..n} A201730(n,k). - Philippe Deléham, Dec 05 2011
G.f.: G(0) where G(k)= 1 + 2*x/((1-2*x) - 2*x*(1-2*x)/(2*x + (1-2*x)*2/G(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Dec 10 2012
G.f.: G(0)*(1-2*x)/2, where G(k) = 1 + 1/(1 - 2*x*(4*k+2-x)/( 2*x*(4*k+4-x) + 1/G(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Jan 27 2014
a(-n) = a(n) / 2^n for all n in Z. - Michael Somos, Aug 24 2014
a(n) = A265185(n) / 4, connecting this sequence to the simple Lie algebra B_4. - Tom Copeland, Dec 04 2015
From G. C. Greubel, Aug 27 2025: (Start)
a(n) = 2^((n-2)/2)*( (n+1 mod 2)*A002203(n) + 2*sqrt(2)*(n mod 2)*A000129(n) ).
a(n) = 2^(n/2)*ChebyshevT(n, sqrt(2)). (End)

A056236 a(n) = (2 + sqrt(2))^n + (2 - sqrt(2))^n.

Original entry on oeis.org

2, 4, 12, 40, 136, 464, 1584, 5408, 18464, 63040, 215232, 734848, 2508928, 8566016, 29246208, 99852800, 340918784, 1163969536, 3974040576, 13568223232, 46324811776, 158162800640, 540001579008, 1843680714752, 6294719700992
Offset: 0

Views

Author

Henry Bottomley, Aug 11 2000

Keywords

Comments

First differences give A060995. - Jeremy Gardiner, Aug 11 2013
Binomial transform of A002203 [Bhadouria].
The binomial transform of this sequence is 2, 6, 22, 90, 386, .. = 2*A083878(n). - R. J. Mathar, Nov 10 2013

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{4,-2},{2,4},30] (* Harvey P. Dale, Jan 18 2013 *)
  • PARI
    a(n) = 2*real((2+quadgen(8))^n);
    
  • Sage
    [lucas_number2(n,4,2) for n in range(37)] # Zerinvary Lajos, Jun 25 2008

Formula

a(n) = 4*a(n-1) - 2*a(n-2).
a(n) = a(n-2) - a(n-1) + 2*A020727(n-1).
a(n) = 2*A006012(n) = 4*A007052(n-1).
For n>2, a(n) = floor((2+sqrt(2))*a(n-1)).
G.f.: 2*(1-2*x)/(1-4*x+2*x^2).
From L. Edson Jeffery, Apr 08 2011: (Start)
a(n) = 2^(2*n)*(cos(Pi/8)^(2*n) + cos(3*Pi/8)^(2*n)).
a(n) = 3*a(n-1) + Sum_{k=1..(n-2)} a(k), for n>1, with a(0)=2, a(1)=4. (End)
a(n) = [x^n] ( (1 + 4*x + sqrt(1 + 8*x + 8*x^2))/2 )^n for n >= 1. - Peter Bala, Jun 23 2015

Extensions

More terms from James Sellers, Aug 25 2000

A164299 a(n) = ((1+4*sqrt(2))*(3+sqrt(2))^n + (1-4*sqrt(2))*(3-sqrt(2))^n)/2.

Original entry on oeis.org

1, 11, 59, 277, 1249, 5555, 24587, 108637, 479713, 2117819, 9348923, 41268805, 182170369, 804140579, 3549650891, 15668921293, 69165971521, 305313380075, 1347718479803, 5949117218293, 26260673951137, 115920223178771
Offset: 0

Views

Author

Al Hakanson (hawkuu(AT)gmail.com), Aug 12 2009

Keywords

Comments

Binomial transform of A164298. Third binomial transform of A164587. Inverse binomial transform of A164300.
This sequence is part of a class of sequences defined by the recurrence a(n,m) = 2*(m+1)*a(n-1,m) - ((m+1)^2 - 2)*a(n-2,m) with a(0) = 1 and a(1) = m+9. The generating function is Sum_{n>=0} a(n,m)*x^n = (1 - (m-7)*x)/(1 - 2*(m+1)*x + ((m+1)^2 - 2)*x^2) and has a series expansion in terms of Pell-Lucas numbers defined by a(n, m) = (1/2)*Sum_{k=0..n} binomial(n,k)*m^(n-k)*(5*Q(k) + 4*Q(k-1)). - G. C. Greubel, Mar 12 2021

Crossrefs

Sequences in the class a(n, m): A164298 (m=1), this sequence (m=2), A164300 (m=3), A164301 (m=4), A164598 (m=5), A164599 (m=6), A081185 (m=7), A164600 (m=8).

Programs

  • Magma
    Z:=PolynomialRing(Integers()); N:=NumberField(x^2-2); S:=[ ((1+4*r)*(3+r)^n+(1-4*r)*(3-r)^n)/2: n in [0..21] ]; [ Integers()!S[j]: j in [1..#S] ]; // Klaus Brockhaus, Aug 17 2009
    
  • Mathematica
    LinearRecurrence[{6,-7}, {1,11}, 50] (* or *) CoefficientList[Series[(1 + 5*x)/(1 - 6*x + 7*x^2), {x,0,50}], x] (* G. C. Greubel, Sep 12 2017 *)
  • PARI
    my(x='x+O('x^50)); Vec((1+5*x)/(1-6*x+7*x^2)) \\ G. C. Greubel, Sep 12 2017
    
  • Sage
    [( (1+5*x)/(1-6*x+7*x^2) ).series(x,n+1).list()[n] for n in (0..30)] # G. C. Greubel, Mar 12 2021

Formula

a(n) = 6*a(n-1) - 7*a(n-2) for n > 1; a(0) = 1, a(1) = 11.
G.f.: (1+5*x)/(1-6*x+7*x^2).
E.g.f.: (cosh(sqrt(2)*x) + 4*sqrt(2)*sinh(sqrt(2)*x))*exp(3*x). - G. C. Greubel, Sep 12 2017
From G. C. Greubel, Mar 12 2021: (Start)
a(n) = 2*A083878(n) + 8*A081179(n).
a(n) = (1/2)*Sum_{k=0..n} binomial(n,k)*2^(n-k)*(5*Q(k) + 4*Q(k-1)), where Q(n) = Pell-Lucas(n) = A002203(n). (End)

Extensions

Edited and extended beyond a(5) by Klaus Brockhaus, Aug 17 2009

A208345 Triangle of coefficients of polynomials v(n,x) jointly generated with A208344; see the Formula section.

Original entry on oeis.org

1, 0, 3, 0, 1, 7, 0, 1, 3, 17, 0, 1, 3, 10, 41, 0, 1, 3, 11, 30, 99, 0, 1, 3, 12, 35, 87, 239, 0, 1, 3, 13, 40, 108, 245, 577, 0, 1, 3, 14, 45, 130, 322, 676, 1393, 0, 1, 3, 15, 50, 153, 406, 938, 1836, 3363, 0, 1, 3, 16, 55, 177, 497, 1236, 2682, 4925, 8119, 0, 1
Offset: 1

Views

Author

Clark Kimberling, Feb 25 2012

Keywords

Comments

Row sums, u(n,1): (1,2,5,13,...), odd-indexed Fibonacci numbers.
Row sums, v(n,1): (1,3,8,21,...), even-indexed Fibonacci numbers.
As triangle T(n,k) with 0<=k<=n, it is (0, 1/3, 2/3, 0, 0, 0, 0, 0, 0, 0, ...) DELTA (3, -2/3, -1/3, 0, 0, 0, 0, 0, 0, 0, ...) where DELTA is the operator defined in A084938. - Philippe Deléham, Feb 26 2012

Examples

			First five rows:
  1
  0   3
  0   1   7
  0   1   3   17
  0   1   3   10   41
First five polynomials u(n,x):
  1, 3*x, x + 7*x^2, x + 3*x^2 + 17*x^3, x + 3*x^2 + 10*x^3 + 41*x^4.
		

Crossrefs

Programs

  • Mathematica
    u[1, x_] := 1; v[1, x_] := 1; z = 13;
    u[n_, x_] := u[n - 1, x] + x*v[n - 1, x];
    v[n_, x_] := x*u[n - 1, x] + 2 x*v[n - 1, x];
    Table[Expand[u[n, x]], {n, 1, z/2}]
    Table[Expand[v[n, x]], {n, 1, z/2}]
    cu = Table[CoefficientList[u[n, x], x], {n, 1, z}];
    TableForm[cu]
    Flatten[%]    (* A208344 *)
    Table[Expand[v[n, x]], {n, 1, z}]
    cv = Table[CoefficientList[v[n, x], x], {n, 1, z}];
    TableForm[cv]
    Flatten[%]    (* A208345 *)
    Table[u[n, x] /. x -> 1, {n, 1, z}]
    Table[v[n, x] /. x -> 1, {n, 1, z}]

Formula

u(n,x) = u(n-1,x) + x*v(n-1,x),
v(n,x) = x*u(n-1,x) + 2x*v(n-1,x),
where u(1,x)=1, v(1,x)=1.
From Philippe Deléham, Feb 26 2012: (Start)
As triangle T(n,k), 0<=k<=n:
T(n,k) = T(n-1,k) + 2*T(n-1,k-1) + T(n-2,k-2) - 2*T(n-2,k-1) with T(0,0) = 1, T(1,0) = 0, T(1,1) = 3, T(n,k) = 0 if k<0 or if k>n.
G.f.: (1+(y-1)*x)/(1-(1+2*y)*x+y*(2-y)*x^2).
Sum_{k=0..n} T(n,k)*x^k = A152167(n), A000007(n), A001906(n+1), A003948(n) for x = -1, 0, 1, 2 respectively.
Sum_{k=0..n} T(n,k)*x^(n-k) = A078057(n), A001906(n+1), A000244(n), A081567(n), A083878(n), A165310(n) for x = 0, 1, 2, 3, 4, 5 respectively. (End)

A083880 a(0)=1, a(1)=5, a(n) = 10*a(n-1) - 23*a(n-2), n >= 2.

Original entry on oeis.org

1, 5, 27, 155, 929, 5725, 35883, 227155, 1446241, 9237845, 59114907, 378678635, 2427143489, 15561826285, 99793962603, 640017621475, 4104915074881, 26328745454885, 168874407826587, 1083182932803515, 6947717948023649
Offset: 0

Views

Author

Paul Barry, May 08 2003

Keywords

Comments

Binomial transform of A083879.
Inverse binomial transform of A147957. 5th binomial transform of A077957. - Philippe Deléham, Nov 30 2008

Crossrefs

Programs

  • Magma
    [ n eq 1 select 1 else n eq 2 select 5 else 10*Self(n-1)-23*Self(n-2): n in [1..21] ]; // Klaus Brockhaus, Dec 16 2008
  • Mathematica
    LinearRecurrence[{10,-23},{1,5},30] (* Harvey P. Dale, May 14 2018 *)
  • PARI
    a(n)=if(n<0,0,polsym(23-10*x+x^2,n)[n+1]/2)
    

Formula

G.f.: (1-5x)/(1-10x+23x^2).
E.g.f.: exp(5x)cosh(x*sqrt(2)).
a(n) = ((5-sqrt(2))^n + (5+sqrt(2))^n)/2;
a(n) = Sum_{k=0..n} C(n, 2k)*5^(n-2k)*2^k.
a(n) = (Sum_{k=0..n} A098158(n,k)*5^(2k)*2^(n-k))/5^n. - Philippe Deléham, Nov 30 2008

Extensions

Typo in definition corrected by Klaus Brockhaus, Dec 16 2008

A083879 a(0)=1, a(1)=4, a(n) = 8*a(n-1) - 14*a(n-2), n >= 2.

Original entry on oeis.org

1, 4, 18, 88, 452, 2384, 12744, 68576, 370192, 2001472, 10829088, 58612096, 317289536, 1717746944, 9299922048, 50350919168, 272608444672, 1475954689024, 7991119286784, 43265588647936, 234249039168512, 1268274072276992
Offset: 0

Views

Author

Paul Barry, May 08 2003

Keywords

Comments

Binomial transform of A083878.
4th binomial transform of A077957. Inverse binomial transform of A083880. - Philippe Deléham, Nov 30 2008
From L. Edson Jeffery, Apr 26 2011: (Start)
Let G be the Gram matrix
G =
(4 1 0 1)
(1 4 1 0)
(0 1 4 -1)
(1 0 -1 4)
of A028997. Then a(n) = (1/4)*Trace(G^n). (End)

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{8,-14},{1,4},30] (* Harvey P. Dale, May 08 2013 *)

Formula

a(n) = 2^((n-2)/2)*(2*sqrt(2)-1)^n + 2^((n-2)/2)*(2*sqrt(2)+1)^n;
a(n) = Sum_{k=0..n} C(n, 2k)*5^(n-2k)2^k.
G.f.: (1-4x)/(1-8x+14x^2).
E.g.f.: exp(4x)cosh(x*sqrt(2)).
((4+sqrt(2))^n + (4-sqrt(2))^n)/2. Offset=0. a(3)=88. - Al Hakanson (hawkuu(AT)gmail.com), Oct 15 2008
a(n) = Sum_{k=0..n} A098158(n,k)*2^(3*k-n). - Philippe Deléham, Nov 30 2008

A084155 A Pell-related fourth-order recurrence.

Original entry on oeis.org

0, 1, 4, 19, 88, 401, 1804, 8051, 35760, 158401, 700564, 3095731, 13673224, 60375953, 266559388, 1176763859, 5194762080, 22931453953, 101225940772, 446836798675, 1972442421688, 8706804701201, 38433749994028
Offset: 0

Views

Author

Paul Barry, May 16 2003

Keywords

Comments

Binomial transform of A084154.

Crossrefs

Programs

  • GAP
    a:=[0,1,4,19];; for n in [5..25] do a[n]:=8*a[n-1]-18*a[n-2]+8*a[n-3]+7*a[n-4]; od; a; # Muniru A Asiru, Oct 18 2018
  • Magma
    I:=[0,1,4,19]; [n le 4 select I[n] else 8*Self(n-1) -18*Self(n-2) +8*Self(n-3) +7*Self(n-4): n in [1..40]]; // G. C. Greubel, Oct 17 2018
    
  • Maple
    seq(coeff(series(x*(1-4*x+5*x^2)/((1-2*x-x^2)*(1-6*x+7*x^2)),x,n+1), x, n), n = 0 .. 25); # Muniru A Asiru, Oct 18 2018
  • Mathematica
    LinearRecurrence[{8,-18,8,7},{0,1,4,19},30] (* Harvey P. Dale, Aug 16 2015 *)
  • PARI
    m=40; v=concat([0,1,4,19], vector(m-4)); for(n=5, m, v[n] = 8*v[n-1] -18*v[n-2] +8*v[n-3] +7*v[n-4]); v \\ G. C. Greubel, Oct 17 2018
    

Formula

a(n) = (A083878(n) - A001333(n))/2.
a(n) = 8*a(n-1) - 18*a(n-2) + 8*a(n-3) + 7*a(n-4), a(0)=0, a(1)=1, a(2)=4, a(3)=19.
a(n) = ((3+sqrt(2))^n +(3-sqrt(2))^n -(1+sqrt(2))^n -(1-sqrt(2))^n)/4.
G.f.: x*(1-4*x+5*x^2)/((1-2*x-x^2)*(1-6*x+7*x^2)).
E.g.f.: exp(2*x)*sinh(x)*cosh(sqrt(2)*x).

A161938 a(n) = ((3+sqrt(2))*(2+sqrt(2))^n + (3-sqrt(2))*(2-sqrt(2))^n)/2.

Original entry on oeis.org

3, 8, 26, 88, 300, 1024, 3496, 11936, 40752, 139136, 475040, 1621888, 5537472, 18906112, 64549504, 220385792, 752444160, 2569005056, 8771131904, 29946517504, 102243806208, 349082189824, 1191841146880, 4069200207872, 13893118537728, 47434073735168
Offset: 0

Views

Author

Al Hakanson (hawkuu(AT)gmail.com), Jun 22 2009, Jun 29 2009

Keywords

Comments

Second binomial transform of A162255.

Crossrefs

Programs

  • GAP
    a:=[3,8];; for n in [3..25] do a[n]:=4*a[n-1]-2*a[n-2]; od; a; # Muniru A Asiru, Sep 28 2018
  • Magma
    Z:=PolynomialRing(Integers()); N:=NumberField(x^2-2); S:=[ ((3+r)*(2+r)^n+(3-r)*(2-r)^n)/2: n in [0..23] ]; [ Integers()!S[j]: j in [1..#S] ]; // Klaus Brockhaus, Jul 01 2009
    
  • Magma
    I:=[3,8]; [n le 2 select I[n] else 4*Self(n-1) - 2*Self(n-2): n in [1..30]]; // G. C. Greubel, Sep 28 2018
    
  • Maple
    seq(coeff(series((3-4*x)/(1-4*x+2*x^2),x,n+1), x, n), n = 0..25); # Muniru A Asiru, Sep 28 2018
  • Mathematica
    CoefficientList[Series[(3-4*x)/(1-4*x+2*x^2), {x,0,50}], x] (* G. C. Greubel, Sep 28 2018 *)
  • PARI
    my(x='x+O('x^50)); Vec((3-4*x)/(1-4*x+2*x^2)) \\ G. C. Greubel, Sep 28 2018
    

Formula

a(n) = 4*a(n-1) - 2*a(n-2) for n>1; a(0) = 3; a(1) = 8.
G.f.: (3-4*x)/(1-4*x+2*x^2).
From G. C. Greubel, Sep 28 2018: (Start)
a(2*n) = 2^(n-1) * (Q(2*n +1) + 2*Q(2*n)), Q(m) = Pell-Lucas numbers = A002203(m).
a(2*n+1) = 2^(n-1) * (P(2*n+2) + 2*P(2*n+1)), P(m) = Pell numbers = A000129(m). (End)

Extensions

Edited and extended beyond a(5) by Klaus Brockhaus, Jul 01 2009

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

Original entry on oeis.org

1, 3, 10, 36, 137, 543, 2218, 9264, 39329, 168939, 731770, 3188364, 13948745, 61196775, 269007994, 1184076216, 5216618369, 22996827795, 101421591466, 447422614068, 1974197123657, 8712062181999, 38449506441994, 169702143024768, 749034931995041, 3306200447618043
Offset: 0

Views

Author

Paul Barry, Dec 17 2009

Keywords

Comments

3rd binomial transform of 1,0,1,0,2,0,4,0,8,0,...

Crossrefs

Cf. A083878.

Programs

  • Mathematica
    LinearRecurrence[{9,-25,21},{1,3,10},26] (* Stefano Spezia, May 11 2024 *)

Formula

G.f.: (1-6x+8x^2)/(1-9x+25x^2-21x^3) = -(4*x-1)*(2*x-1)/((3*x-1)*(7*x^2-6*x+1)).
a(n) = (3-sqrt(2))^n/4 + (3+sqrt(2))^n/4 + 3^n/2.
a(n) = (3^n+A083878(n))/2. - R. J. Mathar, Oct 08 2016
E.g.f.: exp(3*x)*cosh(x/sqrt(2))^2. - Stefano Spezia, May 11 2024

A147688 a(n) = ((6 + sqrt(8))^n + (6 - sqrt(8))^n)/2.

Original entry on oeis.org

1, 6, 44, 360, 3088, 26976, 237248, 2091648, 18456832, 162915840, 1438198784, 12696741888, 112091336704, 989587267584, 8736489783296, 77129433907200, 680931492954112, 6011553766047744, 53072563389857792, 468547255228956672
Offset: 0

Views

Author

Al Hakanson (hawkuu(AT)gmail.com), Nov 10 2008

Keywords

Programs

  • Magma
    Z:= PolynomialRing(Integers()); N:=NumberField(x^2-8); S:=[ ((6+r8)^n+(6-r8)^n)/2: n in [0..19] ]; [ Integers()!S[j]: j in [1..#S] ]; // Klaus Brockhaus, Nov 13 2008
  • Mathematica
    LinearRecurrence[{12,-28},{1,6},30]  (* Harvey P. Dale, Apr 23 2011 *)

Formula

From Philippe Deléham, Nov 13 2008: (Start)
a(n) = 12*a(n-1) - 28*a(n-2), a(0)=1, a(1)=6.
G.f.: (1-6x)/(1-12x+28x^2).
a(n) = (Sum_{k=0..n} A098158(n,k)*6^(2k)*8^(n-k))/6^n. (End)
a(n) = 2^n*A083878(n). - R. J. Mathar, Feb 04 2021

Extensions

Extended beyond a(6) by Klaus Brockhaus, Nov 13 2008
Showing 1-10 of 10 results.