[Question]
  [
# The challenge
The [plastic number](https://en.wikipedia.org/wiki/Plastic_number) is a number related to the golden ratio, with many interesting mathematical properties. As such, there are many approaches that can be used to calculate the number.
In order to precisely specify the number for the purposes of this challenge, we'll use the following definition (although there are plenty of equivalent definitions, and you can use any definition you wish as long as it comes to the same number):
> 
> The plastic number is a real number *ρ* such that *ρ*³=*ρ*+1.
> 
> 
> 
Your challenge is to write a program or function which takes an integer *x* as input (with *x* > 1), and produces an approximation to *ρ* as output, such that the larger the value of *x* gets, the closer the output gets to *ρ* (with at most finitely many exceptions; staying at the same value counts as "closer" for this purpose), and for any positive number *δ*, there's some input *x* to your program that produces an output that's within *δ* of *ρ*.
# Clarifications
* If you're outputting via a method that inherently outputs strings (e.g. the standard output stream), you can format output either in decimal (e.g. `1.3247179572`), or as a ratio of two integers with a `/` character between them.
* If you're outputting as a value within your programming language (e.g. returning from a function), it must be of a fixed-point, floating-point, or rational type. (In particular, you can't use data types that store numbers symbolically, unless they're used only to hold the ratio of two integers. So if you're using Mathematica or a similar language, you'll need to include the extra code to actually generate the digits of the output.)
* Your answer must work in a hypothetical variant of your language in which integers can be arbitrarily large, and memory (including stack) is unlimited. You may *not* assume that floating-point arithmetic in your language is arbitrarily accurate, but must instead use its actual accuracy (meaning that outputting a floating-point number is only going to be possible in languages where the accuracy of floating-point numbers can be controlled at runtime).
* *x* can have any meaning you want (so long as increasing it gives more accurate outputs). I imagine that most submissions will have it control the number of digits of output to produce, or the number of iterations of the algorithm used by your program to converge on the plastic number, but other meanings are acceptable.
# Testcase
Here are the first few digits of the plastic number:
```
1.32471795724474602596090885
```
More digits are available [on OEIS](https://oeis.org/A060006).
# Victory condition
As usual for [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'"), shorter is better, measured in bytes. However, feel free to post answers even if they don't win, so long as they add something (e.g. a different language, or a different algorithm) to the existing answers.
  
[Answer]
# [Python 2](https://docs.python.org/2/), 49 bytes
```
n=x=input()
while n**3/x/x<n+x:n+=1
print n,'/',x
```
[Try it online!](https://tio.run/##K6gsycjPM/r/P8@2wjYzr6C0REOTqzwjMydVIU9Ly1i/Qr/CJk@7wipP29aQq6AoM69EIU9HXV9dp@L/f0MDEAAA "Python 2 – Try It Online")
The idea is to express the `ρ` with `ρ³=ρ+1` as a fraction `n/x` whose denominator `x` is the input accuracy parameter. We take `(n/x)³=n/x+1` and clear denominators to get `n³=x²(x+n)`. 
Since the LHS increases in `n` faster than the RHS, we can approximate the equality point `n` as the smallest with `n³≥x²(x+n)`. The code counts up `n` until this is the case, starting at `x` which is smaller. 
A small byte save is to divide both sides by `x²` to write `n³/x²≥x+n` (negated in the `while` condition). This is floor division in the code, but the fractional part lost is negligible.
A same-length alternative instead puts `x` as the numerator:
**[Python 2](https://docs.python.org/2/), 49 bytes**
```
n=x=input()
while x**3/n/n<n+x:n-=1
print x,'/',n
```
[Try it online!](https://tio.run/##K6gsycjPM/r/P8@2wjYzr6C0REOTqzwjMydVoUJLy1g/Tz/PJk@7wipP19aQq6AoM69EoUJHXV9dJ@//f0MDIAAA "Python 2 – Try It Online")
[Answer]
# Mathematica, 20 bytes
```
#^3-#-1&~Root~1~N~#&
```
Mathematica's builtin `Root` function gives the solutions to a polynomial equation `f[x] == 0`.
### Explanation
```
#^3-#-1&~Root~1~N~#&
                   &  (* Function *)
#^3-#-1&              (* A pure-function polynomial, x^3-x-1 *)
        ~Root~1       (* Find the first root *)
               ~N~#   (* approximate to (input) digits *)
```
### Sample I/O
```
In[1]:= f=#^3-#-1&~Root~1~N~#&;
        f[1]
Out[1]= 1.
In[2]:= f[9]
Out[2]= 1.32471796
In[3]:= f[100]
Out[3]= 1.324717957244746025960908854478097340734404056901733364534015050302827851245547594054699347981787280
```
[Answer]
# Mathematica, 27 bytes
```
x/.Solve[x^3==x+1>2,x]~N~#&
```
*-1 byte from Martin*  
*-2 bytes from ovs*
**input**
> 
> [27]
> 
> 
> 
**output**
> 
> {1.32471795724474602596090885}
> 
> 
> 
[Answer]
# [sed](https://www.gnu.org/software/sed/), ~~67~~ 60 (59+1) bytes
```
s,^,1/1/1 ,
:;s,(1*/(1*)/(1*).*)1$,\2\3/\1,
t
s,(/1*).*,\1,
```
[Try it online!](https://tio.run/##K05N@f@/WCdOx1AfCBV0uKysi3U0DLX0gVgTTOhpaRqq6MQYxRjrxxjqcJVwAeX1weI6QP7//4bI4F9@QUlmfl7xf11XAA)
+1 for the `-E` flag (ERE instead of BRE). Input and output are both unary: input 11111 for x=5 e.g. Output is a fraction of two unary numbers: the aforementioned 11111 input yields output 11111/1111 (5/4 in decimal).
Approximates the plastic number as a fraction between to consecutive elements of the [Padovan sequence](https://en.wikipedia.org/wiki/Padovan_sequence).
[Answer]
## Mathematica, 27 bytes
```
Nest[(1+#)^(1/3)&,1,#]~N~#&
```
Uses a truncated approximation of the nested cubic radical form **³√(1+³√(1+³√(1+...)))**. While the output will always have *x-1* decimal places, the result is actually less accurate than that, because the expression converges more slowly than one digit per iteration (*x* is also used as the number of nested radicals that are computed). For example *x = 100* gives 
```
_________________________________________________________________________
1.324717957244746025960908854478097340734404056901733364534015050302827850993693624204577670741656151
```
where the overlined part is correct.
[Answer]
# [Octave](https://www.gnu.org/software/octave/), 50 bytes
```
@(n)char(digits(n)*0+vpasolve(sym('r^3-r-1'))(1));
```
[Try it online!](https://tio.run/##y08uSSxL/Z9mq6en999BI08zOSOxSCMlMz2zpBjI0zLQLitILM7PKUvVKK7M1VAvijPWLdI1VNfU1DDU1LT@n6ZhqsmVpmFooPkfAA "Octave – Try It Online")
Defines an anonymous function, with`n` the desired number of digits of output.
This answer abuses that `digits` returns the current setting for the number of digits in variable precision arithmetic. This means we can just use it in an anonymous function without errors about 'Too many output arguments'.
Other than that, it's really straightforward: `vpasolve` is short for Variable-Precision Arithmetic Solve, with the precision set by the last call of `digits`. Since `vpa` is a Symbolic data type in Octave, which is banned per the spec, we just wrap the whole function in `char(...)` to get string output. Note that in `solve` and `vpasolve`, the `f==0` is implied, so `r^3==r+1` has been replaced by `r^3-r-1 (==0)`
[Answer]
# MATL (27 28 bytes)
```
7BG:"t@)y@Q)+h]tG3+)yG2+)/
```
My first solution (27 bytes)
[Try it online!](https://tio.run/##y00syfn/39zJ3UqpxEGz0sFQW1M7I7bE3Vhbs9LdSFtT//9/Q7Ovefm6yYnJGakA)
It's certainly not optimal, I'm still getting used to MATL.
## Explanation:
I create a [Padovan sequence](https://en.wikipedia.org/wiki/Padovan_sequence) up to input+3 then find the ratio of the last two numbers.
```
7B     % Turn 7 into binary to give 1 1 1 
G:"    % For k=1:input do...
t@)    % Existing sequence member k
y@1+)  % Existing sequence member k+1
+h     % Add them together and concatenate to the sequence array
]      % End loop
tG3+)  % Final sequence member
yG2+)  % Second last sequence member
/      % Divide to approximate ρ
```
## Proper fraction output (35 bytes) (28 bytes, @Sanchises):
However, the first solution doesn't fulfill the need for arbitrary precision being the floating point limit of default MATL settings. So rather than adding several bytes to extend this precision, it's simpler to take the proper fraction route and write a fraction of the final two integers in the (N-1)th and Nth elements of the truncated Padovan sequence.
e.g "114/86"
7BG:"t@)y@1+)+h]tG3+)V'/'YcyG2+)VYc
```
7BG:"t@tQh)sh]tJ)V47hyJq)Vh&
```
Courtesy of user @Sanchises. :)
[Try it online!](https://tio.run/##y00syfn/39zJ3UqpxKEkMEOzOCO2xEszzMQ8o9KrUDMsQ@3/f0Ozr3n5usmJyRmpAA)
## Non-iterative evaluation:
Notably, my shortest code for [the 'exact' version](https://en.wikipedia.org/wiki/Plastic_number) is (23 bytes):
```
1-1h69X^12**108+1I/^6/s
```
[Try it online!](https://tio.run/##y00syfn/31DXMMPMMiLO0EhLy9DAQtvQUz/OTL/4//@vefm6yYnJGakA)
...but doesn't give arbitrary precision. I wonder if anyone can adjust this to fulfill the rules (use the input etc) and still add less than 5 bytes? :P
[Answer]
# [M](https://github.com/DennisMitchell/m), ~~15~~ 14 bytes
```
²×3’
*3Ḥ‘÷Ç
Ç¡
```
[Try it online!](https://tio.run/##ASEA3v9t///CssOXM@KAmQoqM@G4pOKAmMO3w4cKw4fCof///zU "M – Try It Online")
### Algorithm
This uses rationals and Newton's method. Specifically, for input **x**, the first **x** iterations with starting value **x** are applied.
We're trying to find a specific root of the polynomial **p(t) = t³ - t - 1**. Newton's method achieves this by taking a starting value **t0** – sufficiently close to **ρ** – and recursively defining a sequence by  
**tn+1 = tn - p(tn) / p'(tn)**.
Since **p'(t) = 3t² -1**, we get  
**tn+1 = tn - (tn³ - tn - 1)/(3tn² - 1) = (3tn³ - tn - tn³ + tn + 1) / (3tn² - 1) = (2tn³ + 1) / (3tn² - 1)**.
Note that the initial approximation **x** gets progressively worse as **x** increases. While the output for **x = 3** is slightly less precise than the output for **x = 2**, since Newton's method converges quadratically to **ρ**, this shouldn't be an issue for large values of **x**.
### How it works
```
Ç¡    Main link. Argument: x
Ç¡    Call the second helper link x times, which initial argument x.
*3Ḥ‘÷Ç  Second helper link. Argument: t
*3      Compute t³.
  Ḥ     Unhalve; yield 2t³.
   ‘    Increment; yield 2t³+1.
     Ç  Call the first helper link with argument t.
    ÷   Divide the left result by the right one.
²×3’    First helper link. Argument: t
²       Compute t².
 ×3     Compute 3t².
   ’    Decrement; yield 3t²-1.
```
[Answer]
# [Julia 0.5](http://julialang.org/), ~~44~~ 40 bytes
```
|(x,r=1)=x<1?r:~-x|big(2r^3+1)//(3r^2-1)
```
Uses rationals and Newton's method.
[Try it online!](https://tio.run/##yyrNyUw0/f@/RqNCp8jWUNO2wsbQvsiqTreiJikzXcOoKM5Y21BTX1/DuCjOSNdQ839afpFChUJmnoKGoZWhgSYXZ5GCrQJQN5BVUJSZV5KTp1Gko6Ck8KizQ0FJRyEtJz@xRKNIU5MrNS/lPwA "Julia 0.5 – Try It Online")
[Answer]
# [APL (Dyalog Extended)](https://github.com/abrudz/dyalog-apl-extended), 19 bytes
```
{{(⍺+⍵*÷3)*÷3}/⍵/1}
```
[Try it online!](https://tio.run/##SyzI0U2pTMzJT9dNrShJzUtJTfn/qG9qQMCjtgnGJv@rqzUe9e7SftS7VevwdmNNEFGrD@TpG9b@TwMqedTb96ir@VHvmke9Ww6tN37UNhGoOTjIGUiGeHgG/09TMORKUzACYmMgNgFiUyA2A2JDAwMDAA "APL (Dyalog Extended) – Try It Online")
Uses the cube root approximation method, which very, very slowly creeps towards the value of the plastic number.
## Explanation
```
{{(⍺+⍵*÷3)*÷3}/⍵/1} ⍵ → input
               ⍵/1} replicate 1 ⍵ times
 {           }/     reduce by inner fn:
          *÷3       cube root of
     ⍵*÷3           cube root of right arg
   ⍺+               plus left arg
```
[Answer]
# [Rust](https://www.rust-lang.org/), 66 bytes
```
|n|{let mut i=(1,1,1);for _ in 0..n{i=(i.1,i.2,i.0+i.1)}(i.1,i.2)}
```
[Try it online!](https://tio.run/##RUzLDsIgELzzFWtPbESk9ibBXzEmlmSTsjUVTpRvRzAxZg4zmdeW3rF6hvAglpiXOYK/epY0XfB066S6dHXn/ZuGFIGcHFUDWr9ucAdiMFpzbj7pUZFuI22OTWP5OViqFf1AcgrqOfMa0Hk5GbTitRHHhQ9yyOWcy6D@FStK/QA "Rust – Try It Online")
Uses the padovan sequence to approximate the plastic number. Returns a tupled `(num,denom)`. A readable version that works with arbitrary precision integers can be found [here](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&code=use%20num%3A%3ABigUint%3B%0A%0Afn%20main()%7B%0A%20%20%20%20let%20f%3Afn(i32)-%3E(BigUint%2CBigUint)%20%3D%20%7Cn%7C%7B%0A%20%20%20%20%20%20%20%20let%20mut%20i%3D(1u32.into()%2C1u32.into()%2C1u32.into())%3B%0A%20%20%20%20%20%20%20%20for%20_%20in%200..n%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20let%20tmp%20%3D%20%26i.0%2B%26i.1%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20i%3D(i.1%2Ci.2%2Ctmp)%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20(i.1%2Ci.2)%0A%20%20%20%20%7D%3B%0A%20%20%20%20let%20(num%2Cdenom)%20%3D%20f(900)%3B%0A%20%20%20%20println!(%22%7B%7D%2F%7B%7D%22%2Cnum%2Cdenom)%3B%0A%7D).
[Answer]
# AWK, 34 bytes
```
{for(;$1^3>$1+1;)$1=($1+1)^(1/3)}1
```
Step by step:
```
{                  # $1 is the input (a positive integer)
for(;$1^3>$1+1;)   # as long as $1 cubed is bigger than the input plus one
  $1=($1+1)^(1/3)  # assigns $1 this new value: cube root of $1 plus one
}
1                  # prints $1
```
[Try it online!](https://tio.run/##SyzP/v@/Oi2/SMNaxTDO2E7FUNvQWlPF0FYDxNKM0zDUN9asNfz/34jLmMuUy9CAy8zEnMvS0NjQxMwcAA "AWK – Try It Online")
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E), 23 bytes
```
U[X3m¹/¹/¹X+›#X>U]X'/¹J
```
[Try it online!](https://tio.run/##MzBNTDJM/f8/NDrCOPfQTn0witB@1LBLOcIuNDZCHcj1@v/f0AAIAA "05AB1E – Try It Online")
---
Direct port of <https://codegolf.stackexchange.com/a/126822/59376> by xnor.
[Answer]
# [Charcoal](https://github.com/somebody1234/Charcoal), 28 bytes
```
ＡＩθθＡθνＷ‹∕∕Ｘν³θθ⁺νθＡ⁺ν¹νＩ∕νθ
```
[Try it online!](https://tio.run/##S85ILErOT8z5/9@xuDgzPU/DObG4RKNQU0ehUNOaCypWqKOQB@SVZ2TmpCpo2Gh45pW4ZJZlpqQisbS0NPJ0FIzBGiFYGyRQqKmpyaUABFCjwIKGmiADuQKKMvNKIBYizIHq@f/f0MjY/L9u2X/d4hwA "Charcoal – Try It Online") Link to verbose mode. Also I apparently messed up `Divide` and `IntDivide` :|  
Uses the same method as the Python and JavaScript answers.
[Answer]
# [NewStack](https://github.com/LyamBoylan/NewStack), 14 bytes
```
¹Fᵢ{E2x³⁺÷3x²⁻
```
### Break down:
```
¹                Add arbitrary number 1 to the stack.
 Fᵢ{             Define for loop with a user's input amount of itterations.
    E            Define new edit for element 0 (element 0 being the 1 added. earlier).
     2x³⁺÷3x²⁻   update x to equal (2x^3+1)/(3x^2-1). (x = element 0).
```
### How it works:
The formula (2x3+1)/(3x2-1) comes from the simplification of [Newton's method](https://en.wikipedia.org/wiki/Newton%27s_method) for the equasion x3=x+1. You can find it [here](https://www.wolframalpha.com/input/?i=simplify%20x-(x%5E3-x-1)%2F(3x%5E2-1)). Repeating this process an infinite amoune of times converges to the plastic number. It's rate of convergence is rather quick at around 2.6 decimals per iteration.
```
INPUT ITERATION >> VALUE
0 >> 1
1 >> 1.5
2 >> 1.3478260869565217
3 >> 1.325200398950907
4 >> 1.3247181739990537
5 >> 1.3247179572447898
6 >> 1.324717957244746    <- 16 decimal precision in 6 iterations!
...
100 >> 1.324717957244746
```
# Padovan sequence alternative, 27 25 17 bytes
```
¹Fᵢ{[ƨ2+ƨ3]ℲƤƨ/ƨ2
```
### Break down:
```
¹                  Append first element of Padovan sequence.
 Fᵢ{       Ⅎ       Define for loop of user's input amount of iterations.
    [ƨ2+ƨ3]        Append sum second and third to last elements.
            Ƥƨ/ƨ2  Print ratio of last two elements.
```
-2 bytes by choosing better print strategy
-8 bytes by choosing better way to index stack
### How it works:
As the [Padovan sequence](https://en.wikipedia.org/wiki/Padovan_sequence) continues, the ratio of the last two elements converge to the plastic number.
```
INPUT ITERATION >> VALUE
0 >> 1
1 >> 2
...
10 >> 1.3157894736842106
...
89 >> 1.324717957244746    <- 16 decimal precision in 89 iterations
...
100> > 1.324717957244746
```
[Answer]
# [Ruby](https://www.ruby-lang.org/), 35 bytes
```
->x{n=1;n+=0.1**x while n**3-n<1;n}
```
[Try it online!](https://tio.run/##KypNqvyfZvtf166iOs/W0DpP29ZAz1BLq0KhPCMzJ1UhT0vLWDfPBihR@79AIS3aMJYLRBlBKGMIZRL7HwA "Ruby – Try It Online")
[Answer]
## Clojure, 46 bytes
```
#(nth(iterate(fn[i](Math/pow(inc i)(/ 3)))1)%)
```
Uses the iterated cube-root formula. This is a bit more interesting but longer:
```
(def f #(apply comp(repeat %(fn[i](Math/pow(inc i)(/ 3))))))
((f 10)1)
1.3247179361449652
```
[Answer]
## Javascript, 36 bytes
```
f=(x,n=x)=>n**3/x/x<n+x?f(x,++n):n/x
```
Works the same as the top python answer. No `console.log` was included because if you run `f(x)` in console it will be logged automatically.
```
f=(x,n=x)=>n**3/x/x<n+x?f(x,++n):n/x
console.log(f(300))
```
[Answer]
# [><>](https://esolangs.org/wiki/Fish), 38+3 = 41 bytes
```
11\n;
?!\}2,:01{::::}**-+0(?$-{+{1-:}
```
Expects the input to be present on the stack at program start, so +3 bytes for the `-v` flag.
[Try it online!](https://tio.run/##S8sszvj/39AwJs@ay14xptZIx8rAsNoKCGq1tHS1DTTsVXSrtasNda1q////r1umYGoAAA "><> – Try It Online")
Effectively performs a binary search to narrow in on the output value. Increasing `x` increases the number of iterations to perform.
*Edit: refactored calculation slightly to save 1 byte, previous version:*
```
11\n;
?!\}2,:0{::::}**$-1-0)?$-{+{1-:}
```
[Answer]
# k, 27 bytes
```
{"/"/$1_|x({y,z,x+y}.)/3#1}
```
[Try it online!](https://tio.run/##y9bNz/7/v1pJX0lfxTC@pkKjulKnSqdCu7JWT1PfWNmwVl3R0MDg/38A "K (oK) – Try It Online") This assumes infinite integers (which, alas, is not true). It uses the [Padovan sequence](https://en.wikipedia.org/wiki/Padovan_sequence).
[Answer]
# TI-BASIC, 21 bytes
```
:Prompt X //Prompt for input, 3 bytes
:While X  //While X, 3 bytes
:³√(1+Y→Y //Calculate cube root of 1+Y and store to Y, 7 bytes
:DS<(X,0  //Decrement X and skip next command (which doesn't do anything), 5 bytes
:End      //End While loop, 2 bytes
:Y        //Display Y, 1 byte
```
Uses this [recursive formula](https://en.wikipedia.org/wiki/Plastic_number#Recurrences).
Interestingly, hard-coding the number and rounding it gives the same byte-count:
# TI-BASIC, 21 bytes
```
:Prompt X    //Prompt for input, 3 bytes
:.5√(3       //Store √(3)/2 to Ans, 5 bytes
:Ansֿ¹cosh(3ֿ¹coshֿ¹(3Ans //Store the plastic number to Ans, 9 bytes
:round(Ans,X //Round the plastic number X decimal digits, 4 bytes
```
Uses this [trigonometric formula](https://en.wikipedia.org/wiki/Plastic_number#Trigonometry).
[Answer]
## [C#](https://tio.run/##tVI7b8IwEN75Fad0iE2DIaBOiKlSpUpQRaJqB8RgEhcsJXZlXyAVym9PnYRX6NwbPNx9j/tOju0g00pXVW6l2sLyx6LIpr045dZCdOyBK4scZQx7LRNYcKmIRePAqzVws7W0wbTIup61sjoV7NNIFHOpBImcmBN4y7ONMEQqZBE3VpCavRqtKaXThl3Wz61j6wN/@FDcm8ovIAXMZjCmcGnWZQTmRoEXDkNvepnsuYEEZnfKBQwgpGz5nUok/tCnXcLGEdr7MJdxLwyyd/2qcDImSR2ji44d@ho1WYW3gNNWbT72ok3GkXjHUTk8hqUXdCOQMfTd3XHHIn0gmwAmFB6vjbhu0A7D7bVspIkSh5ML8R/8oNlowYsPnubiiqJsLtQWd5QGXefJnbO7bt8lG/yT@/kf9Mqqqp5@AQ), 317 bytes
```
using m=System.Math;a=x=>{if(a==0)return "1/1";var d=a(x-1).Split('/');var b=int.Parse(d[0]);var c=int.Parse(d[1]);return string.Format("{0}/{1}",(2*m.Pow(b,3)+m.Pow(c,3)).ToString(new string('#',int.MaxValue.ToString().Length)),(3*m.Pow(b,2)*c-m.Pow(c,3)).ToString(new string('#',int.MaxValue.ToString().Length)));};
```
It returns the result as a fraction.
### Explanation
It uses the Newton's method with x iterations for finding the root of the polynomial p^3-p-1=0. The formula is x\_n=1-(f(x\_(n-1)))/(f'(x\_(n-1))), and x\_0 is a starting point.
The polynomials derivative is 3p^2-1, and let's say x\_(n-1)=b/c. Then, by using the above formula we get, that x\_n=(2 b^3+c^3)/(3 b^2 c-c^3). Let's also say, that we start from 1, this will happen, when x=2, because x>1, and is an integer. Idented, and commented code:
```
using System;
string PlasticNumber(int x)
{
    if (x == 2) 
        return "1/1";                 
//If x=2, we return our starting value, but we need to return it as a fraction
    var d = PlasticNumber(x - 1).Split('/');
    var b = System.Convert.ToInt32(d[0]);
    var c = int.Parse(d[1]);
//We parse the previous value of the fraction, and put it into two variables
    return string.Format("{0}/{1}", 
        (2 * Math.Pow(b, 3) + Math.Pow(c, 3))
        .ToString(new string('#', int.MaxValue.ToString().Length)),
        (3 * Math.Pow(b, 2) * c - Math.Pow(c, 3))
        .ToString(new string('#', int.MaxValue.ToString().Length)));
//We return the result as a fraction, but it's important not to return it in
  scientific notation, because that will cause issues in the parsing process 
}
```
[Answer]
# PHP, 86 bytes
```
for($p=[1,1,1];$i++<$argn;)$p[]=bcadd($p[$i],$p[$i-1]);echo bcdiv($p[$i+1],$p[$i],$i);
```
[PHP Sandbox Online](http://sandbox.onlinephpfunctions.com/code/06b11e67f076ef77255504ca2566fedc36e1df4d)
Creates the [Padovan Spiral](https://oeis.org/A134816) and print the ratio of the last two numbers.
[Answer]
# Axiom, 96 bytes
```
h(n:NNI):Float==(n>1.E5=>-1;n:=n+1;j:=digits(n::PI);r:=solve(x^3-x=1,10.^-n);digits(j);rhs(r.1))
```
results
```
(31) -> [h(i) for i in 0..10]
   (31)
   [1.0, 1.3, 1.33, 1.325, 1.3247, 1.32472, 1.324718, 1.324718, 1.32471796,
    1.324717957, 1.3247179572]
                                                         Type: List Float
```
how you can see h(2) should be 1.32 and not 1.33 so there is some error in last digits 
Then there would be this one of 110 bytes
```
g(n:NNI):Float==(n>1.E5=>-1;n:=n+1;j:=digits(n::PI);x:=sqrt(23./108);r:=(.5+x)^(1/3)+(.5-x)^(1/3);digits(j);r)
```
It use the formula for resolve equation of III grade of type x^3-3\*p\*x-2\*q=0
in the case q^2-p^3>=0 that is m=sqrt(q^2-p^3) and x=(q+m)^(1/3)+(q-m)^(1/3)
In our case r^3-r-1=0 this can be written as r^3-3\*(1/3)r-2\*(1/2)=0 so p=1/3 q=1/2 m=1/4-1/27=23/108
x=(0.5+m)^(1/3)+(0.5-m)^(1/3)
this one that use Newton iteration with start point r=1
```
f(n:NNI):Float==(n>1.E5=>-1;n:=n+1;j:=digits(n::PI);e:=10^-n;r:=1.;repeat(v:=(r^3-r-1)/(3*r^2-1);abs(v)<e=>break;r:=r-v);digits(j);r)
```
it change in the function, digits value for obtain one obj of n+1 digits afther 
the float point. At end the digits() value is assigned back to preciding value.
]