by logic, 4!= x3x2x1, 3!=3x2x1, why 1!=1 and 0!=1
I think '0!=1' is by convention.
yeh it's just one of the special rules
a logical explanation please, why mathematicians decided this way
they are humans, no gods, so I think there's a reason behind this
would you accept the explanation n!= n*(n-1)! so if n=1 1!= 1*0! therefore 1=0!
what about 0!=1
its only where n is greater than or equal to 1 0!=1 is more like an assumption and there's really no actual way to prove it
\[n!=n*(n-1)!\\\Rightarrow (n-1)!=\frac{n!}{n}\\\\\text{Substituting n=1,}\\\\(1-1)!=\frac{1!}{1}\\\\\Rightarrow 0!=1\]
what about (-2)!
there is no (-2)!
if there is 0!, there is no reason theres no (-2)!
but theres no line saying negative numbers or non-integer(like 3.514) numbers CAN NOT have factorial..
the very first line says "In mathematics, the factorial of a non-negative integer n, ......"
what about the factorial of a negative number, or a decimal number.. what would they be
for those who did some programming, I made a program using while loops that gives me the factorial of whatever number...
and astonishingly..
(please reply if u have any programming experience with loops...)
astonishingly would give you a complex infinity error if your input for n is a negative number
nop..
far from that...
when i did factorial of 1, it gave me 1... and when i did factorial of 0, it actually gave me 1 too..
n! is a sequence with integer values for nonnegative n
and factorial of any negative number gives also 1...
well the rule states nonnegative integer. so ZERO is included.
did you create a function loop that when the input for n is a negative value that the answer would yield 1?
not at all
the program is written in python, through pure logic, no exceptions are defined
written in python: def factorial(n): i=1 a=1 while i<=n: a=a*i i=i+1 return a
your while i<=n statement returns a value of 1
try this : def factorial(n): i=1 a=1 while i<=n: a=a*i i=i+1 return a print "BAD INPUT !"
only when n is less than 1.9999999
@ganeshie8 your return a has bad incantation, it should be placed after the loop is completely finished
\[n!\neq0/;\forall n\]
yeah my code will not work as well :( i think your code is not entering while loop at all for negative integers. it is simply returning the value of a
apply that zero rule
yes ganesh. it's just going to print or display 1 when a negative value is the input
factorial in programming has more than 100 formulas
\[! == Product[k, {k, 1, n}] /; Element[n, \\mathbb{Z}s] && n >= 1\]
but what's truly fascinating is.. when you program through pure logic, as you can see in the program, it logically multiplies every numbers from the input, descending til 1. And when you do that, if you enter 1 as the input, it gives 1. If u enter 0 as input, normally through the logic, it would be absurd, but the program still gives 1
which perfectly fits the mathematical rules that are built centuries ago, when machines didn't exist yet
but zero is 1 secondary to empty product rule
also, have you looked at the list prod function in python?
'but zero is 1 secondary to empty product rule' what do u mean by that
what do you get when you raise any number (n) to zero? with the exception of n=0
1
then what is zero raised to zero?
if you're programming, you can set 0^0=1 when representing an empty product
if u program an exponential function using a pure logical algorithm, i think there is no need to add an exception, everything will just display as it actually is mathematically
on what logic would you set the domain and range of the function then?
there's no need to set them, with any input, the output will never reach 0 or below
There is a negative factorial but not for negative integers. The factorial function can be extended so that it is defined for all real numbers (and complex numbers) except for negative integers. It is extended by using the gamma function. (see source). Source(s): http://en.wikipedia.org/wiki/Factorial
how would you tackle the problem of providing the factorial of multiple elements in a set?
ie: {2, 3, 5, 7, 11}!
what does this mean? I only know what factorial is
the factorial of {2, 3, 5, 7, 11}
or series expansion at infinity
give me an example please, I'm not sure what you mean by a factorial of multiple elements in a set
I just gave you one
{2, 3, 5, 7, 11}!
yes, what does {2, 3}! mean?
2x1x3x2x1 or what..
btw, I just made a simple python program using PURE LOGIC, no exceptions are added, and computer seems to behave the same way as the actual mathematics, hence, 0^0 gives one def power(x,n): a = 1 i = 0 while i < n: a = a * x i = i + 1 return a
nice discussion with you panlac01, have to go sleep mate, we can talk about it tomorrow ;)
I know this one! \((n - 1)! = \Large {n! \over n}\)
Join our real-time social learning platform and learn together with your friends!