
Algebra PreAlgebra and Basic Algebra Math Forum 
 LinkBack  Thread Tools  Display Modes 
February 26th, 2008, 07:13 AM  #1 
Newbie Joined: Feb 2008 Posts: 1 Thanks: 0  Function problem
I have to write a function f(n) that has the result the lowest number higher or equal to n that is dividable by 4. For ex: f(24) = 24, f(25)=28 ... The only solution that I can think of is: f(n) = [n/4+1]*4. But it doesnt work for n numbers that are dividable by 4. Thank you and sorry if I've made some mistake, I'm new here! 
February 26th, 2008, 10:47 AM  #2  
Global Moderator Joined: Nov 2006 From: UTC 5 Posts: 16,046 Thanks: 938 Math Focus: Number theory, computational mathematics, combinatorics, FOM, symbolic logic, TCS, algorithms  Re: Function problem
Terminology: you need to find an expression for that function. The words already define the function. Quote:
 
February 27th, 2008, 11:52 AM  #3 
Global Moderator Joined: Dec 2006 Posts: 19,291 Thanks: 1683 
If n is a nonnegative integer, f(n) = 4[(n + 3)/4], where [x] denotes the integer part of x.


Tags 
function, problem 
Thread Tools  
Display Modes  

Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Function problem  mathwiztheo  Algebra  2  November 19th, 2012 02:58 AM 
lg function problem  nanalala125  Linear Algebra  1  September 19th, 2012 07:00 PM 
Function problem  reave  Algebra  1  November 4th, 2011 05:05 AM 
1 Word problem and 1 function problem, PLEASE HELP ME  murkr  Algebra  1  April 19th, 2010 04:56 PM 
What's the function for the problem?  jsucupira  Algebra  2  October 15th, 2007 11:59 AM 