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
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)...
LINKS
Paolo Xausa, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (1,3,9).
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
KEYWORD
nonn,easy
AUTHOR
Gary Detlefs, Oct 06 2023
STATUS
approved