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

A156089 Alternating sum of the squares of the first n odd-indexed Fibonacci numbers.

Original entry on oeis.org

0, -1, 3, -22, 147, -1009, 6912, -47377, 324723, -2225686, 15255075, -104559841, 716663808, -4912086817, 33667943907, -230763520534, 1581676699827, -10840973378257, 74305136947968, -509294985257521, 3490759759854675
Offset: 0

Views

Author

Stuart Clary, Feb 04 2009

Keywords

Comments

Natural bilateral extension (brackets mark index 0): ..., 6912, -1009, 147, -22, 3, -1, [0], -1, 3, -22, 147, -1009, 6912, ... This is a(n)-reversed followed by a(n), without repeating the 0. That is, a(-n) = a(n).

Crossrefs

Programs

  • Magma
    A156089:= func< n | ((-1)^n*(Lucas(4*n)+3) - 5)/15 >; // G. C. Greubel, Jun 12 2025
    
  • Mathematica
    a[n_]:= If[n >= 0, Sum[(-1)^k Fibonacci[2k-1]^2, {k,n} ], -Sum[-(-1)^k Fibonacci[-2k+1]^2, {k,-n}]];
    Join[{0},Accumulate[Times@@@Partition[Riffle[Fibonacci[Range[1,43,2]]^2, {-1,1}],2]]] (* Harvey P. Dale, Aug 18 2011 *)
    LinearRecurrence[{-7,0,7,1}, {0,-1,3,-22}, 41] (* G. C. Greubel, Jun 12 2025 *)
  • SageMath
    def A156089(n): return ((-1)^n*(lucas_number2(4*n,1,-1)+3)-5)//15 # G. C. Greubel, Jun 12 2025

Formula

Let F(n) be the n-th Fibonacci number, A000045(n), and L(n) be the n-th Lucas number, A000032(n).
a(n) = Sum_{k=1..n} (-1)^k F(2*k-1)^2.
Closed form: a(n) = (-1)^n * (L(4*n) + 3)/15 - 1/3.
Factored closed form: a(n) = (1/3)*F(2*n)^2 if n is even.
Not-so-factored closed form: a(n) = -(F(2*n)^2 + 2)/3 if n is odd.
Recurrence: a(n) + 7*a(n-1) - 7*a(n-3) - a(n-4) = 0.
G.f.: -x*(1 + 4*x + x^2)/(1 + 7*x - 7*x^3 - x^4) = -x*(1 + 4*x + x^2)/((1 - x)*(1 + x)*(1 + 7*x + x^2)).
E.g.f.: (2/15)*( exp(-7*x/2)*cosh(3*sqrt(5)*x/2) - cosh(x) - 4*sinh(x) ). - G. C. Greubel, Jun 12 2025

A156090 Alternating sum of the squares of the first n Fibonacci numbers with index divisible by 3.

Original entry on oeis.org

0, -4, 60, -1096, 19640, -352460, 6324596, -113490320, 2036501104, -36543529620, 655747031980, -11766903046104, 211148507797800, -3788906237314396, 67989163763861220, -1220016041512187680, 21892299583455516896, -392841376460687116580
Offset: 0

Views

Author

Stuart Clary, Feb 04 2009

Keywords

Comments

Natural bilateral extension (brackets mark index 0): ..., -19640, 1096, -60, 4, 0, [0], -4, 60, -1096, 19640, -352460, ... This is (-a(n))-reversed followed by a(n). That is, a(-n) = -a(n-1).

Crossrefs

Programs

  • GAP
    a:=[0,-4,60,-1096];; for n in [5..20] do a[n]:=-16*a[n-1]+34*a[n-2]-16*a[n-3]-a[n-4]; od; a; # Muniru A Asiru, Sep 12 2018
    
  • Magma
    [(-1)^n*Fibonacci(6*n+3)/10 - (2*n + 1)/5: n in [0..20]]; // Vincenzo Librandi, Sep 12 2018
    
  • Maple
    with(combinat,fibonacci): a:=n->add((-1)^k*fibonacci(3*k)^2,k=1..n): seq(a(n), n=0..20); # Muniru A Asiru, Sep 12 2018
  • Mathematica
    a[n_]:= If[n >= 0, Sum[(-1)^k Fibonacci[3 k]^2, {k, 1, n}], Sum[-(-1)^k Fibonacci[-3 k]^2, {k, 1, -n-1}]];
    LinearRecurrence[{-16,34,-16,-1}, {0,-4,60,-1096}, 30] (* Harvey P. Dale, Oct 24 2016 *)
  • SageMath
    def A156090(n): return ((-1)^n*fibonacci(6*n+3) -2*(2*n+1))//10 # G. C. Greubel, Jun 12 2025

Formula

Let F(n) be the n-th Fibonacci number, A000045(n), then: (Start)
a(n) = Sum_{k=1..n} (-1)^k*F(3*k)^2.
Closed form: a(n) = (-1)^n*F(6*n+3)/10 - (2*n + 1)/5.
Recurrence: a(n) + 17*a(n-1) - 17*a(n-2) - a(n-3) = -8.
Recurrence: a(n) + 16*a(n-1) - 34*a(n-2) + 16*a(n-3) + a(n-4) = 0.
G.f.: -4*x*(1 + x)/(1 + 16*x - 34*x^2 + 16*x^3 + x^4) = -4*x(1 + x)/((1 - x)^2*(1 + 18*x + x^2)). (End)
Limit_{n -> oo} a(n)/a(n-1) = -(9 + sqrt(80)). - A.H.M. Smeets, Sep 11 2018
E.g.f.: (-1/(5*sqrt(5)))*( exp(-9*x)*(2*sinh(p*x) - sqrt(5)*cosh(p*x)) + sqrt(5)*(1 + 2*x)*exp(x) ), where p = 4*sqrt(5). - G. C. Greubel, Jun 12 2025

A203171 Alternating sum of the fourth powers of the first n even-indexed Fibonacci numbers.

Original entry on oeis.org

0, -1, 80, -4016, 190465, -8960160, 421021536, -19779631105, 929225609456, -43653851217680, 2050801968082945, -96344039926706496, 4526119083346841280, -212631252937414840321, 9989142769386670981520, -469277078911056723578480
Offset: 0

Views

Author

Stuart Clary, Dec 30 2011

Keywords

Comments

Natural bilateral extension (brackets mark index 0): ..., 8960160, -190465, 4016, -80, 1, 0, [0], -1, 80, -4016, 190465, -8960160, ... That is, a(-n) = -a(n-1).

Crossrefs

Programs

  • Maple
    with(combinat): A203171:=n->(-1)^n*(1/21)*fibonacci(2*n)*fibonacci(2*n+2)*(3*fibonacci(2*n+1)^2 - 5): seq(A203171(n), n=0..20); # Wesley Ivan Hurt, Jan 16 2017
  • Mathematica
    a[n_Integer] := (-1)^n (1/525)(3*LucasL[8n+4] - 28*LucasL[4n+2] + 63); Table[a[n], {n, 0, 20}]
  • PARI
    a(n) = sum(k=1, n, (-1)^k*fibonacci(2*k)^4); \\ Michel Marcus, Apr 16 2016

Formula

Let F(n) be the Fibonacci number A000045(n) and let L(n) be the Lucas number A000032(n).
a(n) = Sum_{k=1..n} (-1)^k * F(2*k)^4.
Closed form: a(n) = (-1)^n (1/525)(3 L(8n+4) - 28 L(4n+2) + 63).
Factored closed form: a(n) = (-1)^n (1/21) F(2n) F(2n+2) (3 F(2n+1)^2 - 5).
Alternate factored closed form: a(n) = (-1)^n (1/21) F(2n) F(2n+2) (3 F(2n) F(2n+2) - 2).
Recurrence: a(n) + 55 a(n-1) + 385 a(n-2) + 385 a(n-3) + 55 a(n-4) + a(n-5) = 0.
G.f.: A(x) = (-x + 25 x^2 - x^3)/(1 + 55 x + 385 x^2 + 385 x^3 + 55 x^4 + x^5) = -x(1 - 25 x + x^2)/((1 + x)(1 + 7 x + x^2)(1 + 47 x + x^2)).

A081079 a(n) = Lucas(4*n+2) - 3 = 5*Fibonacci(2*n)*Fibonacci(2*n+2).

Original entry on oeis.org

0, 15, 120, 840, 5775, 39600, 271440, 1860495, 12752040, 87403800, 599074575, 4106118240, 28143753120, 192900153615, 1322157322200, 9062201101800, 62113250390415, 425730551631120, 2918000611027440, 20000273725560975
Offset: 0

Views

Author

R. K. Guy, Mar 04 2003

Keywords

References

  • Hugh C. Williams, Edouard Lucas and Primality Testing, John Wiley and Sons, 1998, p. 75.

Crossrefs

Cf. A000032 (Lucas numbers), A000045 (Fibonacci numbers), A058038, A092521, A156088.

Programs

  • Magma
    A081079:= func< n | Lucas(4*n+2) -3 >; // G. C. Greubel, Jun 12 2025
    
  • Maple
    luc := proc(n) option remember: if n=0 then RETURN(2) fi: if n=1 then RETURN(1) fi: luc(n-1)+luc(n-2): end: for n from 0 to 40 do printf(`%d,`,luc(4*n+2)-3) od: # James Sellers, Mar 05 2003
  • Mathematica
    LinearRecurrence[{8,-8,1}, {0,15,120}, 20] (* Jean-François Alcover, Nov 29 2023 *)
  • SageMath
    def A081079(n): return lucas_number2(4*n+2,1,-1) -3 # G. C. Greubel, Jun 12 2025

Formula

a(n) = 8*a(n-1) - 8*a(n-2) + a(n-3).
From R. J. Mathar, Sep 03 2010: (Start)
a(n) = 15*A092521(n) = 5*A058038(n).
G.f.: 15*x/((1-x)*(1-7*x+x^2)). (End)
From G. C. Greubel, Jun 12 2025: (Start)
a(n) = 15*(-1)^n*A156088(n).
E.g.f.: exp(7*x/2)*( 3*cosh(3*sqrt(5)*x/2) - sqrt(5)*sinh(3*sqrt(5)*x/2) ) - 3*exp(x). (End)
Showing 1-4 of 4 results.