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.

A134299 Maximal length of a sequence such that v(0)=n, v(k+2) = v(k)-v(k+1), v(k) >= 0.

This page as a plain text file.
%I A134299 #14 Dec 23 2024 14:53:42
%S A134299 4,5,6,5,7,6,5,8,6,7,6,6,9,6,7,8,6,7,6,7,10,6,7,8,7,9,6,7,8,7,7,8,7,
%T A134299 11,7,7,8,7,9,8,7,10,7,7,8,7,9,8,7,8,7,9,8,7,12,8,7,8,7,9,8,7,10,8,9,
%U A134299 8,7,11,8,7,8,8,9,8,7,10,8,9,8,8,9,8,7,10,8,9,8,8,13,8,9,8,8,9,8,8,10,8,9,8
%N A134299 Maximal length of a sequence such that v(0)=n, v(k+2) = v(k)-v(k+1), v(k) >= 0.
%C A134299 This is also the maximal index at which n can occur in a Fibonacci-like sequence u(k+2) = u(k)+u(k+1) of nonnegative numbers.
%C A134299 A sequence of this length is obtained for v(0) = n, v(1) = A019446(n) = ceiling(n/tau) or A060143(n) = floor(n/tau).
%H A134299 Eric Angelini, Max Alekseyev and M. F. Hasler, <a href="https://web.archive.org/web/*/http://list.seqfan.eu/pipermail/seqfan/2007-October/thread.html#12918">Longest Lucas sequence from start to n</a>, postings to Sequence Fans mailing list, Oct 18, 2007.
%e A134299 a(2007)=11 since there is no such sequence longer than v = (2007, 1240, 767, 473, 294, 179, 115, 64, 51, 13, 38).
%o A134299 (PARI) A134299( goal, mi=0, mx=0, new=0 ) = { for( j=mi,goal, a=[goal,new=j]; while( mi<=new=a[ #a-1]-new, a=concat(a,new)); if( #a>mx, mx=#a)); mx }
%Y A134299 Cf. A101803, A019446, A060143.
%K A134299 nonn
%O A134299 1,1
%A A134299 _M. F. Hasler_, Oct 18 2007