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

A247560 a(n) = 3*a(n-1) - 4*a(n-2) with a(0) = a(1) = 1.

Original entry on oeis.org

1, 1, -1, -7, -17, -23, -1, 89, 271, 457, 287, -967, -4049, -8279, -8641, 7193, 56143, 139657, 194399, 24569, -703889, -2209943, -3814273, -2603047, 7447951, 32756041, 68476319, 74404793, -50690897, -449691863, -1146312001, -1640168551, -335257649, 5554901257
Offset: 0

Views

Author

Michael Somos, Sep 19 2014

Keywords

Examples

			G.f. = 1 + x - x^2 - 7*x^3 - 17*x^4 - 23*x^5 - x^6 + 89*x^7 + 271*x^8 + ...
		

Crossrefs

Programs

  • Haskell
    a247560 n = a247560_list !! n
    a247560_list = 1 : 1 : zipWith (-) (map (* 3) $ tail a247560_list)
                                       (map (* 4) a247560_list)
    -- Reinhard Zumkeller, Sep 20 2014
    
  • Magma
    I:=[1, 1]; [n le 2 select I[n] else 3*Self(n-1) - 4*Self(n-2): n in [1..30]]; // G. C. Greubel, Aug 04 2018
  • Maple
    A247560:=n->simplify((1/14*I)*sqrt(7)*((3/2+(1/2*I)*sqrt(7))^n-(3/2-(1/2*I)*sqrt(7))^n)+1/2*((3/2+(1/2*I)*sqrt(7))^n+(3/2-(1/2*I)*sqrt(7))^n)): seq(A247560(n), n=0..40); # Wesley Ivan Hurt, Oct 02 2014
  • Mathematica
    a[ n_] := Re[ (1 - 1/Sqrt[-7]) (3 + Sqrt[-7])^n / 2^n];
    LinearRecurrence[{3,-4},{1,1},40] (* Harvey P. Dale, Jun 13 2017 *)
  • PARI
    {a(n) = real( (1 + quadgen(-7))^n )};
    
  • Sage
    [((1-1/sqrt(-7))*(3+sqrt(-7))^n/2^n).real() for n in range(34)] # Peter Luschny, Oct 02 2014 (after Somos)
    

Formula

G.f.: (1 - 2*x) / (1 - 3*x + 4*x^2).
a(n) = 3*a(n-1) - 4*a(n-2) for all n in Z.
a(n) = a(-1-n) * 2^(2*n + 1) for all n in Z.
a(n) = (-1)^n * A087168(n) for all n in Z.
A247565(n) = 2^n + a(n) for all n in Z.
a(n) = A247487(2*n + 1) = A247564(2*n + 1) for all n in Z.

A247565 a(n) = 5*a(n-1) - 10*a(n-2) + 8*a(n-3) with a(0) = 2, a(1) = a(2) = 3.

Original entry on oeis.org

2, 3, 3, 1, -1, 9, 63, 217, 527, 969, 1311, 1081, 47, -87, 7743, 39961, 121679, 270729, 456543, 548857, 344687, -112791, 380031, 5785561, 24225167, 66310473, 135585183, 208622521, 217744559, 87179049, -72570177, 507315097, 3959709647, 14144835849, 35185603551
Offset: 0

Views

Author

Michael Somos, Sep 20 2014

Keywords

Examples

			G.f. = 2 + 3*x + 3*x^2 + x^3 - x^4 + 9*x^5 + 63*x^6 + 217*x^7 + 527*x^8 + ...
		

Crossrefs

Programs

  • Magma
    m:=60; R:=PowerSeriesRing(Integers(), m); Coefficients(R!((2-7*x+8*x^2)/(1-5*x+10*x^2-8*x^3))); // G. C. Greubel, Aug 04 2018
  • Mathematica
    CoefficientList[Series[(2-7*x+8*x^2)/(1-5*x+10*x^2-8*x^3), {x, 0, 60}], x] (* or *) LinearRecurrence[{5,-10,8}, {2,3,3}, 60] (* G. C. Greubel, Aug 04 2018 *)
  • PARI
    {a(n) = 2^n + real( (1 + quadgen(-7))^n )};
    
  • PARI
    Vec((2 - 7*x + 8*x^2) / (1 - 5*x + 10*x^2 - 8*x^3) + O(x^50)) \\ Michel Marcus, Sep 22 2014
    

Formula

G.f.: (2 - 7*x + 8*x^2) / (1 - 5*x + 10*x^2 - 8*x^3).
(n) = a(-1-n) * 2^(2*n+1) for all n in Z.
a(n) = 2^n + A247560(n) for all n in Z.
a(n) = A247564(n+1) * A247564(n) for all n in Z.
0 = a(n)*(+4*a(n+1) + 2*a(n+2)) + a(n+1)*(-5*a(n+1) + a(n+2)) for all n in Z.
Showing 1-2 of 2 results.