The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation. Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A280053 "Nachos" sequence based on squares. 6
 1, 2, 3, 4, 1, 2, 3, 4, 5, 2, 3, 4, 5, 1, 2, 3, 4, 5, 2, 3, 4, 5, 6, 3, 4, 5, 6, 2, 3, 1, 2, 3, 4, 5, 2, 3, 4, 5, 6, 3, 4, 5, 6, 2, 3, 4, 5, 6, 3, 4, 5, 6, 7, 4, 1, 2, 3, 4, 5, 2, 3, 4, 5, 6, 3, 4, 5, 6, 2, 3, 4, 5, 6, 3, 4, 5, 6, 7, 4, 5, 6, 7, 3, 4, 2, 3, 4, 5, 6, 3 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 COMMENTS The nachos sequence based on a sequence of positive numbers S starting with 1 is defined as follows: To find a(n) we start with a pile of n nachos. During each phase, we successively remove S(1), then S(2), then S(3), ..., then S(i) nachos from the pile until fewer than S(i+1) remain. Then we start a new phase, successively removing S(1), then S(2), ..., then S(j) nachos from the pile until fewer than S(j+1) remain. Repeat. a(n) is the number of phases required to empty the pile. Suggested by the Fibonachos sequence A280521, which is the case when S is 1,1,2,3,5,8,13,... (A000045). If S = 1,2,3,4,5,... we get A057945. If S = 1,2,3,5,7,11,... (A008578) we get A280055. If S = triangular numbers we get A281367. If S = squares we get the present sequence. If S = powers of 2 we get A100661. Needs a more professional Maple program. Comment from Matthew C. Russell, Jan 30 2017 (Start): Theorem: Any nachos sequence based on a sequence S = {1=s1 < s2 < s3 < ...} is unbounded. Proof: S is the (infinite) set of numbers that we are allowed to subtract. (In the case of Fibonachos, this is the set of Fibonaccis themselves, not the partial sums.) Suppose that n is a positive integer, with the number of stages of the process denoted by a(n). Let s_m be the smallest element of S that is greater than n. Then, if you start the process at N = n + s1 + s2 + s3 + ... + s_(m-1), you will get stuck when you hit n, and will have to start the process over again. Thus you will take a(n) + 1 stages of the process here, so a(N) = a(n) + 1. (End) LINKS Lars Blomberg, Table of n, a(n) for n = 1..10000 Reddit user Teblefer, Fibonachos EXAMPLE If n = 10, in the first phase we successively remove 1, then 4 nachos, leaving 5 in the pile. The next square is 9, which is bigger than 5, so we start a new phase. We remove 1, then 4 nachos, and now the pile is empty. There were two phases, so a(10)=2. MAPLE S:=[seq(i^2, i=1..1000)]; phases := proc(n) global S; local a, h, i, j, ipass; a:=1; h:=n; for ipass from 1 to 100 do    for i from 1 to 100 do       j:=S[i];       if j>h then a:=a+1; break; fi;       h:=h-j;       if h=0 then return(a); fi;                        od; od; return(-1); end; t1:=[seq(phases(i), i=1..1000)]; # 2nd program A280053 := proc(n)     local a, nres, i ;     a := 0 ;     nres := n;     while nres > 0 do         for i from 1 do             if A000330(i) > nres then                 break;             end if;         end do:         nres := nres-A000330(i-1) ;         a := a+1 ;     end do:     a ; end proc: seq(A280053(n), n=1..80) ; # R. J. Mathar, Mar 05 2017 CROSSREFS Cf. A000045, A008578, A280521, A057945, A281367, A100661, A280055. For indices of first occurrences of 1,2,3,4,... see A280054. Sequence in context: A092196 A100878 A145172 * A283365 A053824 A033925 Adjacent sequences:  A280050 A280051 A280052 * A280054 A280055 A280056 KEYWORD nonn AUTHOR N. J. A. Sloane, Jan 07 2017 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified June 1 02:07 EDT 2020. Contains 334758 sequences. (Running on oeis4.)