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.

A366314 a(n) = a(n-1) + 3*a(n-2) + 9*a(n-3) with a(0)=0, a(1)=1, a(2)=4.

Original entry on oeis.org

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

Views

Author

Gary Detlefs, Oct 06 2023

Keywords

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)...

Examples

			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
  ....
		

Crossrefs

Cf. A103770.

Programs

  • 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 *)

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)