OFFSET
0,3
COMMENTS
See A377109 for a guide to related sequences.
LINKS
FORMULA
a(n) = 3*a(n-1) + 3*a(n-2) + a(n-3), with a(0)=1, a(1)=1, a(3)=5. [Corrected by Jianing Song, Oct 31 2024]
G.f.: (-1 + 2 x + x^2)/(-1 + 3 x + 3 x^2 + x^3).
EXAMPLE
((1 + 2^(1/3) + 2^(2/3)))^3 = 19 + 15 2^(1/3) + 12 2^(2/3), so a(3) = 19.
MATHEMATICA
tbl = Table[Expand[(1 + 2^(1/3) + 2^(2/3))^n], {n, 0, 24}];
Take[tbl, 6]
u = MapApply[{#1/#2, #2} /. {1, #} -> {{1}, {#}} &,
Map[({#1, #1 /. _^_ -> 1} &), Map[(Apply[List, #1] &), tbl]]];
{s1, s2, s3} = Transpose[(PadRight[#1, 3] &) /@ Last /@ u][[1 ;; 3]];
s1 (* Peter J. C. Moses, Oct 16 2024 *)
(* Program 2 generates (a(n)) for n>=1. *)
LinearRecurrence[{3, 3, 1}, {1, 1, 5}, 15]
CROSSREFS
KEYWORD
nonn
AUTHOR
Clark Kimberling, Oct 26 2024
STATUS
approved