%I #23 Jan 19 2019 04:15:43
%S 3,4,5,12,21,38,71,130,239,440,809,1488,2737,5034,9259,17030,31323,
%T 57612,105965,194900,358477,659342,1212719,2230538,4102599,7545856,
%U 13878993,25527448,46952297,86358738,158838483,292149518,537346739,988334740,1817830997,3343512476,6149678213,11311021686,20804212375
%N Tribonacci numbers: a(n) = a(n-1) + a(n-2) + a(n-3) with a(0)=3, a(1)=4, a(2)=5.
%C Like other tribonacci sequences, the digital root is period length 39, and is as follows: (3, 4, 5, 3, 3, 2, 8, 4, 5, 8, 8, 3, 1, 3, 7, 2, 3, 3, 8, 5, 7, 2, 5, 5, 3, 4, 3, 1, 8, 3, 3, 5, 2, 1, 8, 2, 2, 3, 7).
%C Completes the set of tribonacci numbers with 3,4,5 as initial terms, the others being (3,5,4), (4,5,3), (4,3,5), (5,3,4), and (5,4,3). The sum of each of the digital root periods in the above set is 162, except (4,3,5), which sums to 180; the sum of the digital root period of A081172 is also 180.
%C Each digital root period for tribonacci sequences has triple patterns in cycles of 13, such as period (1,4,7) or digital root of 4^n.
%H Vincenzo Librandi, <a href="/A280308/b280308.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 (1,1,1).
%F G.f.: (3+x-2*x^2)/(1-x-x^2-x^3). - _Vincenzo Librandi_, Jan 01 2017
%t RecurrenceTable[{a[n] == a[n - 1] + a[n - 2] + a[n - 3], a[0] == 3, a[1] == 4, a[2] == 5}, a, {n, 38}] (* _Michael De Vlieger_, Dec 31 2016 *)
%t LinearRecurrence[{1, 1, 1}, {3, 4, 5}, 40] (* _Vincenzo Librandi_, Jan 01 2017 *)
%Y Cf. A000073, A001590, A081172, A000213.
%K nonn,easy
%O 0,1
%A _Peter M. Chema_, Dec 31 2016