Can You Derive a Mathematical Formula from This Data Pattern?

In summary, the conversation discusses finding a formula to analyze a given set of data, where the first column is input and the second column is output. After some discussion, a formula is proposed and explained in detail by RichJ. The formula involves using the integer value and logarithmic function of the input, and subtracting it from a calculated value. This formula accurately produces the desired output for the given data.
  • #1
rishid
9
0
Need to analyze the pattern and create a formula if possible out of the data below. Inputting the first column and outputting the second.
1 1
2 1
3 3
4 1
5 3
6 5
7 7
8 1
9 3
10 5
11 7
12 9
13 11
14 13
15 15
16 1

Only thing I got that is on powers of 2, it should be 1.

If you got any ideas, throw them at me.

Thanks,

RishiD
 
Mathematics news on Phys.org
  • #2
Looks like it's just going through the odd integers, resetting to one on powers of two.

- Warren
 
  • #3
Try writing out i rows, starting a new row each time you come across 1. the 'answer' should jump out at you (i'm not sure yo'ure even looking for an answer, to be honest, and what "should be 1").
 
  • #4
Hello Rishid,
I have the solution to your problem you posted on Oct. 25, 2004.

The formula is: x = 2 i + 1 - (2 ^ (int(log2(i)) + 1)

where i is the integer and x is the result,
log2(n) is the log (base 2) of n,
and int(n) is the integer value of n.

The table illustrates the calcs. (I used periods to line up the values because the message formatting automatically removes extraneous spaces. Also I was forced to use variables to represent each step for the same formatting reason). Specifically,

a = 2i + 1
b= int(log2(i))
c= int(log2(i)) + 1
d = 2^(int(log2(i))+1)
and finally the result you're trying to generate: x = a - d

i...a...b...c...d...x

1...3...0...1...2...1
2...5...1...2...4...1
3...7...1...2...4...3
4...9...2...3...8...1
5...11...2...3...8...3
6...13...2...3...8...5
7...15...2...3...8...7
...
16...33...4...5...32...1

I hope this helps.
RichJ
 
  • #5


Hello RishiD,

Thank you for reaching out with your question. It appears that the second column is following a pattern where the value increases by 2 for every odd number and resets to 1 for every power of 2. This can be represented by the formula:

f(x) = (x-1) mod 2 + 2*((x-1) mod 4) + 1

Where x is the input number and f(x) is the output value. The "mod" function represents the remainder after division. This formula takes into account the increasing pattern for odd numbers and the reset for powers of 2.

I hope this helps you in analyzing the data and creating a formula. Best of luck in your research!
 
  • #6


Dear RishiD,

Thank you for reaching out for help with deriving a formula for the given data. After analyzing the pattern, it seems that the first column represents consecutive numbers starting from 1, while the second column follows a repeating pattern of 1, 3, 5, 7, 9, 11, 13, 15, 1. This pattern repeats every 8 numbers.

To create a formula for this pattern, we can use the modulo operator, which gives the remainder after dividing a number by another number. In this case, we can use the formula: (n % 8) + 1, where n represents the number in the first column.

So, the formula for the second column would be: (n % 8) + 1. This formula will give us the desired output for the given input.

I hope this helps. Let me know if you have any further questions.

Best,
 

1. What is a formula and why is it important?

A formula is a mathematical expression that describes a relationship between different variables. It is important because it allows us to make predictions and solve problems in various scientific fields, such as physics, chemistry, and engineering.

2. How do I derive a formula?

To derive a formula, you need to start with a set of known equations and use mathematical rules and principles to manipulate them until you reach the desired formula. This process involves algebraic manipulations, substitutions, and simplifications.

3. Can I derive a formula for any problem?

Deriving a formula requires a good understanding of the underlying principles and concepts of the problem at hand. While it may not be possible to derive a formula for every problem, having a strong foundation in mathematics and the specific subject area can increase the chances of success.

4. Are there any tips or tricks for deriving a formula?

Yes, there are a few tips that can make the process of deriving a formula easier. These include breaking down the problem into smaller parts, using diagrams or visual aids, and practicing with similar problems to build intuition.

5. How do I know if my derived formula is correct?

One way to check if your derived formula is correct is by comparing it to known solutions or experimental data. You can also plug in different values for the variables and see if the formula yields reasonable results. Furthermore, it is always a good idea to double-check your calculations and make sure you have followed all the necessary steps in the derivation process.

Similar threads

Replies
3
Views
485
  • General Math
Replies
24
Views
2K
Replies
68
Views
9K
  • General Math
Replies
4
Views
2K
Replies
11
Views
659
  • General Math
Replies
3
Views
553
  • Nuclear Engineering
Replies
7
Views
2K
Replies
13
Views
1K
  • Precalculus Mathematics Homework Help
Replies
4
Views
742
Back
Top