login
Consider the succession rule (x, y, z) -> (z, y+z, x+y+z). Sequence gives z values starting at (0, 1, 2).
1

%I #50 Jan 23 2021 17:28:19

%S 2,3,8,17,39,87,196,440,989,2222,4993,11219,25209,56644,127278,285991,

%T 642616,1443945,3244515,7290359,16381288,36808420,82707769,185842670,

%U 417584689,938304279,2108350577,4737420744,10644887786,23918845739,53745158520,120764274993

%N Consider the succession rule (x, y, z) -> (z, y+z, x+y+z). Sequence gives z values starting at (0, 1, 2).

%C The rule can be generalized for any number of starting terms s: (xs, ..., x2, x1) -> (x1, x1 + x2, ..., x1 + x2 + ... + xs), using (0, 1, ..., s-1) as seed values. This sequence is s=3, and s=2 yields the Fibonacci series.

%C For s=3 the ratio of S1 (the first in the sub-series) to S3 (the 3rd in the sub-series) converges on 2.2469796 and the ration of S2 (the 2nd in the sub-series) to S3 converges on 1.2469796 thus the difference, S2-S3, converges on 1 regardless of the seed values used.

%C For s=20 the series is: 19, 190, 2660, 33915, 445949, ....

%C a(n-2) is the top left entry of the n-th power of the 3 X 3 matrix [0, 1, 1; 1, 1, 1; 1, 0, 1] or of the 3 X 3 matrix [0, 1, 1; 1, 1, 0; 1, 1, 1]. - _R. J. Mathar_, Feb 03 2014

%C From _Andrew Pharo_, Jun 02 2014: (Start)

%C For s=2 the ratio of successive terms is 1.6180339887... or phi (or phi(2));

%C for s=3 this ratio is 2.24697960412319..., phi(3) = 4*cos(Pi/7)^2-1 (see Falbo link);

%C for s=4 this ratio is 3.5133370918694...;

%C for s=20 this ratio is 13.0538985560545... and so on.

%C We can define a function phi(s) which approximates to:

%C phi(s) ~ phi(2) + theta*(s-2) where theta ~ 0.636264133.

%C (End)

%H Michael De Vlieger, <a href="/A219788/b219788.txt">Table of n, a(n) for n = 1..2844</a>

%H Clement Falbo, <a href="http://www.sonoma.edu/Math/Faculty/falbo/cmj123-134">The Golden Ratio - A Contrary Viewpoint</a>, Vol. 36, No. 2, March 2005, The College Mathematics Journal.

%H Y-h. Guo, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL15/Guo/guo4.html">Some n-Color Compositions</a>, J. Int. Seq. 15 (2012) 12.1.2, eq. (10) and Theorem 8.

%H Brian Hopkins, Hua Wang, <a href="https://arxiv.org/abs/2003.05291">Restricted Color n-color Compositions</a>, arXiv:2003.05291 [math.CO], 2020.

%H R. Sachdeva and A. K. Agarwal, <a href="https://doi.org/10.1016/j.disc.2016.09.009">Combinatorics of certain restricted n-color composition functions</a>, Discrete Mathematics, 340, (2017), 361-372.

%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (2,1,-1).

%F a(n) = 2a(n-1) + a(n-2) - a(n-3). - _Charles R Greathouse IV_, Nov 28 2012

%F The essentially identical sequence 1,0,2,3,8,17,39,... with offset 0 is defined by a(n) = 2a(n-1) + a(n-2) - a(n-3) with initial terms a(0)=1, a(1)=0, a(2)=2. - _N. J. A. Sloane_, Jan 16 2017

%F G.f.: -x*(-2+x) / ( 1-2*x-x^2+x^3 ). - _R. J. Mathar_, Feb 03 2014

%F a(n) = 2*A006054(n+1)-A006054(n). - _R. J. Mathar_, Aug 22 2016

%e The seed values are (0,1,2), giving a(1) = 2. (2, 2+1, 2+1+0) is the next triple, giving a(2) = 2+1+0 = 3. (3, 6, 8) is next, yielding a(3) = 8. The triples that follow begin (8,14,17), (17,31,39), etc.

%t Rest@ CoefficientList[Series[-x (-2 + x)/(1 - 2 x - x^2 + x^3), {x, 0, 32}], x] (* _Michael De Vlieger_, Jun 17 2020 *)

%t sr[{x_,y_,z_}]:={z,y+z,x+y+z}; NestList[sr,{0,1,2},40][[All,3]] (* _Harvey P. Dale_, Aug 18 2020 *)

%o (PARI) first(n)=my(x=0,y=1,z=2,v=List([z])); for(i=2, n, [x,y,z]=[z, y+z, x+y+z]; listput(v,c)); Vec(v) \\ _Charles R Greathouse IV_, Nov 28 2012

%K nonn,easy

%O 1,1

%A _Andrew Pharo_, Nov 27 2012