11 days ago

Defining odd and even numbers matemathically!


Even set rules:

Declarations:

  • π‘₯ ∈ β„€

  • 𝑦 ∈ β„€

  • 𝑧 = π‘₯ Γ· 2

Proprieties:

  • βˆƒπ‘¦ ∈ β„€ (2𝑦 = π‘₯)

  • 𝑧 ∈ β„€

Odd set rules:

Declarations:

  • π‘₯ ∈ β„€

  • 𝑦 ∈ β„€

  • 𝑧 = π‘₯ Γ· 2

Proprieties:

  • βˆƒπ‘¦ ∈ β„€ (2𝑦 Β± 1 = π‘₯)

  • 𝑧 βˆ‰ β„€


Alternative 1:

You can also write the number in Base 2 and check the least significant bit. If the least significant bit is 1, then it is odd. If the least significant bit is 0, then it is even.


Alternative 2:

You can also write the number in base 10. If the units digit is 1, 3, 5, 7 or 9, then it is odd. If it is 2, 4, 6, 8 or 0, then it is even.


Trivia:

  1. For any number 𝑦 written in base(π‘₯) such that π‘₯ is even, π‘₯ β‰₯ 2, π‘₯ ∈ β„• and all digits in that base are all integers over or equal to 0 up until π‘₯ - 1, you can simply check whether the units digit of 𝑦 is even or odd.

  2. For any number 𝑦 written in base(π‘₯) such that π‘₯ is odd, π‘₯ β‰₯ 3, π‘₯ ∈ β„• and all digits in that base are all integers over or equal to 0 up until π‘₯ - 1, you must sum all of its digits. Let the result be called 𝑧. If 𝑧 < π‘₯, check whether 𝑧 is equal to any number that can be represented by 2𝑛 such that 𝑛 is an integer over or equal to 0 up until (π‘₯ - 1). If 𝑧 β‰₯ π‘₯, repeat this process up until 𝑧 < π‘₯.



0 comments

Loading...

Next up

This Satuday we invite to watch another #speedpainting of our artist Daniel Faiad.

How great is this scene of #Pecaminosa?

#ScreenShotSaturday | #IndieDev | #DigitalArt

Back in my art school days I used to ride the 710 COPSA line from Parque Del Plata to Montevideo almost everyday. This is the Marcopolo Viaggio G4 Mercedes Benz model from the late 80s, one of the older bus models that was running on the line.

Finished work on the emotions of a new character for the tank universe

Here's a Fredbear sprite i made in Aseprite! I'm pretty proud of this!

(Btw, sorry for the double post! I'll try to post less)

Hi all, Quick update with a bunch of fixes and changes.

Updated save system, optimisation and screen tear fixes, a new shoutout room and more sounds.

Don't forget to follow the kickstarter going live on the 20th! https://www.kickstarter.com/projects/9fingergames/zapling-bygone

Enjoy!

Annie of the stars

Sonic The Hedgehog style Super Smash Bros 4 Pixel art Gif.

Let's gooo! Sub-15 minutes achieved thanks to a new skip found by @mazou !

My new Endfall demo Any% world record is 14:48! Used safe strats and got too excited here and there, but I'm satisfied. Thanks to @ElPichon for the game, and y'all beat my time! ;D