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.

A084179 Expansion of the g.f. x/((1+2x)(1-x-x^2)).

Original entry on oeis.org

0, 1, -1, 4, -5, 15, -22, 57, -93, 220, -385, 859, -1574, 3381, -6385, 13380, -25773, 53143, -103702, 211585, -416405, 843756, -1669801, 3368259, -6690150, 13455325, -26789257, 53774932, -107232053, 214978335, -429124630, 859595529, -1717012749, 3437550076
Offset: 0

Views

Author

Paul Barry, May 18 2003

Keywords

Comments

Sums of consecutive pairs yield A084178.
Number of walks of length n+1 between two vertices at distance 2 in the cycle graph C_5. In general a(n,m) = 2^n/m*Sum_{k=0..m-1} cos(4*Pi*k/m)*cos(2*Pi*k/m)^n is the number of walks of length n between two vertices at distance 2 in the cycle graph C_m. - Herbert Kociemba, May 31 2004

Crossrefs

Programs

  • Magma
    I:=[0,1,-1]; [n le 3 select I[n] else -Self(n-1)+3*Self(n-2)+2*Self(n-3): n in [1..45]]; // Vincenzo Librandi, Nov 10 2014
    
  • Maple
    f:= gfun:-rectoproc({a(n) = -a(n-1)+3*a(n-2)+2*a(n-3),
       a(0)=0,a(1)=1,a(2)=-1},a(n),remember):
    seq(f(n), n=0..100); # Robert Israel, Dec 11 2015
  • Mathematica
    CoefficientList[Series[x / ((1 + 2 x) (1 - x - x^2)), {x, 0, 40}], x] (* Vincenzo Librandi, Nov 10 2014 *)
  • PARI
    concat(0, Vec(x/((1+2*x)*(1-x-x^2)) + O(x^100))) \\ Altug Alkan, Dec 11 2015

Formula

Binomial transform is A007598. The unsigned sequence has G.f. x/((1-2x)(1+x-x^2)) with a(n) = 2*2^n/5-(-1)^n*A000032(n)/5. - Paul Barry, Apr 17 2004
a(n) = Sum_{k=0..n} (-1)^(n-k)*C(n, k)*Fib(k)^2; a(n) = ((1/2-sqrt(5)/2)^n+(1/2+sqrt(5)/2)^n-2(-2)^n)/5; a(n) = A000032(n)/5-2(-2)^n/5. - Paul Barry, Apr 17 2004
a(n) = 2^n/5*Sum_{k=0..4} cos(4*Pi*k/5)*cos(2*Pi*k/5)^n. - Herbert Kociemba, May 31 2004
a(n) = -a(n-1) + 3*a(n-2) + 2*a(n-3) for n>2. - Paul Curtz, Mar 09 2008

A098703 a(n) = (3^n + phi^(n-1) + (-phi)^(1-n)) / 5, where phi denotes the golden ratio A001622.

Original entry on oeis.org

0, 1, 2, 6, 17, 50, 148, 441, 1318, 3946, 11825, 35454, 106328, 318929, 956698, 2869950, 8609617, 25828474, 77484812, 232453449, 697358750, 2092073666, 6276216817, 18828643686, 56485920112, 169457742625, 508373199218, 1525119551286
Offset: 0

Views

Author

Ross La Haye, Oct 27 2004

Keywords

Comments

Sums of antidiagonals of A090888.
Partial sums of A099159.
Form an array with m(0,n) = A000045(n), the Fibonacci numbers, and m(i,j) = Sum_{kJ. M. Bergot, May 27 2013

Examples

			a(2) = 2 because 3^2 = 9, Luc(1) = 1 and (9 + 1) / 5 = 2.
		

Crossrefs

Programs

  • Magma
    I:=[0,1,2]; [n le 3 select I[n] else 4*Self(n-1)-2*Self(n-2)-3*Self(n-3): n in [1..40]]; // Vincenzo Librandi, Feb 18 2018
    
  • Mathematica
    f[n_] := (3^n + Fibonacci[n] + Fibonacci[n - 2])/5; Table[ f[n], {n, 0, 27}] (* Robert G. Wilson v, Nov 04 2004 *)
    LinearRecurrence[{4, -2, -3}, {0, 1, 2}, 30] (* Jean-François Alcover, Feb 17 2018 *)
  • SageMath
    def A098703(n): return (3**n + lucas_number2(n-1,1,-1))//5
    print([A098703(n) for n in range(21)]) # G. C. Greubel, Jun 02 2025

Formula

a(n) = (((1 + sqrt(5))^n - (1 - sqrt(5))^n) / (2^n*sqrt(5))) + ((3^n - (((1 + sqrt(5)) / 2)^(n+1) + ((1 - sqrt(5)) / 2)^(n+1))) / 5).
a(n) = (3^n + (((1 + sqrt(5)) / 2)^(n-1) + ((1 - sqrt(5)) / 2)^(n-1))) / 5.
a(n) = (3^n + A000032(n-1))/5 = A000045(n) + (3^n - A000032(n+1))/5.
a(n) = (3^n + A000045(n) + A000045(n-2))/5.
a(n) = (3^n + 4*A000045(n) - A000045(n+2))/5.
a(n) = Sum_{k=0...n-1} (A000045(k)*3^(n-k-1) - A000045(k-2)*2^(n-k-1)).
a(n) = 4*a(n-1) - 2*a(n-2) - 3*a(n-3).
a(n) = A000045(n) + A094688(n-1).
a(n) = 3^1 * a(n-1) - A000045(n-3), for n > 2.
a(n) = 3^2 * a(n-2) - A000285(n-4), for n > 3.
a(n) = 3^3 * a(n-3) - A022383(n-5), for n > 4.
Limit_{n -> oo} a(n) / a(n-1) = 3.
From Ross La Haye, Dec 21 2004: (Start)
a(n) = A101220(1,3,n).
Binomial transform of unsigned A084178.
Binomial transform of signed A084178 gives the Fibonacci oblongs (A001654). (End)
G.f.: x*(1-2*x)/((1-3*x)*(1-x-x^2)). - Ross La Haye, Aug 09 2005
a(0) = 0, a(1) = 1, a(n) = a(n-1) + a(n-2) + 3^(n-2) for n > 1. - Ross La Haye, Aug 20 2005
Binomial transform of A052964 beginning {0,1,0,3,1,10,...}. - Ross La Haye, May 31 2006

Extensions

More terms from Robert G. Wilson v, Nov 04 2004
More terms from Ross La Haye, Dec 21 2004
Showing 1-2 of 2 results.