Ask your own question, for FREE!
Mathematics 16 Online
OpenStudy (anonymous):

Is there a formula that takes n such that n is an integer that will return 0,1,0,1,0 ie f(0) = 0, f(1) = 1, f(2) = 0, etc?

OpenStudy (amistre64):

sure

OpenStudy (amistre64):

sin(n*pi/2) is a good start 0,1,0,-1,0,1,0,-1,...

OpenStudy (amistre64):

but youd have to incorporate a control for those -1s

OpenStudy (amistre64):

|sin(n*pi/2)| could work :)

OpenStudy (amistre64):

sin^2(n*pi/2) as well

OpenStudy (anonymous):

Maybe u could use (-1)^n somehow...

OpenStudy (amistre64):

thought about that but that doenst help when 1 and -1 are both on the same "square"

OpenStudy (amistre64):

or does it ...

OpenStudy (amistre64):

i dont see why it couldnt work out, had to take a vote first lol

OpenStudy (anonymous):

Thanks for help, was looking for a simplification of sin(nPI/2) when n is an int, but I don't think there is one

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!