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.

Previous Showing 11-20 of 21 results. Next

A005386 Area of n-th triple of squares around a triangle.

Original entry on oeis.org

1, 3, 16, 75, 361, 1728, 8281, 39675, 190096, 910803, 4363921, 20908800, 100180081, 479991603, 2299777936, 11018898075, 52794712441, 252954664128, 1211978608201, 5806938376875, 27822713276176, 133306628004003, 638710426743841, 3060245505715200
Offset: 1

Views

Author

Jean Meeus

Keywords

Comments

a(n)*(-1)^(n+1) is the r=-3 member of the r-family of sequences S_r(n), n>=1, defined in A092184 where more information can be found.
The sequence is the case P1 = 3, P2 = -10, Q = 1 of the 3 parameter family of 4th-order linear divisibility sequences found by Williams and Guy. - Peter Bala, Apr 03 2014

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Essentially the same as A003769.
First differences of A099025.
Cf. A100047.

Programs

  • Magma
    I:=[1, 3, 16]; [n le 3 select I[n] else 4*Self(n-1) +4*Self(n-2) -Self(n-3): n in [1..41]]; // G. C. Greubel, Nov 16 2022
    
  • Maple
    A005386:=-(-1+z)/(z+1)/(z**2-5*z+1); [Conjectured by Simon Plouffe in his 1992 dissertation.]
    a:= n-> (Matrix([[0,1,3]]). Matrix(3, (i,j)-> if (i=j-1) then 1 elif j=1 then [4,4,-1][i] else 0 fi)^(n))[1,1]: seq(a(n), n=1..25); # Alois P. Heinz, Aug 05 2008
  • Mathematica
    a[n_]:= Module[{n1=1, n2=0}, Do[{n1, n2}={Sqrt[3]*n1+n2, n1}, {n-1}];n1^2];
    Table[a[n], {n,30}]
    a[n_]:= Round[((5+Sqrt[21])/2)^n/7]; Table[a[n], {n, 30}]
    Rest@(CoefficientList[Series[x/(1-x*(Sqrt[3]+x)), {x, 0, 30}], x])^2
    Abs[ChebyshevU[Range[1,40]-1, I*Sqrt[3]/2]]^2 (* G. C. Greubel, Nov 16 2022 *)
  • SageMath
    def A005386(n): return abs(chebyshev_U(n-1, i*sqrt(3)/2))^2
    [A005386(n) for n in range(1,40)] # G. C. Greubel, Nov 16 2022

Formula

G.f.: x*(1-x)/((1+x)*(1-5*x+x^2)).
a(n) = 4*a(n-1) + 4*a(n-2) - a(n-3), a(1)=1, a(2)=3, a(3)=16.
a(n) = (2/7)*(T(n, 5/2) - (-1)^n) with twice Chebyshev's polynomials of the first kind evaluated at x=5/2: 2*T(n, 5/2) = A003501(n) = ((5+sqrt(21))^n + (5-sqrt(21))^n)/2^n. - Wolfdieter Lang, Oct 18 2004
a(2*n) = A003690(n). a(2*n+1) = A004253(n)^2. - Alexander Evnin, Mar 11 2012
From Peter Bala, Apr 03 2014: (Start)
a(n) = |U(n-1, sqrt(3)*i/2)|^2, where U(n,x) denotes the Chebyshev polynomial of the second kind.
a(n) = the bottom left entry of the 2 X 2 matrix T(n, M), where M is the 2 X 2 matrix [0, 5/2; 1, 3/2] and T(n,x) denotes the Chebyshev polynomial of the first kind.
See the remarks in A100047 for the general connection between Chebyshev polynomials of the first kind and 4th-order linear divisibility sequences. (End)

Extensions

Edited by Peter J. C. Moses, Apr 23 2004
More terms from Pab Ter (pabrlos(AT)yahoo.com), May 09 2004

A180142 Eight rooks and one berserker on a 3 X 3 chessboard. G.f.: (1 + x - x^2)/(1 - 3*x - 3*x^2).

Original entry on oeis.org

1, 4, 14, 54, 204, 774, 2934, 11124, 42174, 159894, 606204, 2298294, 8713494, 33035364, 125246574, 474845814, 1800277164, 6825368934, 25876938294, 98106921684, 371951579934, 1410175504854, 5346381254364, 20269670277654, 76848154596054, 291353474621124
Offset: 0

Views

Author

Johannes W. Meijer, Aug 13 2010

Keywords

Comments

The a(n) represent the number of n-move routes of a fairy chess piece starting in a given side square (m = 2, 4, 6 or 8) on a 3 X 3 chessboard. This fairy chess piece behaves like a rook on the eight side and corner squares but on the central square the rook goes berserk and turns into a berserker, see A180140.
The sequence above corresponds to 16 A[5] vectors with decimal values between 3 and 384. These vectors lead for the corner squares to A123620 and for the central square to A155116.
This sequence appears among the members of a family of sequences with g.f. (1 + x - k*x^2)/(1 - 3*x + (k-4)*x^2). Berserker sequences that are members of this family are 4*A007482 (k=2; with leading 1 added), A180142 (k=1; this sequence), A000302 (k=0), A180140 (k=-1) and 4*A154964 (k=-2; n>=1 and a(0)=1). Some other members of this family are 2*A180148 (k=3; with leading 1 added), 4*A025192 (k=4; with leading 1 added), 2*A005248 (k=5; with leading 1 added) and A123932 (k=6).

Crossrefs

Cf. A180141 (corner squares), A180140 (side squares), A180147 (central square).

Programs

  • Maple
    with(LinearAlgebra): nmax:=23; m:=2; A[5]:=[0,0,0,0,0,0,0,1,1]: A:= Matrix([[0,1,1,1,0,0,1,0,0], [1,0,1,0,1,0,0,1,0], [1,1,0,0,0,1,0,0,1], [1,0,0,0,1,1,1,0,0], A[5], [0,0,1,1,1,0,0,0,1], [1,0,0,1,0,0,0,1,1], [0,1,0,0,1,0,1,0,1], [0,0,1,0,0,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);
    # second Maple program:
    a:= n-> ceil((<<0|1>, <3|3>>^n. <<2/3, 4>>)[1,1]):
    seq(a(n), n=0..25);  # Alois P. Heinz, Jul 14 2021
  • Mathematica
    LinearRecurrence[{3, 3}, {1, 4, 14}, 26] (* Jean-François Alcover, Jan 18 2025 *)

Formula

G.f.: (1 + x - x^2)/(1 - 3*x - 3*x^2).
a(n) = 3*a(n-1) + 3*a(n-2) for n >= 2 with a(0)=1, a(1)=4 and a(2)=14.
a(n) = (6-2*A)*A^(-n-1)/21 + (6-2*B)*B^(-n-1)/21 with A=(-3+sqrt(21))/6 and B=(-3-sqrt(21))/6.
Lim_{k->infinity} a(2*n+k)/a(k) = 2*A000244(n)/(A003501(n) - A004254(n)*sqrt(21)) for n >= 1.
Lim_{k->infinity} a(2*n-1+k)/a(k) = 2*A000244(n)/(A004253(n)*sqrt(21) - 3*A030221(n-1)) for n >= 1.

A099025 Expansion of 1 / ((1+x) * (1-5*x+x^2)).

Original entry on oeis.org

1, 4, 20, 95, 456, 2184, 10465, 50140, 240236, 1151039, 5514960, 26423760, 126603841, 606595444, 2906373380, 13925271455, 66719983896, 319674648024, 1531653256225, 7338591633100, 35161304909276, 168467932913279, 807178359657120, 3867423865372320
Offset: 0

Views

Author

Ralf Stephan, Sep 26 2004

Keywords

Examples

			1 + 4*x + 20*x^2 + 95*x^3 + 456*x^4 + 2184*x^5 + 10465*x^6 + ...
		

Crossrefs

First differences of A089927. First differences are in A003769 and A005386. Pairwise sums are in A004254.

Programs

  • Magma
    I:=[1, 4, 20]; [n le 3 select I[n] else 4*Self(n-1) + 4*Self(n-2) - Self(n-3): n in [1..30]]; // G. C. Greubel, Dec 31 2017
  • Mathematica
    CoefficientList[Series[1/((1+x)*(1-5*x+x^2)), {x,0,50}], x] (* or *) LinearRecurrence[{4,4,-1}, {1,4,20}, 30] (* G. C. Greubel, Dec 31 2017 *)
  • PARI
    Vec(1/(1+x)/(1-5*x+x^2)+O(x^99)) \\ Charles R Greathouse IV, Sep 26 2012
    
  • PARI
    {a(n) = (3 * (-1)^n + 38 * subst( poltchebi(n), x, 5/2) - 8 * subst( poltchebi(n-1), x, 5/2)) / 21} /* Michael Somos, Jan 25 2013 */
    

Formula

a(n) = (1/7)*[A030221(n+2) - A003501(n+2) + (-1)^n].
a(n) = 5*a(n-1) -a(n-2) +(-1)^n, a(0)=1, a(1)=4. - Vincenzo Librandi, Mar 22 2011
G.f.: 1 / ((1 + x) * (1 - 5*x + x^2)).
a(-3-n) = -a(n). - Michael Somos, Jan 25 2013
a(n) = (2^(-n)*(3*(-2)^n+(9-2*sqrt(21))*(5-sqrt(21))^n+(5+sqrt(21))^n*(9+2*sqrt(21))))/21. - Colin Barker, Nov 02 2016

A219164 Recurrence equation a(n+1) = a(n)^4 - 4*a(n)^2 + 2 with a(0) = 5.

Original entry on oeis.org

5, 527, 77132286527, 35395236908668169265765137996816180039862527
Offset: 0

Views

Author

Peter Bala, Nov 13 2012

Keywords

Comments

Bisection of A003487.
The next term -- a(4) -- has 175 digits. - Harvey P. Dale, Jun 09 2017

Crossrefs

Programs

  • Mathematica
    NestList[#^4-4#^2+2&,5,5] (* Harvey P. Dale, Jun 09 2017 *)

Formula

Let alpha = 1/2*(5 + sqrt(21)). Then a(n) = (alpha)^(4^n) + (1/alpha)^(4^n).
a(n) = A003487(2*n) = A003501(4^n).
Product_{n>=0} ((1 + 2/a(n))/(1 - 2/a(n)^2)) = sqrt(7/3).
From Peter Bala, Dec 06 2022: (Start)
a(n) = 2*T(4^n,5/2), where T(n,x) denotes the n-th Chebyshev polynomial of the first kind.
Let b(n) = a(n) - 5. The sequence {b(n)} appears to be a strong divisibility sequence, that is, gcd(b(n),b(m)) = b(gcd(n,m)) for n, m >= 1. (End)

A299741 Array read by antidiagonals upwards: a(i,0) = 2, i >= 0; a(i,1) = i+2, i >= 0; a(i,j) = (i+2) * a(i,j-1) - a(i,j-2), for i >= 0, j > 1.

Original entry on oeis.org

2, 2, 2, 2, 3, 2, 2, 4, 7, 2, 2, 5, 14, 18, 2, 2, 6, 23, 52, 47, 2, 2, 7, 34, 110, 194, 123, 2, 2, 8, 47, 198, 527, 724, 322, 2, 2, 9, 62, 322, 1154, 2525, 2702, 843, 2, 2, 10, 79, 488, 2207, 6726, 12098, 10084, 2207, 2, 2, 11, 98, 702, 3842, 15127, 39202, 57965, 37634, 5778, 2
Offset: 0

Views

Author

William W. Collier, Feb 18 2018

Keywords

Comments

Note the similarity in form of the recursive steps in the array definition above and the polynomial definition under FORMULA.

Examples

			i\j |0  1   2    3      4       5        6          7           8            9
----+-------------------------------------------------------------------------
   0|2  2   2    2      2       2        2          2           2            2
   1|2  3   7   18     47     123      322        843        2207         5778
   2|2  4  14   52    194     724     2702      10084       37634       140452
   3|2  5  23  110    527    2525    12098      57965      277727      1330670
   4|2  6  34  198   1154    6726    39202     228486     1331714      7761798
   5|2  7  47  322   2207   15127   103682     710647     4870847     33385282
   6|2  8  62  488   3842   30248   238142    1874888    14760962    116212808
   7|2  9  79  702   6239   55449   492802    4379769    38925119    345946302
   8|2 10  98  970   9602   95050   940898    9313930    92198402    912670090
   9|2 11 119 1298  14159  154451  1684802   18378371   200477279   2186871698
  10|2 12 142 1692  20162  240252  2862862   34114092   406506242   4843960812
  11|2 13 167 2158  27887  360373  4656962   60180133   777684767  10049721838
  12|2 14 194 2702  37634  524174  7300802  101687054  1416317954  19726764302
  13|2 15 223 3330  49727  742575 11088898  165590895  2472774527  36926027010
  14|2 16 254 4048  64514 1028176 16386302  261152656  4162056194  66331746448
  15|2 17 287 4862  82367 1395377 23639042  400468337  6784322687 114933017342
  16|2 18 322 5778 103682 1860498 33385282  599074578 10749957122 192900153618
  17|2 19 359 6802 128879 2441899 46267202  876634939 16609796639 314709501202
  18|2 20 398 7940 158402 3160100 63043598 1257711860 25091193602 500566160180
  19|2 21 439 9198 192719 4037901 84603202 1772629341 37140612959 778180242798
		

Crossrefs

The array first appeared in A298675.
Rows 1 through 29 of the array appear in these OEIS entries: A005248, A003500, A003501, A003499, A056854, A086903, A056918, A087799, A057076, A087800, A078363, A067902, A078365, A090727, A078367, A087215, A078369, A090728, A090729, A090730, A090731, A090732, A090733, A090247, A090248, A090249, A090251. Also entries occur for rows 45, 121, and 320: A087265, A065705, A089775. Each of these entries asserts that a(i,j)=f(i+2,j) is true for that row.
A few of the columns appear in the OEIS: A008865 (for column 2), A058794 and A007754 (for column 3), and A230586 (for column 5).
Main diagonal gives A343261.

Programs

  • Maple
    A:= proc(i, j) option remember; `if`(min(i, j)=0, 2,
          `if`(j=1, i+2, (i+2)*A(i, j-1)-A(i, j-2)))
        end:
    seq(seq(A(d-k, k), k=0..d), d=0..12);  # Alois P. Heinz, Mar 05 2019
  • Mathematica
    a[, 0] = a[0, ] = 2; a[i_, 1] := i + 2;
    a[i_, j_] := a[i, j] =(i + 2) a[i, j - 1] - a[i, j - 2];
    Table[a[i - j, j], {i, 0, 10}, {j, 0, i}] // Flatten (* Jean-François Alcover, Dec 07 2019 *)

Formula

Let k be an integer, and let r1 and r2 be the roots of x + 1/x = k. Then f(k,n) = r1^n + r2^n is an integer, for integer n >= 0. Theorem: a(i,j) = f(i+2,j), for i,j >= 0. Proof: See the Collier link.
Define polynomials recursively by:
p[0](n) = 2, for n >= 0 ( [ and ] demark subscripts).
p[1](n) = n + 2, for n >= 0.
p[j](n) = p[j-1](n) * p[1](n) - p[j-2](n), for j > 1, n >= 0. The coefficients of these polynomials occur as the even numbered, upward diagonals in the OEIS Wiki link. Conjecture: a(i,j) = p[j](i), i,j >= 0.

Extensions

Edited by N. J. A. Sloane, Apr 04 2018

A060964 Table by antidiagonals where T(n,k) = n*T(n,k-1) - T(n,k-2) with T(n,0) = 2 and T(n,1) = n.

Original entry on oeis.org

2, 0, 2, -2, 1, 2, 0, -1, 2, 2, 2, -2, 2, 3, 2, 0, -1, 2, 7, 4, 2, -2, 1, 2, 18, 14, 5, 2, 0, 2, 2, 47, 52, 23, 6, 2, 2, 1, 2, 123, 194, 110, 34, 7, 2, 0, -1, 2, 322, 724, 527, 198, 47, 8, 2, -2, -2, 2, 843, 2702, 2525, 1154, 322, 62, 9, 2, 0, -1, 2, 2207, 10084, 12098, 6726, 2207, 488, 79, 10, 2
Offset: 0

Views

Author

Henry Bottomley, May 09 2001

Keywords

Examples

			Square array begins as:
  2, 0, -2,   0,   2,    0,    -2, ...
  2, 1, -1,  -2,  -1,    1,     2, ...
  2, 2,  2,   2,   2,    2,     2, ...
  2, 3,  7,  18,  47,  123,   322, ...
  2, 4, 14,  52, 194,  724,  2702, ...
  2, 5, 23, 110, 527, 2525, 12098, ...
		

Crossrefs

Programs

  • GAP
    T:= function(n,k)
        if k=0 then return 2;
        elif k=1 then return n;
        else return n*T(n,k-1) - T(n,k-2);
        fi; end;
    Flat(List([0..12], n-> List([0..n], k-> T(k,n-k) ))); # G. C. Greubel, Jan 15 2020
  • Magma
    function T(n,k)
      if k eq 0 then return 2;
      elif k eq 1 then return n;
      else return n*T(n, k-1) - T(n, k-2);
      end if; return T; end function;
    [T(k,n-k): k in [0..n], n in [0..12]]; // G. C. Greubel, Jan 15 2020
    
  • Maple
    seq(seq( simplify(k*ChebyshevU(n-k-1, k/2) -2*ChebyshevU(n-k-2, k/2)), k=0..n), n=0..12); # G. C. Greubel, Jan 15 2020
  • Mathematica
    Table[k*ChebyshevU[n-k-1, k/2] -2*ChebyshevU[n-k-2, k/2], {n,0,12}, {k,0,n} ]//Flatten
  • PARI
    T(n,k) = n*polchebyshev(k-1,2,n/2) -2*polchebyshev(k-2,2,n/2);
    for(n=0,12, for(k=0,n, print1(T(k,n-k), ", "))) \\ G. C. Greubel, Jan 15 2020
    
  • Sage
    [[k*chebyshev_U(n-k-1, k/2) -2*chebyshev_U(n-k-2, k/2) for k in (0..n)] for n in (0..12)] # G. C. Greubel, Jan 15 2020
    

Formula

For all m, T(n, k) = T(n, |m|)*T(n, |k - m|) - T(n, |k - 2m|).
T(n, 2k) = T(n, k)^2 - 2.
T(n, 2k + 1) = T(n, k)*T(n, k + 1) - n.
T(n, 3k) = T(n, k)^3 - 3*T(n, k).
T(n, 4k) = T(n, k)^4 - 4*T(n, k)^2 + 2.
T(n, 5k) = T(n, k)^5 - 5*T(n, k)^3 + 5*T(n, k) etc.
T(n, -k) = T(n, k).
T(-n, k) = T(-n, -k) = (-1)^k * T(n, k).
T(n, k) = ( n*( ((n + sqrt(n^2 -4))/2)^k - ((n - sqrt(n^2 -4))/2)^k ) - 2*( ((n + sqrt(n^2 -4))/2)^(k-1) - ((n - sqrt(n^2 -4))/2)^(k-1) ) )/sqrt(n^2 -4).
T(n, k) = n*ChebyshevU(k-1, n/2) - 2*ChebyshevU(k-2, n/2). - G. C. Greubel, Jan 15 2020

A099867 a(n) = 5*a(n-1) - a(n-2) for n>1, a(0)=1, a(1)=9.

Original entry on oeis.org

1, 9, 44, 211, 1011, 4844, 23209, 111201, 532796, 2552779, 12231099, 58602716, 280782481, 1345309689, 6445765964, 30883520131, 147971834691, 708975653324, 3396906431929, 16275556506321, 77980876099676, 373628823992059, 1790163243860619, 8577187395311036
Offset: 0

Views

Author

Creighton Dement, Oct 28 2004

Keywords

Comments

From Klaus Purath, Mar 07 2023: (Start)
For any two terms (a(n), a(n+1)) = (x, y), x^2 - 5*x*y + y^2 = 37 = A082111(4). This is valid in general for all recursive sequences (t) with constant coefficients (5,-1) and t(0) = 1: x^2 - 5*x*y + y^2 = A082111(t(1)-5). This includes and interprets the Feb 04 2014 comment in A004253 by Colin Barker.
By analogy to all this, for three consecutive terms (x, y, z) of any sequence (t) of the form (5,-1) with t(0) = 1: y^2 - x*z = A082111(t(1)-5). (End)

Crossrefs

Programs

  • Magma
    I:=[1,9]; [n le 2 select I[n] else 5*Self(n-1)-Self(n-2): n in [1..30]]; // Vincenzo Librandi, Jul 30 2015
    
  • Mathematica
    a[0] = 1; a[1] = 9; a[n_] := a[n] = 5 a[n - 1] - a[n - 2]; Table[ a[n], {n, 0, 21}] (* Robert G. Wilson v, Dec 14 2004 *)
    LinearRecurrence[{5, -1}, {1, 9}, 30] (* or *) CoefficientList[Series[(1 + 4 x)/(1 - 5 x + x^2), {x, 0, 30}], x] (* Harvey P. Dale, Jun 26 2011 *)
  • PARI
    Vec((1+4*x) / (1-5*x+x^2) + O(x^30)) \\ Colin Barker, Mar 31 2017

Formula

|2*a(n) + A099868(n) - A003501(n+1)| = 20*A004254(n).
From R. J. Mathar, Sep 11 2008: (Start)
G.f.: (1+4*x) / (1-5*x+x^2).
a(n) = A004254(n+1) + 4*A004254(n).
(End)
a(n) = 2^(-1-n)*((5-sqrt(21))^n*(-13+sqrt(21)) + (5+sqrt(21))^n*(13+sqrt(21))) / sqrt(21). - Colin Barker, Mar 31 2017

A099868 a(n) = 5*a(n-1) - a(n-2), a(0) = 3, a(1) = 25.

Original entry on oeis.org

3, 25, 122, 585, 2803, 13430, 64347, 308305, 1477178, 7077585, 33910747, 162476150, 778470003, 3729873865, 17870899322, 85624622745, 410252214403, 1965636449270, 9417930031947, 45124013710465, 216202138520378, 1035886678891425, 4963231255936747
Offset: 0

Views

Author

Creighton Dement, Oct 28 2004

Keywords

Crossrefs

Programs

  • GAP
    a:=[3,25];; for n in [3..30] do a[n]:=5*a[n-1]-a[n-2]; od; a; # G. C. Greubel, Nov 20 2018
  • Magma
    m:=30; R:=PowerSeriesRing(Integers(), m); Coefficients(R!( (3 +10*x)/(1-5*x+x^2))); // G. C. Greubel, Nov 20 2018
    
  • Maple
    a[0]:=3: a[1]:=25: for n from 2 to 30 do a[n]:=5*a[n-1]-a[n-2] od: seq(a[n],n=0..25);
  • Mathematica
    LinearRecurrence[{5,-1}, {3,25}, 30] (* G. C. Greubel, Nov 20 2018 *)
  • PARI
    Vec((3+10*x) / (1-5*x+x^2) + O(x^30)) \\ Colin Barker, Mar 28 2017
    
  • Sage
    s=((3+10*x)/(1-5*x+x^2)).series(x,30); s.coefficients(x, sparse=False) # G. C. Greubel, Nov 20 2018
    

Formula

|2*A099867(n) + a(n) - A003501(n+1)| = 20*A004254(n)
G.f.: (3 + 10*x) / (1 - 5*x + x^2). - Emeric Deutsch, Dec 03 2004
a(n) = (2^(-1-n)*((5-sqrt(21))^n*(-35+3*sqrt(21)) + (5+sqrt(21))^n*(35+3*sqrt(21)))) / sqrt(21). - Colin Barker, Mar 28 2017

A217787 a(n) = (a(n-1)*a(n-3) + 1) / a(n-4) with a(0) = a(1) = a(2) = a(3) = 1.

Original entry on oeis.org

1, 1, 1, 1, 2, 3, 4, 9, 14, 19, 43, 67, 91, 206, 321, 436, 987, 1538, 2089, 4729, 7369, 10009, 22658, 35307, 47956, 108561, 169166, 229771, 520147, 810523, 1100899, 2492174, 3883449, 5274724, 11940723, 18606722, 25272721, 57211441, 89150161, 121088881
Offset: 0

Views

Author

Michael Somos, Mar 25 2013

Keywords

Comments

This sequence is similar to A005246 whose recursion is a(n) = (a(n-1)*a(n-2) + 1) / a(n-3). - Michael Somos, Feb 10 2017

Examples

			G.f. = 1 + x + x^2 + x^3 + 2*x^4 + 3*x^5 + 4*x^6 + 9*x^7 + 14*x^8 + 19*x^9 + ...
		

Crossrefs

Programs

  • Magma
    [n le 3 select 1 else (Self(n)*Self(n-2)+1)/Self(n-3): n in [0..40]]; // Bruno Berselli, Mar 25 2013
  • Mathematica
    a[ n_] := With[{m = If [n < 0, 3 - n, n]}, SeriesCoefficient[ (1 + x + x^2 - 4 x^3 - 3 x^4 - 2 x^5) / (1 - 5 x^3 + x^6), {x, 0, m}]]; (* Michael Somos, Jan 18 2015 *)
    LinearRecurrence[{0,0,5,0,0,-1},{1,1,1,1,2,3},40] (* Harvey P. Dale, Nov 20 2016 *)
  • PARI
    {a(n) = if( n<0, n = 3-n); polcoeff( (1 + x + x^2 - 4*x^3 - 3*x^4 - 2*x^5) / (1 - 5*x^3 + x^6) + x * O(x^n), n)};
    

Formula

G.f.: (1 + x + x^2 - 4*x^3 - 3*x^4 - 2*x^5) / (1 - 5*x^3 + x^6).
a(n) = a(3-n) for all n in Z.
a(n+3) + a(n-3) = 5*a(n) for all n in Z.
a(n+1) + a(n-1) = a(n) * (2 + [n mod 3 == 0]) for all n in Z.
a(n+3k)+a(n-3k) = A003501(k)*a(n) for n>=3k. - Bruno Berselli, Mar 25 2013

A164582 a(n) = 5*a(n - 1) - a(n - 2), with n>2, a(1)=2, a(2)=3.

Original entry on oeis.org

2, 3, 13, 62, 297, 1423, 6818, 32667, 156517, 749918, 3593073, 17215447, 82484162, 395205363, 1893542653, 9072507902, 43468996857, 208272476383, 997893385058, 4781194448907, 22908078859477, 109759199848478, 525887920382913, 2519680402066087
Offset: 1

Views

Author

Vincenzo Librandi, Aug 17 2009

Keywords

Comments

From Klaus Purath, Aug 18 2024: (Start)
For any two consecutive terms (x,y), x^2 - 5xy + y^2 = -17 = A127147(6) always applies. In general, the following applies to all recurrences (t) with constant coefficients (5,-1) and t(0) = 2 and two consecutive terms (x,y): x^2 - 5xy + y^2 = A127147(t(1)+3) for any integer t(1). This includes and interprets the Feb 08 2014 comment on A003501 by Colin Barker.
By analogy to this, for three consecutive terms (x,y,z) of any recurrence (t) of the form (5,-1) with t(0) = 2: y^2 - xz = A127147(t(1)+3).
a(n) = t(n) - t(n-1) = (t(n+1) - t(n-2))/6, where (t) is any third order recurrence with constant coefficients (6,-6,1) and initial values t(0) = x, t(1) = x + 2, t(2) = x + 5 for any integer x.
a(n) = t(n-1) + t(n) = (t(n-2) + t(n+1))/4, where (t) is any third order recurrence with constant coefficients (4,4,-1) and initial values t(0) = x, t(1) = 2 - x, t(2) = x + 1 for any integer x. (End)

Programs

  • Magma
    [n le 2 select n+1 else 5*Self(n-1)-Self(n-2): n in [1..30]]; // Vincenzo Librandi, Sep 12 2013
    
  • Mathematica
    CoefficientList[Series[(2 - 7 x) / (1 - 5 x + x^2), {x, 0, 40}], x] (* Vincenzo Librandi, Sep 12 2013 *)
    LinearRecurrence[{5,-1},{2,3},30] (* Harvey P. Dale, Apr 06 2016 *)
  • PARI
    Vec(x*(2 - 7*x) / (1 - 5*x + x^2) + O(x^30)) \\ Colin Barker, Nov 08 2017

Formula

a(n) = 5*a(n-1) - a(n-2) = 2*A004254(n) - 7*A004254(n-1).
G.f.: x*(2-7*x) / (1-5*x+x^2).
a(n) = (2^(-1-n)*((5+sqrt(21))^n*(-31+7*sqrt(21)) + (5-sqrt(21))^n*(31+7*sqrt(21)))) / sqrt(21). - Colin Barker, Nov 08 2017
a(n) = (a(n-1)^2 + 17)/a(n-2). - Klaus Purath, Aug 30 2020

Extensions

Extended by R. J. Mathar, Aug 19 2009
Previous Showing 11-20 of 21 results. Next