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.

A190958 a(n) = 2*a(n-1) - 10*a(n-2), with a(0) = 0, a(1) = 1.

Original entry on oeis.org

0, 1, 2, -6, -32, -4, 312, 664, -1792, -10224, -2528, 97184, 219648, -532544, -3261568, -1197696, 30220288, 72417536, -157367808, -1038910976, -504143872, 9380822016, 23803082752, -46202054656, -330434936832, -198849327104, 2906650714112, 7801794699264
Offset: 0

Views

Author

Keywords

Comments

For the difference equation a(n) = c*a(n-1) - d*a(n-2), with a(0) = 0, a(1) = 1, the solution is a(n) = d^((n-1)/2) * ChebyshevU(n-1, c/(2*sqrt(d))) and has the alternate form a(n) = ( ((c + sqrt(c^2 - 4*d))/2)^n - ((c - sqrt(c^2 - 4*d))/2)^n )/sqrt(c^2 - 4*d). In the case c^2 = 4*d then the solution is a(n) = n*d^((n-1)/2). The generating function is x/(1 - c*x + d^2) and the exponential generating function takes the form (2/sqrt(c^2 - 4*d))*exp(c*x/2)*sinh(sqrt(c^2 - 4*d)*x/2) for c^2 > 4*d, (2/sqrt(4*d - c^2))*exp(c*x/2)*sin(sqrt(4*d - c^2)*x/2) for 4*d > c^2, and x*exp(sqrt(d)*x) if c^2 = 4*d. - G. C. Greubel, Jun 10 2022

Crossrefs

Programs

  • Magma
    I:=[0,1]; [n le 2 select I[n] else 2*Self(n-1)-10*Self(n-2): n in [1..30]]; // Vincenzo Librandi, Sep 17 2011
    
  • Mathematica
    LinearRecurrence[{2,-10}, {0,1}, 50]
  • PARI
    a(n)=([0,1; -10,2]^n*[0;1])[1,1] \\ Charles R Greathouse IV, Apr 08 2016
    
  • SageMath
    [lucas_number1(n,2,10) for n in (0..50)] # G. C. Greubel, Jun 10 2022

Formula

G.f.: x / ( 1 - 2*x + 10*x^2 ). - R. J. Mathar, Jun 01 2011
E.g.f.: (1/3)*exp(x)*sin(3*x). - Franck Maminirina Ramaharo, Nov 13 2018
a(n) = 10^((n-1)/2) * ChebyshevU(n-1, 1/sqrt(10)). - G. C. Greubel, Jun 10 2022
a(n) = (1/3)*10^(n/2)*sin(n*arctan(3)) = Sum_{k=0..floor(n/2)} (-1)^k*3^(2*k)*binomial(n,2*k+1). - Gerry Martens, Oct 15 2022

A084120 a(n) = 6*a(n-1) - 3*a(n-2), a(0)=1, a(1)=3.

Original entry on oeis.org

1, 3, 15, 81, 441, 2403, 13095, 71361, 388881, 2119203, 11548575, 62933841, 342957321, 1868942403, 10184782455, 55501867521, 302456857761, 1648235544003, 8982042690735, 48947549512401, 266739169002201
Offset: 0

Views

Author

Paul Barry, May 13 2003

Keywords

Comments

Binomial transform of A084059.

Examples

			G.f. = 1 + 3*x + 15*x^2 + 81*x^3 + 441*x^4 + 2403*x^5 + 13095*x^6 + ...
		

Crossrefs

Programs

  • Magma
    [n le 2 select 3^(n-1) else 6*Self(n-1) -3*Self(n-2): n in [1..41]]; // G. C. Greubel, Oct 13 2022
  • Mathematica
    LinearRecurrence[{6,-3},{1,3},30] (* Harvey P. Dale, Feb 25 2014 *)
  • PARI
    {a(n) = if( n<0, 0, polsym(x^2 - 6*x + 3, n)[1+n] / 2)};
    
  • Sage
    [lucas_number2(n,6,3)/2 for n in range(0,27)] # Zerinvary Lajos, Jul 08 2008
    

Formula

a(n) = ((3+sqrt(6))^n + (3-sqrt(6))^n)/2.
G.f.: (1-3*x)/(1-6*x+3*x^2).
E.g.f.: exp(3*x)*cosh(sqrt(6)*x).
a(n) = 3^n * Sum_{k=0..floor(n/2)} C(n, 2*k)*(2/3)^k. - Paul Barry, Sep 10 2005
Lim_{n -> oo} a(n)/a(n-1) = (3 + sqrt(6)) = 5.445489742... - Gary W. Adamson, Mar 19 2008
a(n) = Sum_{k=0..n} A147720(n,k)*3^k. - Philippe Deléham, Nov 15 2008
G.f.: G(0)/2, where G(k)= 1 + 1/(1 - x*(2*k-3)/(x*(2*k-1) - 1/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, May 27 2013
a(n) = A138395(n) - 3*A138395(n-1). - R. J. Mathar, May 11 2022

A090018 a(n) = 6*a(n-1) + 3*a(n-2) for n > 2, a(0)=1, a(1)=6.

Original entry on oeis.org

1, 6, 39, 252, 1629, 10530, 68067, 439992, 2844153, 18384894, 118841823, 768205620, 4965759189, 32099171994, 207492309531, 1341251373168, 8669985167601, 56043665125110, 362271946253463, 2341762672896108, 15137391876137037, 97849639275510546, 632510011281474387
Offset: 0

Views

Author

Paul Barry, Nov 19 2003

Keywords

Comments

From Johannes W. Meijer, Aug 09 2010: (Start)
a(n) represents the number of n-move routes of a fairy chess piece starting in a given corner or side square on a 3 X 3 chessboard. This fairy chess piece behaves like a white queen on the eight side and corner squares but on the central square the queen explodes with fury and turns into a red queen, see A180032. The central square leads to A180028. (End)

Crossrefs

Sequences with g.f. of the form 1/(1 - 6*x - k*x^2): A106392 (k=-10), A027471 (k=-9), A006516 (k=-8), A081179 (k=-7), A030192 (k=-6), A003463 (k=-5), A084326 (k=-4), A138395 (k=-3), A154244 (k=-2), A001109 (k=-1), A000400 (k=0), A005668 (k=1), A135030 (k=2), this sequence (k=3), A135032 (k=4), A015551 (k=5), A057089 (k=6), A015552 (k=7), A189800 (k=8), A189801 (k=9), A190005 (k=10), A015553 (k=11).

Programs

  • Magma
    [n le 2 select 6^(n-1) else 6*Self(n-1)+3*Self(n-2): n in [1..30]]; // Vincenzo Librandi, Nov 15 2011
    
  • Maple
    a:= n-> (<<0|1>, <3|6>>^n. <<1,6>>)[1,1]:
    seq(a(n), n=0..30);  # Alois P. Heinz, Jan 17 2011
  • Mathematica
    Join[{a=1,b=6},Table[c=6*b+3*a;a=b;b=c,{n,100}]] (* Vladimir Joseph Stephan Orlovsky, Jan 16 2011 *)
    LinearRecurrence[{6,3}, {1,6}, 41] (* G. C. Greubel, Oct 10 2022 *)
  • PARI
    my(x='x+O('x^30)); Vec(1/(1-6*x-3*x^2)) \\ G. C. Greubel, Jan 24 2018
  • Sage
    [lucas_number1(n,6,-3) for n in range(1, 31)] # Zerinvary Lajos, Apr 24 2009
    

Formula

a(n) = (3+2*sqrt(3))^n*(sqrt(3)/4+1/2) + (1/2-sqrt(3)/4)*(3-2*sqrt(3))^n.
a(n) = (-i*sqrt(3))^n * ChebyshevU(n, isqrt(3)), i^2=-1.
From Johannes W. Meijer, Aug 09 2010: (Start)
G.f.: 1/(1 - 6*x - 3*x^2).
Limit_{k->oo} a(n+k)/a(k) = A141041(n) + A090018(n-1)*sqrt(12) for n >= 1.
Limit_{n->oo} A141041(n)/A090018(n-1) = sqrt(12). (End)
a(n) = Sum_{k=0..n} A099089(n,k)*3^k. - Philippe Deléham, Nov 21 2011
E.g.f.: exp(3*x)*(2*cosh(2*sqrt(3)*x) + sqrt(3)*sinh(2*sqrt(3)*x))/2. - Stefano Spezia, Apr 23 2025

Extensions

Typo in Mathematica program corrected by Vincenzo Librandi, Nov 15 2011

A123347 Number of words of length n over the alphabet {1,2,3,4,5} such that 1 is not followed by an odd letter.

Original entry on oeis.org

1, 5, 22, 98, 436, 1940, 8632, 38408, 170896, 760400, 3383392, 15054368, 66984256, 298045760, 1326151552, 5900697728, 26255094016, 116821771520, 519797274112, 2312832639488, 10290925106176, 45789365703680, 203739313027072, 906535983515648, 4033622560116736
Offset: 0

Views

Author

N. J. A. Sloane, Oct 10 2006

Keywords

Comments

Appears to be Kekulé numbers for certain benzenoids (see the Cyvin-Gutman book for details).

Examples

			a(2) = 22 because all 25 words of length 2 are included except 11, 13 and 15.
		

References

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

Crossrefs

Cf. A138395.

Programs

  • Magma
    I:=[1, 5]; [n le 2 select I[n] else 4*Self(n-1) + 2*Self(n-2): n in [1..30]]; // G. C. Greubel, Nov 29 2018
    
  • Maple
    seq(coeff(series((1+x)/(1-4*x-2*x^2),x,n+1), x, n), n = 0 .. 25); # Muniru A Asiru, Nov 27 2018
  • Mathematica
    LinearRecurrence[{4, 2}, {1, 5}, 30] (* Amiram Eldar, Nov 26 2018 *)
  • PARI
    Vec((1 + x)/(1 - 4*x - 2*x^2) + O(x^30)) \\ Andrew Howroyd, Nov 25 2018
    
  • Sage
    s=((1+x)/(1-4*x-2*x^2)).series(x, 50); s.coefficients(x, sparse=False) # G. C. Greubel, Nov 29 2018

Formula

From Klaus Brockhaus, Oct 03 2009: (Start)
Inverse binomial transform of A138395.
a(n) = ((2+sqrt(6))^(n+1) + (2-sqrt(6))^(n+1))/4.
a(n) = 4*a(n-1) + 2*a(n-2) for n > 1.
G.f.: (1 + x)/(1 - 4*x - 2*x^2).
(End)
a(n) = A090017(n+1)+A090017(n). - R. J. Mathar, Aug 04 2019

Extensions

Edited and new name by Armend Shabani and Andrew Howroyd, Nov 25 2018

A180032 Eight white queens and one red queen on a 3 X 3 chessboard. G.f.: (1+x)/(1-5*x-7*x^2).

Original entry on oeis.org

1, 6, 37, 227, 1394, 8559, 52553, 322678, 1981261, 12165051, 74694082, 458625767, 2815987409, 17290317414, 106163498933, 651849716563, 4002393075346, 24574913392671, 150891318490777, 926480986202582, 5688644160448349
Offset: 0

Views

Author

Johannes W. Meijer, Aug 09 2010

Keywords

Comments

The a(n) represent the number of n-move routes of a fairy chess piece starting in a given corner or side square (m = 1, 3, 7, 9; 2, 4, 6, 8) on a 3 X 3 chessboard. This fairy chess piece behaves like a white chess queen on the eight side and corner squares but on the central square the queen explodes with fury and turns into a red queen.
On a 3 X 3 chessboard there are 2^9 = 512 ways to explode with fury on the central square (we assume here that a red queen might behave like a white queen). The red queen is represented by the A[5] vector in the fifth row of the adjacency matrix A, see the Maple program. For the corner and side squares the 512 red queens lead to 17 red queen sequences, see the cross-references for the complete set.
The sequence above corresponds to 8 red queen vectors, i.e., A[5] vectors, with decimal values 239, 367, 431, 463, 487, 491, 493 and 494. The central square leads for these vectors to A152240.
This sequence belongs to a family of sequences with g.f. (1+x)/(1 - 5*x - k*x^2). The members of this family that are red queen sequences are A180030 (k=8), A180032 (k=7; this sequence), A000400 (k=6), A180033 (k=5), A126501 (k=4), A180035 (k=3), A180037 (k=2) A015449 (k=1) and A003948 (k=0). Other members of this family are A030221 (k=-1), A109114 (k=-3), A020989 (k=-4), A166060 (k=-6).
Inverse binomial transform of A054413.

Crossrefs

Cf. A180028 (Central square).
Cf. Red queen sequences corner and side squares [decimal value A[5]]: A090018 [511], A135030 [255], A180030 [495], A005668 [127], A180032 [239], A000400 [63], A180033 [47], A001109 [31], A126501 [15], A154244 [23], A180035 [7], A138395 [19], A180037 [3], A084326 [17], A015449 [1], A003463 [16], A003948 [0].

Programs

  • Magma
    I:=[1,6]; [n le 2 select I[n] else 5*Self(n-1)+7*Self(n-2): n in [1..30]]; // Vincenzo Librandi, Nov 15 2011
  • Maple
    with(LinearAlgebra): nmax:=20; m:=1; A[5]:= [1,1,1,1,0,1,1,1,0]: A:=Matrix([[0,1,1,1,1,0,1,0,1], [1,0,1,1,1,1,0,1,0], [1,1,0,0,1,1,1,0,1], [1,1,0,0,1,1,1,1,0], A[5], [0,1,1,1,1,0,0,1,1], [1,0,1,1,1,0,0,1,1], [0,1,0,1,1,1,1,0,1], [1,0,1,0,1,1,1,1,0]]): for n from 0 to nmax do B(n):=A^n: a(n):= add(B(n)[m,k],k=1..9): od: seq(a(n), n=0..nmax);
  • Mathematica
    LinearRecurrence[{5,7},{1,6},40] (* Vincenzo Librandi, Nov 15 2011 *)
    CoefficientList[Series[(1+x)/(1-5x-7x^2),{x,0,30}],x] (* Harvey P. Dale, Apr 04 2024 *)

Formula

G.f.: (1+x)/(1 - 5*x - 7*x^2).
a(n) = 5*a(n-1) + 7*a(n-2) with a(0) = 1 and a(1) = 6.
a(n) = ((7+9*A)*A^(-n-1) + (7+9*B)*B^(-n-1))/53 with A = (-5+sqrt(53))/14 and B = (-5-sqrt(53))/14.

A342133 Square array T(n,k), n>=0, k>=0, read by antidiagonals, where column k is the expansion of g.f. 1/(1 - 2*k*x + k*x^2).

Original entry on oeis.org

1, 1, 0, 1, 2, 0, 1, 4, 3, 0, 1, 6, 14, 4, 0, 1, 8, 33, 48, 5, 0, 1, 10, 60, 180, 164, 6, 0, 1, 12, 95, 448, 981, 560, 7, 0, 1, 14, 138, 900, 3344, 5346, 1912, 8, 0, 1, 16, 189, 1584, 8525, 24960, 29133, 6528, 9, 0, 1, 18, 248, 2548, 18180, 80750, 186304, 158760, 22288, 10, 0
Offset: 0

Views

Author

Seiichi Manyama, Mar 01 2021

Keywords

Examples

			Square array begins:
  1, 1,   1,    1,     1,     1, ...
  0, 2,   4,    6,     8,    10, ...
  0, 3,  14,   33,    60,    95, ...
  0, 4,  48,  180,   448,   900, ...
  0, 5, 164,  981,  3344,  8525, ...
  0, 6, 560, 5346, 24960, 80750, ...
		

Crossrefs

Columns 0..5 give A000007, A000027(n+1), A007070, A138395, A099156(n+1), A190987(n+1).
Rows 0..2 give A000012, A005843, A033991.
Main diagonal gives (-1) * A109520(n+1).

Programs

  • Maple
    T:= (n, k)-> (<<0|1>, <-k|2*k>>^(n+1))[1, 2]:
    seq(seq(T(n, d-n), n=0..d), d=0..12);  # Alois P. Heinz, Mar 01 2021
  • Mathematica
    T[n_, k_] := Sum[If[k == j == 0, 1, (2*k)^j] * (-2)^(j - n) * Binomial[j, n - j], {j, 0, n}]; Table[T[k, n - k], {n, 0, 10}, {k, 0, n}] // Flatten (* Amiram Eldar, Apr 27 2021 *)
  • PARI
    T(n, k) = sum(j=0, n\2, (2*k)^(n-j)*(-2)^(-j)*binomial(n-j, j));
    
  • PARI
    T(n, k) = sum(j=0, n, (2*k)^j*(-2)^(j-n)*binomial(j, n-j));
    
  • PARI
    T(n, k) = round(sqrt(k)^n*polchebyshev(n, 2, sqrt(k)));

Formula

T(0,k) = 1, T(1,k) = 2*k and T(n,k) = k*(2*T(n-1,k) - T(n-2,k)) for n > 1.
T(n,k) = Sum_{j=0..floor(n/2)} (2*k)^(n-j) * (-1/2)^j * binomial(n-j,j) = Sum_{j=0..n} (2*k)^j * (-1/2)^(n-j) * binomial(j,n-j).
T(n,k) = sqrt(k)^n * U(n, sqrt(k)) where U(n, x) is a Chebyshev polynomial of the second kind.

A158869 Number of ways of filling a 2 X 3 X 2n hole with 1 X 2 X 2 bricks.

Original entry on oeis.org

1, 5, 27, 147, 801, 4365, 23787, 129627, 706401, 3849525, 20977947, 114319107, 622980801, 3394927485, 18500622507, 100818952587, 549411848001, 2994014230245, 16315849837467, 88913056334067
Offset: 0

Views

Author

Martin Griffiths, Mar 28 2009

Keywords

Comments

Note that it is not possible to fill a 2 X 3 X (2*n-1) hole using 1 X 2 X 2 bricks.
a(n+1) of the Jacobsthal sequence A001045 gives the number of ways of filling a 2 X 2 X n hole with 1 X 2 X 2 bricks.
Will the pattern of rightmost digits (1,5,7,7) be continued? - Bill McEachen, May 20 2009
The answer to the question in a previous comment is: the linear recurrence proves that the pattern 1, 5, 7, 7 of the least significant digits will continue. - R. J. Mathar, Jun 20 2010
a(n) is the number of compositions of n when there are 5 types of 1 and 2 types of other natural numbers. - Milan Janjic, Aug 13 2010

Programs

  • Mathematica
    Simplify[Table[ 1/6 * ((3 + Sqrt[6])^(n + 1) + (3 - Sqrt[6])^(n + 1)), {n, 0, 19}]]
    Table[3^n * Hypergeometric2F1[ -((n + 1)/2), -(n/2), 1/2, 2/3], {n, 0, 19}]
    LinearRecurrence[{6,-3},{1,5},30] (* Harvey P. Dale, May 28 2015 *)
  • Sage
    def A158869(n): return 3^n*lucas_number2(n+1, 2, 1/3)/2
    [A158869(n) for n in (0..19)]  # Peter Luschny, May 06 2013

Formula

a(0)=1, a(1)=5 and a(n) = 6*a(n-1) - 3*a(n-2) for n > 1.
a(n) = (3^n) * 2F1[-((n + 1)/2), -(n/2); 1/2; 2/3], using Gauss' hypergeometric function.
From Martin Griffiths, Apr 02 2009: (Start)
G.f.: A(x) = (1-x)/(1-6x+3x^2).
a(n) = (1/6)*((3+sqrt(6))^(n+1) + (3-sqrt(6))^(n+1)). (End)
From R. J. Mathar, Mar 29 2009: (Start)
G.f.: -(-1+x)/(1-6*x+3*x^2).
a(n) = A138395(n+1) - A138395(n). (End)
G.f.: G(0)/(6*x) -1/(3*x), where G(k) = 1 + 1/(1 - x*(2*k-3)/(x*(2*k-1) - 1/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, Jun 13 2013

Extensions

Edited by Charles R Greathouse IV, Mar 08 2011

A201972 Triangle T(n,k), read by rows, given by (2,1/2,-1/2,0,0,0,0,0,0,0,...) DELTA (2,-1/2,1/2,0,0,0,0,0,0,0,...) where DELTA is the operator defined in A084938.

Original entry on oeis.org

1, 2, 2, 5, 8, 3, 12, 28, 20, 4, 29, 88, 94, 40, 5, 70, 262, 372, 244, 70, 6, 169, 752, 1333, 1184, 539, 112, 7, 408, 2104, 4472, 5016, 3144, 1064, 168, 8, 985, 5776, 14316, 19408, 15526, 7344, 1932, 240, 9
Offset: 0

Views

Author

Philippe Deléham, Dec 07 2011

Keywords

Comments

Diagonal sums: A201967(n), row sums: A000302(n) (powers of 4).

Examples

			Triangle begins:
    1;
    2,   2;
    5,   8,    3;
   12,  28,   20,    4;
   29,  88,   94,   40,   5;
   70, 262,  372,  244,  70,   6;
  169, 752, 1333, 1184, 539, 112, 7;
		

Crossrefs

Programs

  • Maple
    T:= proc(n, k) option remember;
          if k=0 and n=0 then 1
        elif k<0 or  k>n  then 0
        else 2*T(n-1,k) + 2*T(n-1,k-1) + T(n-2,k) - T(n-2,k-2)
          fi; end:
    seq(seq(T(n, k), k=0..n), n=0..10); # G. C. Greubel, Feb 17 2020
  • Mathematica
    With[{m = 8}, CoefficientList[CoefficientList[Series[1/(1-2*(y+1)*x+(y+1)*(y-1)*x^2), {x, 0 , m}, {y, 0, m}], x], y]] // Flatten (* Georg Fischer, Feb 17 2020 *)
  • PARI
    T(n,k) = if(nMichel Marcus, Feb 17 2020
    
  • Sage
    @CachedFunction
    def T(n, k):
        if (k<0 or k>n): return 0
        elif (k==0 and n==0): return 1
        else: return 2*T(n-1,k) + 2*T(n-1,k-1) + T(n-2,k) - T(n-2,k-2)
    [[T(n, k) for k in (0..n)] for n in (0..10)] # G. C. Greubel, Feb 17 2020

Formula

G.f.: 1/(1-2*(y+1)*x+(y+1)*(y-1)*x^2).
Sum_{k=0..n} T(n,k)*x^k = A000007(n), A000129(n+1), A000302(n), A138395(n), A057084(n) for x = -1, 0, 1, 2, 3, respectively.
Sum_{k=0..n} T(n,k)*x^(n-k) = A000027(n), A000302(n), A090018(n), A057091(n) for x = 0, 1, 2, 3, respectively.
T(n,k) = 2*T(n-1,k) + 2*T(n-1,k-1) + T(n-2,k) - T(n-2,k-2) with T(0,0) = 1, T(n,k) = 0 if k < 0 or if n < k.

Extensions

a(40) corrected by Georg Fischer, Feb 17 2020

A109112 a(n) = 6*a(n-1) - 3*a(n-2), a(0)=2, a(1)=13.

Original entry on oeis.org

2, 13, 72, 393, 2142, 11673, 63612, 346653, 1889082, 10294533, 56099952, 305716113, 1665996822, 9078832593, 49475005092, 269613532773, 1469256181362, 8006696489853, 43632410395032, 237774372900633, 1295749006218702
Offset: 0

Views

Author

Emeric Deutsch, Jun 19 2005

Keywords

Comments

Kekulé numbers for certain benzenoids.

References

  • S. J. Cyvin and I. Gutman, Kekulé structures in benzenoid hydrocarbons, Lecture Notes in Chemistry, No. 46, Springer, New York, 1988 (p. 302, P_{14}).

Programs

  • Maple
    a[0]:=2:a[1]:=13: for n from 2 to 24 do a[n]:=6*a[n-1]-3*a[n-2] od: seq(a[n],n=0..24);
  • Mathematica
    LinearRecurrence[{6,-3},{2,13},30] (* Harvey P. Dale, Dec 15 2014 *)

Formula

a(n) = (1/(2*sqrt(6)))*((2*sqrt(6) + 7)*(3 + sqrt(6))^n + (2*sqrt(6) - 7)*(3 - sqrt(6))^n).
G.f.: (2+z)/(1 - 6z + 3z^2).
a(n) = 2*A138395(n) + A138395(n-1). - R. J. Mathar, Jul 22 2022
Showing 1-9 of 9 results.