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 11 results. Next

A052984 a(n) = 5*a(n-1) - 2*a(n-2) for n>1, with a(0) = 1, a(1) = 3.

Original entry on oeis.org

1, 3, 13, 59, 269, 1227, 5597, 25531, 116461, 531243, 2423293, 11053979, 50423309, 230008587, 1049196317, 4785964411, 21831429421, 99585218283, 454263232573, 2072145726299, 9452202166349, 43116719379147, 196679192563037, 897162524056891, 4092454235158381
Offset: 0

Views

Author

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

Keywords

Comments

a(n) = A020698(n) - 4*A020698(n-1) + 4*A020698(n-2) (n>=2). Kekulé numbers for certain benzenoids. - Emeric Deutsch, Jun 12 2005

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).
  • Stanley, Richard P. "Some Linear Recurrences Motivated by Stern’s Diatomic Array." The American Mathematical Monthly 127.2 (2020): 99-111.

Crossrefs

Programs

  • GAP
    a:=[1,3];; for n in [3..30] do a[n]:=5*a[n-1]-2*a[n-2]; od; a; # G. C. Greubel, Oct 23 2019
  • Magma
    R:=PowerSeriesRing(Integers(), 30); Coefficients(R!( (1-2*x)/(1-5*x+2*x^2) )); // G. C. Greubel, Feb 10 2019
    
  • Magma
    a:=[1,3]; [n le 2 select a[n] else 5*Self(n-1)-2*Self(n-2):n in [1..25]]; // Marius A. Burtea, Oct 23 2019
    
  • Maple
    spec:= [S,{S=Sequence(Union(Prod(Sequence(Union(Z,Z)),Union(Z,Z)),Z))}, unlabeled ]: seq(combstruct[count ](spec,size=n), n=0..20);
    a[0]:=1: a[1]:=3: for n from 2 to 25 do a[n]:=5*a[n-1]-2*a[n-2] od: seq(a[n],n=0..25); # Emeric Deutsch
  • Mathematica
    a[0]=1; a[1]=3; a[n_]:= a[n] = 5a[n-1]-2a[n-2]; Table[ a[n], {n, 0, 30}]
    LinearRecurrence[{5,-2},{1,3},30] (* Harvey P. Dale, Apr 08 2014 *)
    CoefficientList[Series[(1-2x)/(1-5x+2x^2), {x, 0, 30}], x] (* Vincenzo Librandi, Apr 09 2014 *)
  • PARI
    Vec((1-2*x)/(1-5*x+2*x^2)+O(x^30)) \\ Charles R Greathouse IV, Nov 20 2011
    
  • Sage
    def A052984_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P( (1-2*x)/(1-5*x+2*x^2) ).list()
    A052984_list(30) # G. C. Greubel, Feb 10 2019
    

Formula

a(n) = A005824(2n).
G.f.: (1-2*x)/(1-5*x+2*x^2).
a(n) = Sum_{alpha=RootOf(1-5*z+2*z^2)} (1 + 6*alpha)*alpha^(-1-n)/17.
a(n-1) = Sum_{k=0..n} A147703(n,k)*(-1)^k*2^(n-k), n>1. - Philippe Deléham, Nov 29 2008
a(n) = (a(n-1)^2 + 2^n)/a(n-2). - Irene Sermon, Oct 29 2013
a(n) = A107839(n) - 2*A107839(n-1). - R. J. Mathar, Feb 27 2019
E.g.f.: exp(5*x/2)*(sqrt(17)*cosh(sqrt(17)*x/2) + sinh(sqrt(17)*x/2))/sqrt(17). - Stefano Spezia, Jun 17 2025

Extensions

Edited by Robert G. Wilson v, Dec 29 2002

A079162 a(n) = 5*a(n-2) - 2*a(n-4), with initial terms 0,1,2,4.

Original entry on oeis.org

0, 1, 2, 4, 10, 18, 46, 82, 210, 374, 958, 1706, 4370, 7782, 19934, 35498, 90930, 161926, 414782, 738634, 1892050, 3369318, 8630686, 15369322, 39369330, 70107974, 179585278, 319801226, 819187730, 1458790182, 3736768094, 6654348458, 17045465010, 30354161926, 77753788862
Offset: 0

Views

Author

Robert G. Wilson v, Dec 29 2002

Keywords

Crossrefs

Programs

  • Mathematica
    a[0] = 0; a[1] = 1; a[n_] := a[n] = If[ OddQ[n], a[n - 1] + 2a[n - 2], 2a[n - 1] + a[n - 2]]; Table[a[n], {n, 0, 30}]
    LinearRecurrence[{0,5,0,-2},{0,1,2,4},40] (* Harvey P. Dale, Jul 05 2022 *)

Formula

Also a(n) = a(n-1) + 2a(n-2) if n is odd, else a(n) = 2a(n-1) + a(n-2).
a(2n) = 2*A005824(2n), a(2n+1) = A052913(n) = A005824(2n) + A005824(2n+1).
G.f.: x*(1+2*x-x^2)/(1-5*x^2+2*x^4).

Extensions

Corrected the g.f. and index in formula with A052913 R. J. Mathar, Apr 01 2009, May 02 2009
a(31) onwards from Andrew Howroyd, Mar 19 2025

A384633 Expansion of (1+x-2*x^2-2*x^3) / (1-6*x^2-4*x^3+2*x^4).

Original entry on oeis.org

1, 1, 4, 8, 26, 62, 180, 460, 1276, 3356, 9136, 24320, 65688, 175752, 473136, 1268624, 3410448, 9152784, 24590912, 66021248, 177335712, 476185568, 1278917440, 3434413760, 9223575488, 24769781184, 66521273088, 178644161536, 479759612288, 1288410499200
Offset: 0

Views

Author

Sean A. Irvine, Jun 05 2025

Keywords

Comments

Number of walks of length n starting at vertex 0 in the following graph:
2
/ \
0-1---3
\ /
4.
Also, for n>=1, the number of walks of length n-1 starting at vertex 1 in the same graph.

Examples

			a(3)=8 because we have the walks 0-1-0-1, 0-1-2-1, 0-1-2-3, 0-1-3-1, 0-1-3-2, 0-1-3-4, 0-1-4-1, 0-1-4-3.
		

Crossrefs

Cf. A384634 (vertices 2, 4), A384635 (vertex 3), A005824 (missing edge {1,3}), A105476 (missing edge {1,2}).

Programs

  • Maple
    a:= n-> (<<0|1|0|0|0>, <1|0|1|1|1>, <0|1|0|1|0>, <0|1|1|0|1>, <0|1|0|1|0>>^n. <<1,1,1,1,1>>)[1,1]:
    seq(a(n), n=0..32);
  • Mathematica
    CoefficientList[Series[(1+x-2*x^2-2*x^3) / (1-6*x^2-4*x^3+2*x^4), {x, 0, 32}], x]

A384640 Expansion of (1-3*x^2) / (1-x-5*x^2+x^3+2*x^4).

Original entry on oeis.org

1, 1, 3, 7, 19, 49, 131, 343, 911, 2397, 6347, 16735, 44251, 116785, 308611, 814815, 2152583, 5684477, 15015355, 39655527, 104742659, 276635985, 730663043, 1929789255, 5096983167, 13461994429, 35555794923, 93909205391, 248032219243, 655098462417, 1730238763395
Offset: 0

Views

Author

Sean A. Irvine, Jun 05 2025

Keywords

Comments

Number of walks of length n starting at vertex 0 in the following graph:
2
/|\
0-1 | 3
\|/
4.
Also, for n>=1, the number of walks of length n-1 starting at vertex 1 in the same graph.

Examples

			a(3)=7 because we have the walks 0-1-0-1, 0-1-2-1, 0-1-2-3, 0-1-2-4, 0-1-4-1, 0-1-4-2, 0-1-4-3.
		

Crossrefs

Cf. A384641 (vertex 2), A384642 (vertex 3), A005824 (missing edge {2,4}), A026597 (missing edge {0,1}).

Programs

  • Maple
    a:= n-> (<<0|1|0|0|0>, <1|0|1|0|1>, <0|1|0|1|1>, <0|0|1|0|1>, <0|1|1|1|0>>^n. <<1,1,1,1,1>>)[1,1]:
    seq(a(n), n=0..32);
  • Mathematica
    CoefficientList[Series[(1-3*x^2) / (1-x-5*x^2+x^3+2*x^4), {x, 0, 32}], x]

A384634 Expansion of (1+2*x+x^2) / (1-6*x^2-4*x^3+2*x^4).

Original entry on oeis.org

1, 2, 7, 16, 48, 120, 338, 880, 2412, 6392, 17316, 46240, 124640, 333920, 898168, 2409600, 6475408, 17382432, 46694512, 125377024, 336745984, 904275328, 2428594976, 6521881856, 17515179200, 47037120384, 126321412672, 339239675392, 911046599168, 2446649462272
Offset: 0

Views

Author

Sean A. Irvine, Jun 05 2025

Keywords

Comments

Number of walks of length n starting at vertex 2 in the following graph:
2
/ \
0-1---3
\ /
4.

Examples

			a(2)=7 because we have the walks 2-1-0, 2-1-2, 2-1-3, 2-1-4, 2-3-1, 2-3-2, 2-3-4.
		

Crossrefs

Cf. A384633 (vertices 0, 1), A384635 (vertex 3), A005824 (missing edge {1,3}), A105476 (missing edge {1,2}).

Programs

  • Maple
    a:= n-> (<<0|1|0|0|0>, <1|0|1|1|1>, <0|1|0|1|0>, <0|1|1|0|1>, <0|1|0|1|0>>^n. <<1,1,1,1,1>>)[3,1]:
    seq(a(n), n=0..32);
  • Mathematica
    CoefficientList[Series[(1+2*x+x^2) / (1-6*x^2-4*x^3+2*x^4), {x, 0, 32}], x]

A384635 Expansion of (1+3*x+2*x^2) / (1-6*x^2-4*x^3+2*x^4).

Original entry on oeis.org

1, 3, 8, 22, 58, 158, 420, 1136, 3036, 8180, 21920, 58952, 158168, 425032, 1140976, 3064960, 8229648, 22103600, 59355776, 159410272, 428089760, 1149677536, 3087468096, 8291603712, 22267339200, 59800139584, 160595513856, 431286986880, 1158238963072
Offset: 0

Views

Author

Sean A. Irvine, Jun 05 2025

Keywords

Comments

Number of walks of length n starting at vertex 3 in the following graph:
2
/ \
0-1---3
\ /
4.

Examples

			a(2)=8 because we have the walks 3-1-0, 3-1-2, 3-1-3. 3-1-4, 3-2-1, 3-2-3, 3-4-1, 3-4-3.
		

Crossrefs

Cf. A384633 (vertices 0, 1), A384634 (vertices 2, 4), A005824 (missing edge {1,3}), A105476 (missing edge {1,2}).

Programs

  • Maple
    a:= n-> (<<0|1|0|0|0>, <1|0|1|1|1>, <0|1|0|1|0>, <0|1|1|0|1>, <0|1|0|1|0>>^n. <<1,1,1,1,1>>)[3,1]:
    seq(a(n), n=0..32);
  • Mathematica
    CoefficientList[Series[(1+2*x+x^2) / (1-6*x^2-4*x^3+2*x^4), {x, 0, 32}], x]

A384641 Expansion of (1+2*x-x^3) / (1-x-5*x^2+x^3+2*x^4).

Original entry on oeis.org

1, 3, 8, 21, 56, 147, 390, 1027, 2718, 7169, 18952, 50025, 132180, 349015, 921986, 2434831, 6431386, 16985525, 44863652, 118490229, 312960192, 826576635, 2183160062, 5766102587, 15229405878, 40223605481, 106238212160, 280594628513, 741103272076, 1957390991519
Offset: 0

Views

Author

Sean A. Irvine, Jun 05 2025

Keywords

Comments

Number of walks of length n starting at vertex 2 in the following graph:
2
/|\
0-1 | 3
\|/
4.

Examples

			a(2)=8 because we have the walks 2-1-0, 2-1-2, 2-1-4, 2-3-2, 2-3-4, 2-4-1, 2-4-2, 2-4-3.
		

Crossrefs

Cf. A384640 (vertices 0, 1), A384642 (vertex 3), A005824 (missing edge {2,4}), A026597 (missing edge {0,1}).

Programs

  • Maple
    a:= n-> (<<0|1|0|0|0>, <1|0|1|0|1>, <0|1|0|1|1>, <0|0|1|0|1>, <0|1|1|1|0>>^n. <<1,1,1,1,1>>)[3,1]:
    seq(a(n), n=0..32);
  • Mathematica
    CoefficientList[Series[(1+2*x-x^3) / (1-x-5*x^2+x^3+2*x^4), {x, 0, 32}], x]

A384642 Expansion of (1+x-x^2+x^3) / (1-x-5*x^2+x^3+2*x^4).

Original entry on oeis.org

1, 2, 6, 16, 42, 112, 294, 780, 2054, 5436, 14338, 37904, 100050, 264360, 698030, 1843972, 4869662, 12862772, 33971050, 89727304, 236980458, 625920384, 1653153270, 4366320124, 11532205174, 30458811756, 80447210962, 212476424320, 561189257026, 1482206544152
Offset: 0

Views

Author

Sean A. Irvine, Jun 05 2025

Keywords

Comments

Number of walks of length n starting at vertex 3 in the following graph:
2
/|\
0-1 | 3
\|/
4.

Examples

			a(2)=6 because we have the walks 3-2-1, 3-2-3, 3-2-4, 3-4-1, 3-4-2, 3-4-3.
		

Crossrefs

Cf. A384640 (vertices 0, 1), A384641 (vertex 2), A005824 (missing edge {2,4}), A026597 (missing edge {0,1}).

Programs

  • Maple
    a:= n-> (<<0|1|0|0|0>, <1|0|1|0|1>, <0|1|0|1|1>, <0|0|1|0|1>, <0|1|1|1|0>>^n. <<1,1,1,1,1>>)[4,1]:
    seq(a(n), n=0..32);
  • Mathematica
    CoefficientList[Series[(1+x-x^2+x^3) / (1-x-5*x^2+x^3+2*x^4), {x, 0, 32}], x]

A109165 a(n) = 5*a(n-2) - 2*a(n-4), n >= 4.

Original entry on oeis.org

1, 2, 5, 10, 23, 46, 105, 210, 479, 958, 2185, 4370, 9967, 19934, 45465, 90930, 207391, 414782, 946025, 1892050, 4315343, 8630686, 19684665, 39369330, 89792639, 179585278, 409593865, 819187730, 1868384047, 3736768094, 8522732505
Offset: 0

Views

Author

Creighton Dement, Aug 18 2005

Keywords

Comments

Floretion Algebra Multiplication Program, FAMP Code: 4kbaseksigcycsumseq[ - .25'i - .25i' + .25'ii' + .25'jj' + .25'kk' + .25'jk' + .25'kj' + .25e], sumtype: (Y[15], *, vesy)

Crossrefs

Formula

a(2n) = A107839(n), a(2n+1) = A106709(n+1), a(n) - a(n-1) = A005824(n+2).
G.f.: (2*x+1)/(1-5*x^2+2*x^4).

A276288 a(n) = a(n-1) + 3*a(n-2) if n is even, otherwise a(n) = 3*a(n-1) + a(n-2), a(0)=0, a(1)=1.

Original entry on oeis.org

0, 1, 1, 4, 7, 25, 46, 163, 301, 1066, 1969, 6973, 12880, 45613, 84253, 298372, 551131, 1951765, 3605158, 12767239, 23582713, 83515378, 154263517, 546305929, 1009096480, 3573595369, 6600884809, 23376249796, 43178904223, 152912962465, 282449675134, 1000261987867, 1847611013269, 6543095027674
Offset: 0

Views

Author

Ilya Gutkovskiy, Aug 27 2016

Keywords

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{0, 7, 0, -3}, {0, 1, 1, 4}, 34]
    RecurrenceTable[{a[0] == 0, a[1] == 1, a[n] == (2 - (-1)^n) a[n - 1] + (2 + (-1)^n) a[n - 2]}, a, {n, 33}]
  • PARI
    concat(0, Vec(x*(1+x-3*x^2)/(1-7*x^2+3*x^4) + O(x^99))) \\ Altug Alkan, Aug 27 2016

Formula

G.f.: x*(1 + x - 3*x^2)/(1 - 7*x^2 + 3*x^4).
a(n) = 7*a(n-2) - 3*a(n-4).
a(n) = (2 - (-1)^n)*a(n-1) + (2 + (-1)^n)*a(n-2) for n > 1, a(0)=0, a(1)=1.
a(2k) = A190972(k).
Showing 1-10 of 11 results. Next