login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A316528 a(n) = 3*a(n-1) - a(n-2) - 2*a(n-3) for n > 2, a(0)=1, a(1)=4, a(2)=10. 3
1, 4, 10, 24, 54, 118, 252, 530, 1102, 2272, 4654, 9486, 19260, 38986, 78726, 158672, 319318, 641830, 1288828, 2586018, 5185566, 10393024, 20821470, 41700254, 83493244, 167136538, 334515862, 669424560, 1339484742, 2679997942, 5361659964, 10726012466, 21456381550 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,2

LINKS

Colin Barker, Table of n, a(n) for n = 0..1000

Index entries for linear recurrences with constant coefficients, signature (3,-1,-2).

FORMULA

G.f.: (1 + x - x^2)/((1 - 2*x)*(1 - x - x^2)).

a(n) = 2*A116712(n) for n > 0, a(0)=1.

a(n) = 5*2^n - 2*Fibonacci(n+3). - Bruno Berselli, Jul 16 2018

a(n) = (5*2^n - (2^(1-n)*((1-sqrt(5))^n*(-2+sqrt(5)) + (1+sqrt(5))^n*(2+sqrt(5))))/sqrt(5)). - Colin Barker, Jul 23 2018

EXAMPLE

Row sums of the triangle:

   1   ......................................    1

   2,  2   ..................................    4

   3,  4,  3   ..............................   10

   5,  7,  7,  5   ..........................   24

   8, 12, 14, 12,  8   ......................   54

  13, 20, 26, 26, 20, 13   ..................  118

  21, 33, 46, 52, 46, 33, 21   ..............  252

  34, 54, 79, 98, 98, 79, 54, 34   ..........  530, etc.

MAPLE

seq(coeff(series((1+x-x^2)/(1-3*x+x^2+2*x^3), x, n+1), x, n), n=0..35); # Muniru A Asiru, Jul 14 2018

MATHEMATICA

RecurrenceTable[{a[n] == 3 a[n - 1] - a[n - 2] - 2 a[n - 3], a[0] == 1, a[1] == 4, a[2] == 10}, a, {n, 0, 40}]

Table[5 2^n - 2 Fibonacci[n + 3], {n, 0, 40}] (* Bruno Berselli, Jul 16 2018 *)

PROG

(MAGMA) I:=[1, 4, 10]; [n le 3 select I[n] else 3*Self(n-1)-Self(n-2)-2*Self(n-3): n in [1..40]];

(GAP) a:=[1, 4, 10];; for n in [4..35] do a[n]:=3*a[n-1]-a[n-2]-2*a[n-3]; od; a; # Muniru A Asiru, Jul 14 2018

(PARI) Vec((1 + x - x^2)/((1 - 2*x)*(1 - x - x^2)) + O(x^40)) \\ Colin Barker, Jul 23 2018

CROSSREFS

Cf. A000045, A020714, A116712, A118658.

Sequence in context: A097976 A279851 A266367 * A152548 A273228 A291727

Adjacent sequences:  A316525 A316526 A316527 * A316529 A316530 A316531

KEYWORD

nonn,easy

AUTHOR

Vincenzo Librandi, Jul 14 2018

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified November 21 16:04 EST 2019. Contains 329371 sequences. (Running on oeis4.)