login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A366314
a(n) = a(n-1) + 3*a(n-2) + 9*a(n-3) with a(0)=0, a(1)=1, a(2)=4.
1
0, 1, 4, 7, 28, 85, 232, 739, 2200, 6505, 19756, 59071, 176884, 531901, 1594192, 4781851, 14351536, 43044817, 129136084, 387434359, 1162245964, 3486773797, 10460420920, 31380955987, 94143182920, 282429839161, 847287991804, 2541866155567, 7625598683428, 22876789076365, 68630380526752
OFFSET
0,3
COMMENTS
This sequence could be considered a companion sequence to A103770, in that both sequences are manifested in the averaging of a Tribonacci sequence with initial seeds of x, y, z.
If f(n) is a third order recurrence with f(0)=x, f(1)=y, f(2)=z, and f(n) = (f(n-1)+f(n-2)+f(n-3))/3,n>2, then
f(n) =(A103770(n-2)*z + a(n-1)*y + A103770(n-3)x)/3^(n-2).
In the general case, these "averaging" sequences will approach a limit of (x+2*y+3*z)/6.
a(n) mod 9 repeats [1,4,7] from offset 1 = A100402(n-1)...
FORMULA
From Stefano Spezia, Oct 15 2023: (Start)
G.f.: x*(1 + 3*x)/((1 - 3*x)*(1 + 2*x + 3*x^2)).
a(n) = (4*3^n + (-2 - sqrt(2)*i)*(-1 - sqrt(2)*i)^n + i*(-1 + sqrt(2)*i)^n*(2*i + sqrt(2)))/12, where i denotes the imaginary unit. (End)
EXAMPLE
Starting with initial terms of x, y, z, the sequence proceeds:
(z + y + x)/3
(4z + 4y +x)/9
(16z + 7y + 4x)/27
(37z + 28y + 16x)/81
(121z + 85y + 37x)/243
....
MAPLE
a:= proc(n) option remember; if n < 3 then n^2 else a(n-1)+3*a(n-2)+9*a(n-3) fi end: seq(a(n), n=0..30);
MATHEMATICA
LinearRecurrence[{1, 3, 9}, {0, 1, 4}, 50] (* Paolo Xausa, Nov 14 2023 *)
CROSSREFS
Cf. A103770.
Sequence in context: A149078 A149079 A149080 * A176966 A117977 A272870
KEYWORD
nonn,easy
AUTHOR
Gary Detlefs, Oct 06 2023
STATUS
approved