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.

A280521 From the "Fibonachos" game: Number of phases of the following routine: during each phase, the player removes objects from a pile of n objects as the Fibonacci sequence until the pile contains fewer objects than the next Fibonacci number. The phases continue until the pile is empty.

This page as a plain text file.
%I A280521 #35 Apr 06 2025 14:56:22
%S A280521 1,1,2,1,2,2,1,2,2,3,2,1,2,2,3,2,3,3,2,1,2,2,3,2,3,3,2,3,3,4,3,2,1,2,
%T A280521 2,3,2,3,3,2,3,3,4,3,2,3,3,4,3,4,4,3,2,1,2,2,3,2,3,3,2,3,3,4,3,2,3,3,
%U A280521 4,3,4,4,3,2,3,3,4,3,4,4,3,4,4,5,4,3,2
%N A280521 From the "Fibonachos" game: Number of phases of the following routine: during each phase, the player removes objects from a pile of n objects as the Fibonacci sequence until the pile contains fewer objects than the next Fibonacci number. The phases continue until the pile is empty.
%C A280521 From the Fibonachos link: "Two people are sharing a plate of nachos. They take turns dividing the nachos, each taking the n-th Fibonacci number of nachos on the n-th turn. When the number of nachos left is less than the next Fibonacci number, they start the sequence over. What number of nachos (less than 500) requires the most number of restarts? How would you generate numbers of nachos with a high number of restarts?"
%C A280521 Ones appear at indices in A000071.
%C A280521 Also the number of iterations of A066628(n + 1) required to reach 0.
%H A280521 Charles R Greathouse IV, <a href="/A280521/b280521.txt">Table of n, a(n) for n = 1..10000</a>
%H A280521 N. J. A. Sloane, <a href="https://vimeo.com/201218446">Winter Fruits: New Problems from OEIS</a>. (Sequence mentioned from 12:50-19:50.)
%H A280521 Reddit user Teblefer, <a href="https://www.reddit.com/r/math/comments/5lxh3c">Fibonachos</a>
%e A280521 a(1) = 1 via [[1]];
%e A280521 a(2) = 1 via [[1, 1]];
%e A280521 a(3) = 2 via [[1, 1], [1]];
%e A280521 a(4) = 1 via [[1, 1, 2]];
%e A280521 a(5) = 2 via [[1, 1, 2], [1]];
%e A280521 a(6) = 2 via [[1, 1, 2], [1, 1]];
%e A280521 a(7) = 1 via [[1, 1, 2, 3]];
%e A280521 a(8) = 2 via [[1, 1, 2, 3], [1]];
%e A280521 a(9) = 2 via [[1, 1, 2, 3], [1, 1]];
%e A280521 a(10) = 3 via [[1, 1, 2, 3], [1, 1], [1]];
%e A280521 An example of counting iterations of A066628(n + 1) to reach zero:
%e A280521 a(10) = 3 because A066628(A066628(A066628(10 + 1) + 1) + 1) = 0. Fewer iterations fails to reach zero.
%p A280521 A280521 := proc(n)
%p A280521     local a,nres,i ;
%p A280521     a := 0 ;
%p A280521     nres := n;
%p A280521     while nres > 0 do
%p A280521         for i from 1 do
%p A280521             if A000071(i) > nres then
%p A280521                 break;
%p A280521             end if;
%p A280521         end do:
%p A280521         nres := nres-A000071(i-1) ;
%p A280521         a := a+1 ;
%p A280521     end do:
%p A280521     a ;
%p A280521 end proc:
%p A280521 seq(A280521(n),n=1..80) ; # _R. J. Mathar_, Mar 05 2017
%o A280521 (PARI) a(n)=my(s); while(n, my(k,t); while((t=fibonacci(k++))<=n, n-=t); s++); s \\ _Charles R Greathouse IV_, Jan 04 2017
%Y A280521 Cf. A000045, A000071, A066628, A280523 (records).
%Y A280521 See A280053 for other sequences based on this construction. - _N. J. A. Sloane_, Jan 07 2017
%K A280521 nonn
%O A280521 1,3
%A A280521 _Peter Kagey_, Jan 04 2017