-1
$\begingroup$

Is there a way to describe the sequence $2,2,1,0,0,1,2,2,1,0,0,1,2,2...$ by using the floor function?

I can describe the series using a sinusoidal function but wanted to get it in terms of a floor function for a tricky proof. The sinusoidal function is:

$u(n)=-\frac{2\sqrt{3}}{3}sin(\frac{\pi}{3}n-\pi)+1$

$\endgroup$
  • $\begingroup$ Any thoughts about the answer I posted yesterday, Joseph? $\endgroup$ – Gerry Myerson Oct 12 '18 at 1:09
  • $\begingroup$ Earth to Joseph, come in, please. $\endgroup$ – Gerry Myerson Oct 13 '18 at 11:49
  • 1
    $\begingroup$ @GerryMyerson thanks so much for the response and creative solution! Originally, I needed this series in an induction proof, but I could get around it by doing the proof by induction for every n=k+6 member and testing n=1,2,3,4,5,6. Either function would work but I stuck with the cosine because it ended up working out nicely with the math. Thank you a bunch though! $\endgroup$ – Joseph Schmidt Oct 31 '18 at 14:38
  • $\begingroup$ What cosine? I don't see any. $\endgroup$ – Gerry Myerson Nov 1 '18 at 8:47
  • $\begingroup$ sorry I meant the sin function $\endgroup$ – Joseph Schmidt Nov 7 '18 at 4:23
1
$\begingroup$

$\lfloor(n+5)/6\rfloor-\lfloor(n+4)/6\rfloor$ gives the sequence $1,0,0,0,0,0$ repeating. So what you want is $$2\lfloor{n+5\over6}\rfloor-2\lfloor{n+4\over6}\rfloor+2\lfloor{n+4\over6}\rfloor-2\lfloor{n+3\over6}\rfloor+\lfloor{n+3\over6}\rfloor-\lfloor{n+2\over6}\rfloor+\lfloor{n\over6}\rfloor-\lfloor{n-1\over6}\rfloor$$ which simplifies a little to $$2\lfloor{n+5\over6}\rfloor-\lfloor{n+3\over6}\rfloor-\lfloor{n+2\over6}\rfloor+\lfloor{n\over6}\rfloor-\lfloor{n-1\over6}\rfloor$$

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.