Sei sulla pagina 1di 2

Assignment 1

January 2024

Task 1.

Definition 1. I am a student at NYUAD.

Theorem 1. Proof. My proof is that I have an NYAUD student card, which I keep forgetting everywhere.

Asliddin + StudentID = F orgotten (1)


A bunch of other equations: a2 + b2 = c2

p
c= a2 + b2 (2)
= hypotenuse (3)
= something should have come up now (4)

Task 2.

Theorem 2. An integer x is odd if, and only if, x + 1 is even.


Proof.

Definition 2. An integer is a whole number (not a fractional number) that can be positive, negative, or
zero: Z = {. . . , −3, −2, −1, 0, 1, 2, 3, . . . }

Given that x is odd, x is denoted by: x = 2s + 1


Hence, x + 1 will be denoted as:

x + 1 = 2s + 1 + 1 (5)
= 2s + 2 (6)
= 2(s + 1) (7)

Given that y is even, y will be denoted as: y = 2s

Therefore, by definition, x + 1 is even.

Let x + 1 be even, then it will be denoted as:

x + 1 = 2 ∗ (x + 1) (8)
= 2x + 2 (9)

1
Then, x will be denoted by:

x + 1 − 1 = 2 ∗ (x + 1) − 1 (10)
= 2x + 2 − 1 (11)
= 2x − 1 (12)

Therefore, by definition, x is odd.

Task 3. (a) The only perfect number smaller than 28 is 6, as the divisors of 6 are: 1, 2, 3, and 1 + 2 + 3 = 6.

(b) d e f check number ( n ) :


ans = sum ( [ x f o r x i n r a n g e ( 1 , n ) i f n % x == 0 ] )
r e t u r n ans == n

n = 29
w h i l e ( check number ( n ) == F a l s e ) :
n += 1

print (n)
According to the program, the next perfect number is 496.

Potrebbero piacerti anche