document.write( "Question 1176880: Recall the one-to-one and onto mapping of the set of natural numbers to the set of integers. We used this mapping to show that the integers were countably infinite. Find a function, f(n) that gives the nth integer of the given mapping below. You may find it useful to know that the floor(x) of a number is the largest integer that is less than or equal to x. You may use the floor in your final answer.\r
\n" ); document.write( "\n" ); document.write( "Examples: floor(4.3) = 4\r
\n" ); document.write( "\n" ); document.write( " floor(10.789) = 10\r
\n" ); document.write( "\n" ); document.write( " floor(8) = 8\r
\n" ); document.write( "\n" ); document.write( " floor(-2.6) = -3\r
\n" ); document.write( "\n" ); document.write( "Mapping:\r
\n" ); document.write( "\n" ); document.write( "N Z
\n" ); document.write( "1 0
\n" ); document.write( "2 1
\n" ); document.write( "3 -1
\n" ); document.write( "4 2
\n" ); document.write( "5 -2
\n" ); document.write( "6 3
\n" ); document.write( "7 -3
\n" ); document.write( "... ...
\n" ); document.write( "

Algebra.Com's Answer #850555 by ikleyn(52787)\"\" \"About 
You can put this solution on YOUR website!
.
\n" ); document.write( "Recall the one-to-one and onto mapping of the set of natural numbers to the set of integers. We used this mapping to show that the integers were countably infinite. Find a function, f(n) that gives the nth integer of the given mapping below. You may find it useful to know that the floor(x) of a number is the largest integer that is less than or equal to x. You may use the floor in your final answer.\r
\n" ); document.write( "\n" ); document.write( "Examples: floor(4.3) = 4\r
\n" ); document.write( "\n" ); document.write( " floor(10.789) = 10\r
\n" ); document.write( "\n" ); document.write( " floor(8) = 8\r
\n" ); document.write( "\n" ); document.write( " floor(-2.6) = -3\r
\n" ); document.write( "\n" ); document.write( "Mapping:\r
\n" ); document.write( "\n" ); document.write( "N Z
\n" ); document.write( "1 0
\n" ); document.write( "2 1
\n" ); document.write( "3 -1
\n" ); document.write( "4 2
\n" ); document.write( "5 -2
\n" ); document.write( "6 3
\n" ); document.write( "7 -3
\n" ); document.write( "~~~~~~~~~~~~~~~~~~~~~~~~~~\r
\n" ); document.write( "
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "
\r\n" );
document.write( "Use this function\r\n" );
document.write( "\r\n" );
document.write( "    f: N  --->  Z   from natural numbers (= positive integers) to all integers\r\n" );
document.write( "  \r\n" );
document.write( "    f(1) = 0,\r\n" );
document.write( "\r\n" );
document.write( "    f(n) = \"%28-1%29%5En\" * \"floor%28n%2F2%29%29\",  n > = 2.\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "It maps\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "      n      1    2    3    4    5    6    7    8    9. . . . \r\n" );
document.write( "\r\n" );
document.write( "    f(n)     0    1   -1    2   -2    3   -3    4   -4 . . . \r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "and so on.\r\n" );
document.write( "
\r
\n" ); document.write( "\n" ); document.write( "Solved.\r
\n" ); document.write( "
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "
\n" ); document.write( "
\n" );