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-5 of 5 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

A186446 Expansion of 1/(1 - 7*x + 2*x^2).

Original entry on oeis.org

1, 7, 47, 315, 2111, 14147, 94807, 635355, 4257871, 28534387, 191224967, 1281505995, 8588092031, 57553632227, 385699241527, 2584787426235, 17322113500591, 116085219651667, 777952310560487, 5213495734620075, 34938565521219551
Offset: 0

Views

Author

Bruno Berselli, Feb 21 2011

Keywords

Comments

The first differences are in A122074.
a(n+1) equals the number of words of length n over {0,1,2,3,4,5,6} avoiding 01 and 02. - Milan Janjic, Dec 17 2015

Crossrefs

For similar closed formulas: A015446 [((1+sqrt(41))^(1+n)-(1-sqrt(41))^(1+n))/(2^(1+n)*sqrt(41))], A015525 [((3+sqrt(41))^n-(3-sqrt(41))^n)/(2^n*sqrt(41))], A015537 [((5+sqrt(41))^n-(5-sqrt(41))^n)/(2^n*sqrt(41))], A178869 [((9+sqrt(41))^n-(9-sqrt(41))^n)/(2^n*sqrt(41))].
Same recurrence as in A122074, A003771.

Programs

  • Magma
    m:=21; R:=PowerSeriesRing(Integers(), m); Coefficients(R!(1/(1-7*x+2*x^2)));
    
  • Magma
    I:=[1,7]; [n le 2 select I[n] else 7*Self(n-1)-2*Self(n-2): n in [1..30]]; // Vincenzo Librandi, Aug 19 2013
    
  • Mathematica
    CoefficientList[Series[1 / (1 - 7 x + 2 x^2), {x, 0, 20}], x] (* Vincenzo Librandi, Aug 19 2013 *)
    LinearRecurrence[{7,-2},{1,7},30] (* Harvey P. Dale, Aug 06 2017 *)
  • PARI
    Vec(1/(1-7*x+2*x^2) + O(x^100)) \\ Altug Alkan, Dec 17 2015

Formula

G.f.: 1/(1-7*x+2*x^2).
a(n) = ((7+sqrt(41))^(1+n)-(7-sqrt(41))^(1+n))/(2^(1+n)*sqrt(41)).
a(n) = 7*a(n-1)-2*a(n-2), with a(0)=1, a(1)=7.

A206819 Riordan array (1/(1-10*x-10*x^2), x/(1-10*x-10*x^2)).

Original entry on oeis.org

1, 10, 1, 90, 20, 1, 800, 280, 30, 1, 7100, 3400, 570, 40, 1, 63000, 38300, 8800, 960, 50, 1, 559000, 412000, 120600, 18000, 1450, 60, 1, 4960000, 4296000, 1530000, 291000, 32000, 2040, 70, 1
Offset: 0

Views

Author

Philippe Deléham, Feb 12 2012

Keywords

Comments

Row sums are A000042(n+1).
Subtriangle of triangle given by (0, 10, -1, 1, 0, 0, 0, 0, 0, 0, 0, ...) DELTA (1, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...) where DELTA is the operator defined in A084938.

Examples

			Triangle begins :
1
10, 1
90, 20, 1
800, 280, 30, 1
7100, 3400, 570, 40, 1
63000, 38300, 8800, 960, 50, 1
559000, 412000, 120600, 18000, 1450, 60, 1
4960000, 4296000, 1530000, 291000, 32000, 2040, 70, 1
Triangle (0, 10, -1, 1, 0, 0, 0, ...) DELTA (1, 0, 0, 0, 0, 0, 0, 0, ...) begins :
1
0, 1
0, 10, 1
0, 90, 20, 1
0, 800, 280, 30, 1
0, 7100, 3400, 570, 40, 1 ...
		

Crossrefs

Formula

T(n,k) = 10*T(n-1,k) - 10*T(n-2,k) + T(n-1,k-1).
G.f.: 1/(1-10*x+10*x^2-y*x).
Sum_{k, 0<=k} T(n,k)*x^k = A178869(n+1), A057086(n), A000042(n+1) for x = -1, 0, 1 respectively.

A178870 Signed Delannoy triangle convolved with 10^n.

Original entry on oeis.org

1, 10, -1, 100, -30, 1, 1000, -500, 50, -1, 10000, -7000, 1300, -70, 1, 100000, -90000, 25000, -2500, 90, -1, 1000000, -1100000, 410000, -63000, 4100, -110, 1, 10000000, -13000000, 6100000, -1290000, 129000, -6100, 130, -1
Offset: 0

Views

Author

Mark Dols, Jun 20 2010

Keywords

Comments

Row sums give A178869

Examples

			Triangle begins:
1
10, -1
100, -30, 1
1000, -500, 50, -1
10000, -7000, 1300, -70, 1
100000, -90000, 25000, -2500, 90, -1
1000000, -1100000, 410000, -63000, 4100, -110, 1
10000000, -13000000, 6100000, -1290000, 129000, -6100, 130, -1
		

Crossrefs

Formula

T(n,k) = A008288(n,k)*(-10)^(n-k)*(-1)^n, A008288 seen as a triangle read by rows. - Philippe Deléham, Feb 27 2013

Extensions

More terms from Philippe Deléham, Feb 27 2013

A287818 Number of nonary sequences of length n such that no two consecutive terms have distance 3.

Original entry on oeis.org

1, 9, 69, 531, 4089, 31491, 242529, 1867851, 14385369, 110789811, 853254609, 6571393371, 50609994249, 389776014531, 3001884188289, 23119197549291, 178053936060729, 1371293449053651, 10561101680875569, 81336980637343611, 626421808927336809, 4824426473972595171
Offset: 0

Views

Author

David Nacin, Jun 02 2017

Keywords

Examples

			For n=2 the a(2) = 81 - 12 = 69 sequences contain every combination except these twelve: 03,30,14,41,25,52,36,63,47,74,58,85.
		

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{9, -10}, {1, 9, 69}, 40]
  • Python
    def a(n):
     if n in [0, 1, 2]:
      return [1, 9, 69][n]
     return 9*a(n-1)-10*a(n-2)

Formula

For n>2, a(n) = 9*a(n-1) - 10*a(n-2), a(0)=1, a(1)=9, a(2)=69.
G.f.: (1 - 2 x^2)/(1 - 9 x + 10 x^2).
For n>0, a(n)=(1/5)(3 - 18/sqrt(41))*((9 - sqrt(41))/2)^n + (1/5)(3 + 18/sqrt(41))*((9 + sqrt(41))/2)^n.
a(n) = A178869(n+1)-2*A178869(n-1). - R. J. Mathar, Oct 20 2019
Showing 1-5 of 5 results.