login
A107857
a(n) = floor[(phi + n mod 2)*a(n-1)], a(1)=1.
5
1, 1, 2, 3, 7, 11, 28, 45, 117, 189, 494, 799, 2091, 3383, 8856, 14329, 37513, 60697, 158906, 257115, 673135, 1089155, 2851444, 4613733, 12078909, 19544085, 51167078, 82790071, 216747219, 350704367, 918155952, 1485607537, 3889371025
OFFSET
1,3
COMMENTS
A switched sequence with alternating limits of the golden mean and its square. The sequence uses only one initial term. Note that Limit[a[n]/a[n-1],n->Infinity] does not exist.
The consecutive pairs (2,3), (7,11), (28,45) occur as pairs in columns 2 and 3 of the Wythoff array, A035513. Suppose (l(n)) and (u(n)) are the lower and upper Beatty sequences of positive irrational numbers r<s, where 1/r+1/s=1. Write l for (l(n)), lu for (l(u(n))), ulu for u(l(u(n)))), etc. Then this sequence is (u, lu, ulu, lulu, ...) = ([s], [r[s]], [s[r[s]]], ...), where [ ] denotes the floor function. For this sequence, r is the golden mean. -- Clark Kimberling, Nov 24 2010
FORMULA
G.f. -x*(-1+3*x^2-x^3+x^4) / ( (x-1)*(x^4+4*x^2-1) ). - R. J. Mathar, Sep 11 2011
a(2n+2) = (1/2)*(Fib(3n+2) + 1), a(2n+1) = (1/2)*(Fib(3n+1) + 1).
MATHEMATICA
Phi = N[(Sqrt[5] + 1)/2] F[1] = 1; F[n__] := F[n] = If[Mod[n, 2] == 0, Floor[Phi*F[n - 1]], Floor[(Phi + 1)*F[n -1]]] a = Table[F[n], {n, 1, 50}]
LinearRecurrence[{1, 4, -4, 1, -1}, {1, 1, 2, 3, 7}, 40] (* Harvey P. Dale, Mar 31 2023 *)
PROG
(PARI) a(n)=if(n<2, 1, floor((phi+n%2)*a(n-1)))
(Magma) [ n eq 1 select 1 else Floor(((Sqrt(5)+1)/2+(n mod 2))*Self(n-1)): n in [1..35] ];
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Roger L. Bagula, Jun 12 2005
EXTENSIONS
Edited and better name by Ralf Stephan, Nov 24 2010
STATUS
approved