A given integer can be written in how many different ways?

  • Context: High School 
  • Thread starter Thread starter kent davidge
  • Start date Start date
  • Tags Tags
    Integer
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
11 replies · 1K views
kent davidge
Messages
931
Reaction score
56
I had learned how to find this out in the past, but forgot now. Precisely, I'm trying to find in how many different ways I can express the number 24 as a sum of two integers ranging from 1 to 24. For example, 24 = 24 = 23 + 1 = 12 + 12...
 
Physics news on Phys.org
fresh_42 said:
Do you count (23,1) and (1,23) as two or one?
One. This somehow hints me at the usage of permutations.
 
Going through permutations, perhaps it is better to start off with a smaller number to get a feeling of what I'm working with. Let me take number 4. I can form ##4!/(2!2!)## pairs composed of two different numbers from the set ##\{1,2,3,4\}##, right? This is equal to 6. However this is still bigger than the actual number, which I did by hand and is 4, i.e., 4 = 4 = 3 + 1 = 2 + 2 + 2 = 2 + 1 + 1. That must be because in the calculation I did, I included 3 + 3 and 4 + 4. So I would have to figure out a way of removing those combinations that sum up to a number greater than the number I'm considering.

So I'm not sure this method is useful.
 
hutchphd said:
Try the table described in post #3. This is not difficult.
aha, indeed it gives me the number of ways "right on the nose" as you english speakers say :)
 
fresh_42 said:
The most difficult thing is the floor function
I am an old guy and I never heard that nomenclature (floor) until maybe a year ago. Did it migrate from a particular computer language?? It is less ambiguous.