login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A123189 a(0) = 0, a(1) = 1, a(2)=1; a(n) = 3a(n-1) + 3a(n-2) - 4a(n-3) for n >= 3. 1

%I #20 Aug 12 2023 12:37:05

%S 0,1,1,6,17,65,222,793,2785,9846,34721,122561,432462,1526185,5385697,

%T 19005798,67069745,236683841,835237566,2947485241,10401433057,

%U 36705804630,129531772097,457106997953,1613093091630,5692473180361

%N a(0) = 0, a(1) = 1, a(2)=1; a(n) = 3a(n-1) + 3a(n-2) - 4a(n-3) for n >= 3.

%C a(n) is the sum of the upper-left and the upper-middle element of {{3,3,-4},{1,0,0},{0,1,0}}^(n-2). - _Jianing Song_, Aug 11 2023

%H Jianing Song, <a href="/A123189/b123189.txt">Table of n, a(n) for n = 0..1000</a>

%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (3,3,-4).

%F G.f.: (x-2*x^2)/(1-3*x-3*x^2+4*x^3). - _Jianing Song_, Aug 11 2023

%p a[1]:=1: a[2]:=1: a[3]:=6: for n from 4 to 25 do a[n]:=3*a[n-1]+3*a[n-2]-4*a[n-3] od: seq(a[n],n=1..25);

%t M = {{1, -2, 1}, {-2, 2, 0}, {1, 1, 0}} v[1] = {1, 0, 0} v[n_] := v[n] = M.v[n - 1]; a1 = Table[v[n][[1]], {n, 1, 50}]

%o (PARI) a(n) = my(Mn=[3,3,-4;1,0,0;0,1,0]^(n-2)); Mn[1,1]+Mn[1,2] \\ _Jianing Song_, Aug 11 2023

%K nonn

%O 0,4

%A _Roger L. Bagula_, Oct 03 2006

%E Edited by _N. J. A. Sloane_, Oct 08 2006

%E Added initial a(0) = 0 at the suggestion of _Jianing Song_. - _N. J. A. Sloane_, Aug 12 2023

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 14:49 EDT 2024. Contains 371914 sequences. (Running on oeis4.)