login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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.
5
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, 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, 4, 3, 4, 4, 3, 2, 3, 3, 4, 3, 4, 4, 3, 4, 4, 5, 4, 3, 2
OFFSET
1,3
COMMENTS
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?"
Ones appear at indices in A000071.
Also the number of iterations of A066628(n + 1) required to reach 0.
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
Reddit user Teblefer, Fibonachos
EXAMPLE
a(1) = 1 via [[1]];
a(2) = 1 via [[1, 1]];
a(3) = 2 via [[1, 1], [1]];
a(4) = 1 via [[1, 1, 2]];
a(5) = 2 via [[1, 1, 2], [1]];
a(6) = 2 via [[1, 1, 2], [1, 1]];
a(7) = 1 via [[1, 1, 2, 3]];
a(8) = 2 via [[1, 1, 2, 3], [1]];
a(9) = 2 via [[1, 1, 2, 3], [1, 1]];
a(10) = 3 via [[1, 1, 2, 3], [1, 1], [1]];
An example of counting iterations of A066628(n + 1) to reach zero:
a(10) = 3 because A066628(A066628(A066628(10 + 1) + 1) + 1) = 0. Fewer iterations fails to reach zero.
MAPLE
A280521 := proc(n)
local a, nres, i ;
a := 0 ;
nres := n;
while nres > 0 do
for i from 1 do
if A000071(i) > nres then
break;
end if;
end do:
nres := nres-A000071(i-1) ;
a := a+1 ;
end do:
a ;
end proc:
seq(A280521(n), n=1..80) ; # R. J. Mathar, Mar 05 2017
PROG
(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
CROSSREFS
Cf. A000045, A000071, A066628, A280523 (records).
See A280053 for other sequences based on this construction. - N. J. A. Sloane, Jan 07 2017
Sequence in context: A267135 A140223 A308694 * A278043 A014643 A236265
KEYWORD
nonn
AUTHOR
Peter Kagey, Jan 04 2017
STATUS
approved