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-3 of 3 results.

A142710 a(n) = A142585(n) + A142586(n).

Original entry on oeis.org

2, 2, 6, 14, 38, 112, 276, 814, 1998, 5702, 14226, 39404, 99908, 270922, 695106, 1859134, 4807518, 12748472, 33128916, 87394454, 227792678, 599050102, 1564242906, 4106054164, 10733283588, 28143585362, 73614464826, 192899714414, 504751433798, 1322156172352
Offset: 0

Views

Author

Paul Curtz, Sep 25 2008

Keywords

Comments

Sum of the binomial and inverse binomial transforms of A014217.
Starting at a(1), the last digits form a period-4 sequence 2, 6, 4, 8.

Crossrefs

Programs

  • Magma
    [n eq 0 select 2 else (-1)^n*Lucas(n) +Lucas(2*n) -(1+(-1)^n)*2^(n-1): n in [0..50]]; // G. C. Greubel, Oct 26 2022
    
  • Mathematica
    Join[{2},LinearRecurrence[{2,7,-12,-11,16,-4},{2,6,14,38,112,276},30]] (* Harvey P. Dale, Nov 25 2013 *)
  • SageMath
    def A142710(n): return (-1)^n*lucas_number2(n,1,-1) + lucas_number2(2*n,1,-1) - (1 + (-1)^n)*2^(n-1) -int(n==0)
    [A142710(n) for n in range(51)] # G. C. Greubel, Oct 26 2022

Formula

a(n) = +2*a(n-1) +7*a(n-2) -12*a(n-3) -11*a(n-4) +16*a(n-5) -4*a(n-6), n>6. - R. J. Mathar, Jun 14 2010
G.f.: 2*(1-x-6*x^2+6*x^3+7*x^4-2*x^6)/((1-2*x)*(1+2*x)*(1+x-x^2)*(1-3*x+x^2)). - Colin Barker, Aug 13 2012
a(n) = (-1)^n*LucasL(n) + LucasL(2*n) - (1 + (-1)^n)*2^(n-1) - [n=0]. - G. C. Greubel, Oct 26 2022

Extensions

Offset set to zero and extended - R. J. Mathar, Jun 14 2010

A175660 Eight bishops and one elephant on a 3 X 3 chessboard. a(n) = 2^(n+2) - 3*F(n+2).

Original entry on oeis.org

1, 2, 7, 17, 40, 89, 193, 410, 859, 1781, 3664, 7493, 15253, 30938, 62575, 126281, 254392, 511745, 1028281, 2064314, 4141171, 8302637, 16638112, 33329357, 66744685, 133628474, 267482023, 535328225, 1071245704, 2143444841
Offset: 0

Views

Author

Johannes W. Meijer, Aug 06 2010, Aug 10 2010

Keywords

Comments

The a(n) represent the number of n-move routes of a fairy chess piece starting in a given corner square (m = 1, 3, 7, 9) on a 3 X 3 chessboard. This fairy chess piece behaves like a bishop on the eight side and corner squares but on the central square the bishop turns into a raging elephant, see A175654.
The sequence above corresponds to four A[5] vectors with decimal values 171, 174, 234 and 426. These vectors lead for the side squares to A000079 and for the central square to A175661 (a(n) = 2^(n+2) - 3*F(n+1)).

Crossrefs

Cf. A008466 (2^n-F(n+2)), A027934 (2^n-F(n+1)), A027974 (2^(n+3)-F(n+5)-F(n+3)), A074878 (3*2^n-2*F(n+2)), A142585 ((-1)^(n+1)*(2^(n-1)-F(n+1)-F(n-1))), A175661 (2^(n+2)-3*F(n+1)), A179610 (convolution of (-4)^n and F(n+1)).

Programs

  • Maple
    nmax:=29; m:=1; A[5]:= [0,1,0,1,0,1,0,1,1]: A:=Matrix([[0,0,0,0,1,0,0,0,1], [0,0,0,1,0,1,0,0,0], [0,0,0,0,1,0,1,0,0], [0,1,0,0,0,0,0,1,0], A[5], [0,1,0,0,0,0,0,1,0], [0,0,1,0,1,0,0,0,0], [0,0,0,1,0,1,0,0,0], [1,0,0,0,1,0,0,0,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
    Table[2^(n+2)-3Fibonacci[n+2],{n,0,30}] (* or *) LinearRecurrence[ {3,-1,-2},{1,2,7},30] (* Harvey P. Dale, Dec 28 2012 *)

Formula

G.f.: (1 - x + 2*x^2)/(1 - 3*x + x^2 + 2*x^3).
a(n) = 3*a(n-1) - a(n-2) - 2*a(n-3) with a(0)=1, a(1)=2 and a(2)=7.
a(n) = 2^(n+2) - 3*F(n+2) with F(n)=A000045(n).

A227200 a(n) = a(n-1) + a(n-2) - 2^(n-1) with a(0)=a(2)=0, a(1)=-a(3)=1, a(4)=-5.

Original entry on oeis.org

0, 1, 0, -1, -5, -14, -35, -81, -180, -389, -825, -1726, -3575, -7349, -15020, -30561, -61965, -125294, -252795, -509161, -1024100, -2057549, -4130225, -8284926, -16609455, -33282989, -66669660, -133507081, -267285605, -535010414, -1070731475
Offset: 0

Views

Author

Chandrakant N Phadte, Sep 18 2013

Keywords

Crossrefs

Cf. versions with different signs: A027974, A142585.

Programs

  • BASIC
    LET N=0
    LET L=0
    LET M=1
    PRINT L
    PRINT M
    FOR I=1 TO 30
    LET N=M+L-(2)^(I-1)
    PRINT N
    LET L=M
    LET M=N
    NEXT I
    END
    
  • Magma
    m:=30; R:=PowerSeriesRing(Integers(), m); [0] cat Coefficients(R!((1-3*x)/((1-2*x)*(1-x-x^2)))); // Bruno Berselli, Oct 03 2013
    
  • Magma
    I:=[0,1,0,-1,-5]; [n le 5 select I[n] else Self(n-1)+Self(n-2)-2^(n-3): n in [1..35]]; // Vincenzo Librandi, Oct 05 2013
  • Mathematica
    Table[LucasL[n + 1] - 2^n, {n, 0, 30}] (* Bruno Berselli, Oct 03 2013 *)
    CoefficientList[Series[x (1 - 3 x)/((1 - 2 x) (1 - x - x^2)), {x, 0, 40}], x](* Vincenzo Librandi, Oct 05 2013 *)
  • PARI
    a(n)=fibonacci(n)+fibonacci(n+2)-2^n \\ Charles R Greathouse IV, Oct 03 2013
    

Formula

G.f.: x*(1-3*x)/((1-2*x)*(1-x-x^2)).
a(n) = -(-1)^n*A142585(n+1) = A000032(n+1) - 2^n. [Bruno Berselli, Oct 03 2013]
a(n) = 3*a(n-1) -a(n-2) -2*a(n-3). [Bruno Berselli, Oct 03 2013]

Extensions

More terms from Bruno Berselli, Oct 03 2013
Showing 1-3 of 3 results.