login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

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.
5

%I #29 Dec 18 2020 15:00:51

%S 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 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 4,3,4,4,3,2,3,3,4,3,4,4,3,4,4,5,4,3,2

%N 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 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 Ones appear at indices in A000071.

%C Also the number of iterations of A066628(n + 1) required to reach 0.

%H Charles R Greathouse IV, <a href="/A280521/b280521.txt">Table of n, a(n) for n = 1..10000</a>

%H Reddit user Teblefer, <a href="https://www.reddit.com/r/math/comments/5lxh3c">Fibonachos</a>

%e a(1) = 1 via [[1]];

%e a(2) = 1 via [[1, 1]];

%e a(3) = 2 via [[1, 1], [1]];

%e a(4) = 1 via [[1, 1, 2]];

%e a(5) = 2 via [[1, 1, 2], [1]];

%e a(6) = 2 via [[1, 1, 2], [1, 1]];

%e a(7) = 1 via [[1, 1, 2, 3]];

%e a(8) = 2 via [[1, 1, 2, 3], [1]];

%e a(9) = 2 via [[1, 1, 2, 3], [1, 1]];

%e a(10) = 3 via [[1, 1, 2, 3], [1, 1], [1]];

%e An example of counting iterations of A066628(n + 1) to reach zero:

%e a(10) = 3 because A066628(A066628(A066628(10 + 1) + 1) + 1) = 0. Fewer iterations fails to reach zero.

%p A280521 := proc(n)

%p local a,nres,i ;

%p a := 0 ;

%p nres := n;

%p while nres > 0 do

%p for i from 1 do

%p if A000071(i) > nres then

%p break;

%p end if;

%p end do:

%p nres := nres-A000071(i-1) ;

%p a := a+1 ;

%p end do:

%p a ;

%p end proc:

%p seq(A280521(n),n=1..80) ; # _R. J. Mathar_, Mar 05 2017

%o (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 Cf. A000045, A000071, A066628, A280523 (records).

%Y See A280053 for other sequences based on this construction. - _N. J. A. Sloane_, Jan 07 2017

%K nonn

%O 1,3

%A _Peter Kagey_, Jan 04 2017