Comments on: Help me figure out this sequence
http://ask.metafilter.com/130277/Help-me-figure-out-this-sequence/
Comments on Ask MetaFilter post Help me figure out this sequenceSun, 16 Aug 2009 05:22:48 -0800Sun, 16 Aug 2009 05:22:48 -0800en-ushttp://blogs.law.harvard.edu/tech/rss60Question: Help me figure out this sequence
http://ask.metafilter.com/130277/Help-me-figure-out-this-sequence
Ive been tearing my hair out trying to work out a mathematical formula for a sequence of numbers I have. Have a look inside and tell me if you see a pattern. <br /><br /> Im trying to reverse engineer a little section of a computer program, I enter the numbers below and get the result out. I have just written out a sample of different numbers I have entered in. I cannot work out what it is doing, there is obviously some rounding in there which is throwing me off..<br>
<br>
0.01->2<br>
0.02->3<br>
0.03->3<br>
0.04->3<br>
0.05->4<br>
0.06->4<br>
0.07->4<br>
0.08->4<br>
0.09->4<br>
0.10->5<br>
<br>
0.1->5<br>
0.2->6<br>
0.3->7<br>
0.4->7<br>
0.5->8<br>
0.6->8<br>
0.7->9<br>
0.8->9<br>
0.9->10<br>
1.0->10<br>
1.1->10<br>
1.2->11<br>
1.3->11<br>
1.4->11<br>
1.5->11<br>
1.6->12<br>
1.7->12<br>
1.8->12<br>
1.9->12<br>
2.0->12<br>
<br>
3.0->14<br>
<br>
4.0->16<br>
<br>
10.0->22<br>
<br>
100.0->46<br>
<br>
1000.00->100<br>
<br>
Anyone have any idea?post:ask.metafilter.com,2009:site.130277Sun, 16 Aug 2009 04:55:29 -0800phylemathssequencepatternBy: effbot
http://ask.metafilter.com/130277/Help-me-figure-out-this-sequence#1861918
Cube root times ten, rounded to nearest integer?comment:ask.metafilter.com,2009:site.130277-1861918Sun, 16 Aug 2009 05:22:48 -0800effbotBy: billysumday
http://ask.metafilter.com/130277/Help-me-figure-out-this-sequence#1861921
I think effbot's got it.comment:ask.metafilter.com,2009:site.130277-1861921Sun, 16 Aug 2009 05:29:20 -0800billysumdayBy: spaghettification
http://ask.metafilter.com/130277/Help-me-figure-out-this-sequence#1861923
Yes that's what I got too. The only one with a rounding error is 2.0>12.comment:ask.metafilter.com,2009:site.130277-1861923Sun, 16 Aug 2009 05:29:46 -0800spaghettificationBy: Blazecock Pileon
http://ask.metafilter.com/130277/Help-me-figure-out-this-sequence#1861924
Have you tried <a href="http://img196.imageshack.us/img196/9710/plotw.png">plotting</a> your data points? That's always one place to start. Looks <a href="http://en.wikipedia.org/wiki/Nonlinear_regression">logarithmic</a> to me.comment:ask.metafilter.com,2009:site.130277-1861924Sun, 16 Aug 2009 05:31:15 -0800Blazecock PileonBy: spaghettification
http://ask.metafilter.com/130277/Help-me-figure-out-this-sequence#1861925
<em>Have you tried plotting your data points? That's always one place to start. Looks logarithmic to me.</em><br>
<br>
A loglog plot will give you a straight line. That means we're looking at a power law.comment:ask.metafilter.com,2009:site.130277-1861925Sun, 16 Aug 2009 05:35:06 -0800spaghettificationBy: Green With You
http://ask.metafilter.com/130277/Help-me-figure-out-this-sequence#1862002
If I may suggest something a little bit different: decompile the program. If this is a simple program then even if all of the symbol information is gone is still shouldn't take terribly long to work out. If it is a longer program you can probably narrow down where to look considering the program prints something out on the screen in what seems to be a regular format.comment:ask.metafilter.com,2009:site.130277-1862002Sun, 16 Aug 2009 08:26:05 -0800Green With YouBy: ecsh
http://ask.metafilter.com/130277/Help-me-figure-out-this-sequence#1862005
Not a huge help since these are (x, y) pairs rather than a formal sequence {a1, a2, a3, ... }, but for future reference: <a href="http://www.research.att.com/~njas/sequences/">The On-Line Sequence Database</a>.comment:ask.metafilter.com,2009:site.130277-1862005Sun, 16 Aug 2009 08:33:30 -0800ecshBy: effbot
http://ask.metafilter.com/130277/Help-me-figure-out-this-sequence#1862012
<i>but for future reference: The On-Line Sequence Database.</i><br>
<br>
Let's see: <a href="http://www.research.att.com/~njas/sequences/A018004">A018004: Powers of cube root of 10 rounded to nearest integer: 1, <u>2, 5, 10, 22, 46, 100</u>, 215, 464, 1000</a>. QED?comment:ask.metafilter.com,2009:site.130277-1862012Sun, 16 Aug 2009 08:54:09 -0800effbotBy: skintension
http://ask.metafilter.com/130277/Help-me-figure-out-this-sequence#1862021
An easy way to solve this is to put your sequence into excel, make a scatter plot, then try various regression lines (excel calls them trendlines) until one fits.<br>
<br>
In this case 9.93x^0.335 is the closest fit. Assuming integers are rounding down, probably 10x^1/3, as effbot said.comment:ask.metafilter.com,2009:site.130277-1862021Sun, 16 Aug 2009 09:04:43 -0800skintensionBy: DU
http://ask.metafilter.com/130277/Help-me-figure-out-this-sequence#1862037
<i>The only one with a rounding error is 2.0->12.</i><br>
<br>
That's far from true. 0.8->9, to pick one at random, also has a big rounding error.<br>
<br>
<i>In this case 9.93x^0.335 is the closest fit.</i><br>
<br>
Of that order, maybe. There are an infinite number of solutions, though. The only way to decide between them is to know more about the source of the numbers.comment:ask.metafilter.com,2009:site.130277-1862037Sun, 16 Aug 2009 09:24:36 -0800DUBy: effbot
http://ask.metafilter.com/130277/Help-me-figure-out-this-sequence#1862049
<i>That's far from true. 0.8->9, to pick one at random, also has a big rounding error.</i><br>
<br>
Eh, what? 10*2^1/3 is 9.283.comment:ask.metafilter.com,2009:site.130277-1862049Sun, 16 Aug 2009 09:57:58 -0800effbotBy: DU
http://ask.metafilter.com/130277/Help-me-figure-out-this-sequence#1862056
<i>Eh, what? 10*2^1/3 is 9.283.</i><br>
<br>
Not only is that wrong (the cube root of 2 is around 1.25, not .9anything), but it also seems to be in response to the wrong comment. ?<br>
<br>
Also, 10 * (.8^(1/3)) ~= 7.<br>
<br>
As I said, we need to know more about the source of these numbers.comment:ask.metafilter.com,2009:site.130277-1862056Sun, 16 Aug 2009 10:07:16 -0800DUBy: effbot
http://ask.metafilter.com/130277/Help-me-figure-out-this-sequence#1862070
No, <a href="http://www.google.com/search?q=cube+root+of+0.8+times+10">it</a> <a href="http://www.wolframalpha.com/input/?i=cube+root+of+0.8+times+10">isn't</a>.comment:ask.metafilter.com,2009:site.130277-1862070Sun, 16 Aug 2009 10:16:30 -0800effbotBy: skintension
http://ask.metafilter.com/130277/Help-me-figure-out-this-sequence#1862071
<i>There are an infinite number of solutions</i><br>
<br>
I was explaining how to find the best fit using Excel. Sorry if that wasn't clear. There are six possible solutions, at least in my version with the default values, of which 9.93x^0.335 is clearly the best fit (well; I left out the last couple extreme values to make the graph easier to read).comment:ask.metafilter.com,2009:site.130277-1862071Sun, 16 Aug 2009 10:16:48 -0800skintensionBy: effbot
http://ask.metafilter.com/130277/Help-me-figure-out-this-sequence#1862073
(Ok, there was a copy and paste error in my earlier post. But 10*(0.8^1/3) is still 9.283.)comment:ask.metafilter.com,2009:site.130277-1862073Sun, 16 Aug 2009 10:18:58 -0800effbotBy: DU
http://ask.metafilter.com/130277/Help-me-figure-out-this-sequence#1862082
Not sure how I got 7. I think I conflated two problems.<br>
<br>
<i>There are six possible solutions...</i><br>
<br>
Excel may be giving you 6 possible solutions, but that doesn't necessarily mean much. If the solution involves just a cube root, that might be "the" solution, though. But how do we know the it only involves a cube root? By knowing the context of the problem--which is missing from the question.comment:ask.metafilter.com,2009:site.130277-1862082Sun, 16 Aug 2009 10:24:56 -0800DUBy: skintension
http://ask.metafilter.com/130277/Help-me-figure-out-this-sequence#1862100
I'm not sure what you're getting at. The guy asked for some clues, Excel is a handy desktop tool to provide them. I'm not implying that Excel solves unsolvable math problems, and <b>phyle</b> asked for "any ideas", not a mathematically provable solution. I think his question has been answered.comment:ask.metafilter.com,2009:site.130277-1862100Sun, 16 Aug 2009 10:49:31 -0800skintensionBy: phyle
http://ask.metafilter.com/130277/Help-me-figure-out-this-sequence#1862399
Thankyou everyone, I think effbot got it first go! Sorry Ive taken a while to respond, I asked the question and then went off to bed.<br>
Ive gone back and checked 2.0>12 and thats my fault! it is 13, I just wrote the numbers down wrong..comment:ask.metafilter.com,2009:site.130277-1862399Sun, 16 Aug 2009 15:10:09 -0800phyle