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.

A107857 a(n) = floor[(phi + n mod 2)*a(n-1)], a(1)=1.

This page as a plain text file.
%I A107857 #31 May 04 2025 16:16:59
%S A107857 1,1,2,3,7,11,28,45,117,189,494,799,2091,3383,8856,14329,37513,60697,
%T A107857 158906,257115,673135,1089155,2851444,4613733,12078909,19544085,
%U A107857 51167078,82790071,216747219,350704367,918155952,1485607537,3889371025
%N A107857 a(n) = floor[(phi + n mod 2)*a(n-1)], a(1)=1.
%C A107857 A switched sequence with alternating limits of the golden mean and its square. The sequence uses only one initial term. Note that lim_{n->oo} a(n)/a(n-1) does not exist.
%C A107857 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
%H A107857 <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (1,4,-4,1,-1).
%F A107857 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
%F A107857 a(2n+2) = (1/2)*(Fib(3n+2) + 1), a(2n+1) = (1/2)*(Fib(3n+1) + 1).
%F A107857 a(n) = a(n-1) + 4*a(n-2) - 4*a(n-3) + a(n-4) - a(n-5). - _Wesley Ivan Hurt_, May 04 2025
%t A107857 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}]
%t A107857 LinearRecurrence[{1,4,-4,1,-1},{1,1,2,3,7},40] (* _Harvey P. Dale_, Mar 31 2023 *)
%o A107857 (PARI) a(n)=if(n<2,1,floor((phi+n%2)*a(n-1)))
%o A107857 (Magma) [ n eq 1 select 1 else Floor(((Sqrt(5)+1)/2+(n mod 2))*Self(n-1)): n in [1..35] ];
%Y A107857 Cf. A000045, A000201, A001950, A015448, A033887.
%K A107857 nonn,easy
%O A107857 1,3
%A A107857 _Roger L. Bagula_, Jun 12 2005
%E A107857 Edited and better name by _Ralf Stephan_, Nov 24 2010