
Algebra PreAlgebra and Basic Algebra Math Forum 
 LinkBack  Thread Tools  Display Modes 
February 26th, 2008, 08: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, 11: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, 12:52 PM  #3 
Global Moderator Joined: Dec 2006 Posts: 19,968 Thanks: 1850 
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 03:58 AM 
lg function problem  nanalala125  Linear Algebra  1  September 19th, 2012 08:00 PM 
Function problem  reave  Algebra  1  November 4th, 2011 06:05 AM 
1 Word problem and 1 function problem, PLEASE HELP ME  murkr  Algebra  1  April 19th, 2010 05:56 PM 
What's the function for the problem?  jsucupira  Algebra  2  October 15th, 2007 12:59 PM 