FRESHERSHOME
Freshers Forum

What equation (sequence) would resolve any number into either odd or even?

This is a discussion on What equation (sequence) would resolve any number into either odd or even? within the Numerical Ability forums, part of the Freshers Zone category; Hello all,I'm having trouble trying to figure out an equation that will categorize any number to either zero (for even ...


Go Back   Jobs in India Forum > Freshers Zone > Numerical Ability

Notices

Numerical Ability All Numerical Ability Related information and Q&A

 
Reply
 
Thread Tools Display Modes
  #1  
Old 06-02-2007, 01:08 PM
Entry Level Fresher
 
Join Date: Jun 2007
Posts: 1
Default What equation (sequence) would resolve any number into either odd or even?

Hello all,I'm having trouble trying to figure out an equation that will categorize any number to either zero (for even numbers) and one (for odd numbers). For example:0 = 0 (even)1 = 1 (odd)2 = 0 (even)3 = 1 (odd)4 = 0 (even)5 = 1 (odd)6 = 0 (even)7 = 1 (odd)Any help would be much appreciated. Thanks!
__________________
Powered by Yahoo! Answers
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2  
Old 06-02-2007, 03:06 PM
Entry Level Fresher
 
Join Date: Jun 2007
Posts: 1
Default

Well the typical way is to define a function that has two possible values. i.e.f(x) = 0 (for all x even)f(x) = 1 (for all x odd)This is a perfectly valid function.
__________________
Powered by Yahoo! Answers
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3  
Old 06-02-2007, 04:08 PM
Entry Level Fresher
 
Join Date: Jun 2007
Posts: 1
Default

well if you take the square root of the even or odd number than the even number will be a whole number or irrational number if you know what i am saying you would know.
__________________
Powered by Yahoo! Answers
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4  
Old 06-02-2007, 04:15 PM
Entry Level Fresher
 
Join Date: Jun 2007
Posts: 1
Default

The sequence a_n = (1 - (-1)^n)/2 does the job. Just check
__________________
Powered by Yahoo! Answers
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5  
Old 06-02-2007, 04:27 PM
Entry Level Fresher
 
Join Date: Jun 2007
Posts: 3
Default

With the exception of zero, X-(X+1) would work. Zero would end up being odd even though it is neither odd nor even.
__________________
Powered by Yahoo! Answers
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6  
Old 06-02-2007, 04:38 PM
Entry Level Fresher
 
Join Date: Jun 2007
Posts: 1
Default

n is even if and only if (-1)^n = 1 help, or no?
__________________
Powered by Yahoo! Answers
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Tags
equation number, odd or even

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Forum Jump

Sitemap
Jobs by Location: Advertising and Marketing Jobs - IT Software Jobs - Walk-in Jobs - BPO Jobs - Government Jobs - Sales / BD Jobs - Tele Communication Jobs App Programming - Network Admin

Jobs By Location: Jobs in Bangalore - Jobs In India - Jobs in Delhi - Jobs in Hyderabad - Jobs in Kochi - Jobs in Mumbai - Jobs in Trivandrum - Jobs in pune - Jobs in Jonida - Jobs in Chennai - Jobs in Coimbator

Jobs Type: Full Time Jobs - Part Time Jobs
Latest Jobs - Accounting Jobs - Engineering Jobs - IT Jobs - Walkins - How to Face Interview - HR Round Tips - Career Info - Guide For Freshers - Apply for Jobs - Future Studies - Jobs Forums - Freshers IT Software Salary Details


All times are GMT +6.5. The time now is 01:56 PM.


Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
FreshersHome.com

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62