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.

A215502 a(n) = (1+sqrt(3))^n + (-2)^n + (1-sqrt(3))^n + 1.

Original entry on oeis.org

4, 1, 13, 13, 73, 121, 481, 1009, 3361, 7969, 24193, 61249, 177025, 464257, 1307137, 3493633, 9699841, 26190337, 72173569, 195941377, 537802753, 1464342529, 4010582017, 10937266177, 29920862209, 81665925121, 223274237953, 609678999553, 1666309128193
Offset: 0

Views

Author

Peter Luschny, Aug 13 2012

Keywords

Crossrefs

Programs

  • Magma
    [Round((1+Sqrt(3))^n + (-2)^n + (1-Sqrt(3))^n + 1): n in [0..30]]; // G. C. Greubel, Apr 23 2018
  • Maple
    A215502 := n -> 1+(1+sqrt(3))^n+(-2)^n+(1-sqrt(3))^n;
    seq(simplify(A215502(i)),i=0..28);
  • Mathematica
    Simplify/@Table[(1+Sqrt[3])^n+(1-Sqrt[3])^n+1+(-2)^n,{n,0,30}] (* or *) LinearRecurrence[{1,6,-2,-4},{4,1,13,13},30] (* Harvey P. Dale, Mar 12 2013 *)
  • PARI
    x='x+O('x^30); Vec((4-3*x-12*x^2+2*x^3)/((1-x)*(1+2*x)*(1-2*x-2*x^2))) \\ G. C. Greubel, Apr 23 2018
    

Formula

From Colin Barker, Aug 20 2012: (Start)
a(n) = a(n-1) +6*a(n-2) -2*a(n-3) -4*a(n-4).
G.f.: (4-3*x-12*x^2+2*x^3)/((1-x)*(1+2*x)*(1-2*x-2*x^2)). (End)

A215503 a(n) = (u+1)^n + (-s-1)^n + (t+1)^n + (-1)^n + (-t+1)^n + (s-1)^n + (-u+1)^n where s = sqrt(2), t = sqrt(2-s), u = sqrt(2+s).

Original entry on oeis.org

7, 1, 19, 13, 111, 121, 763, 1093, 5575, 9697, 42099, 84173, 324591, 717081, 2538331, 6023173, 20049671, 50079553, 159514963, 413387789, 1275778031, 3394968121, 10242581819, 27780675397, 82461727687, 226743641121, 665232392883, 1847286687181, 5374409263215
Offset: 0

Views

Author

Peter Luschny, Aug 13 2012

Keywords

Crossrefs

Programs

  • Magma
    I:=[7,1,19,13,111,121,763]; [n le 7 select I[n] else Self(n-1) + 9*Self(n-2) -5*Self(n-3) -17*Self(n-4) + Self(n-5) + 5*Self(n-6) - Self(n-7): n in [1..30]]; // G. C. Greubel, Apr 23 2018
  • Maple
    A215503 := n -> (sqrt(2+sqrt(2))+1)^n+(-sqrt(2)-1)^n+(sqrt(2-sqrt(2))+1)^n+(-1)^n+(-sqrt(2-sqrt(2))+1)^n+(sqrt(2)-1)^n+(-sqrt(2+sqrt(2))+1)^n;
    seq(simplify(A215503(i)),i=0..28);
  • Mathematica
    LinearRecurrence[{1,9,-5,-17,1,5,-1}, {7,1,19,13,111,121,763}, 50] (* G. C. Greubel, Apr 23 2018 *)
  • PARI
    x='x+O('x^30); Vec((7-6*x-45*x^2+20*x^3+51*x^4 -2*x^5-5*x^6)/( (1+x)*(1+2*x-x^2)*(1 -4*x +2*x^2 +4*x^3-x^4))) \\ G. C. Greubel, Apr 23 2018
    
  • PARI
    polsym(polrecip(((1+x)*(1+2*x-x^2)*(1-4*x+2*x^2+4*x^3-x^4))),33) \\ Joerg Arndt, Apr 29 2018
    
  • Sage
    def A215503(n) :
        return (sqrt(2+sqrt(2))+1)^n+(-sqrt(2)-1)^n+(sqrt(2-sqrt(2))+1)^n+(-1)^n+(-sqrt(2-sqrt(2))+1)^n+(sqrt(2)-1)^n+(-sqrt(2+sqrt(2))+1)^n
    [A215503(i).round() for i in (0..28)]
    

Formula

a(n) = (sqrt(2 + sqrt(2)) + 1)^n + (-sqrt(2) - 1)^n + (sqrt(2 - sqrt(2)) + 1)^n + (-1)^n + (-sqrt(2 - sqrt(2)) + 1)^n + (sqrt(2) - 1)^n + (-sqrt(2 + sqrt(2)) + 1)^n. (Initial name of sequence).
a(n) = a(n-1) + 9*a(n-2) - 5*a(n-3) - 17*a(n-4) + a(n-5) + 5*a(n-6) - a(n-7).
G.f.: (7-6*x-45*x^2+20*x^3+51*x^4-2*x^5-5*x^6)/((1+x)*(1+2*x-x^2)*(1 -4*x +2*x^2+4*x^3-x^4)). - Colin Barker, Aug 20 2012

Extensions

New name from Altug Alkan, Apr 27 2018
Showing 1-2 of 2 results.