7 removed LaTeX in preparation of disabling MathJax
source | link

CJam, 51 50 bytes

$$\varphi=1+""\cfrac1{1+"ri:R*'\"ddots"R!>'}R*'$_

Code explanation:

"$$\varphi=1+"             "This is a static string";
  "\cfrac1{1+"ri:R*'\      "Repeat this string input number times. Put a \ at the end";
"ddots"R!>             "If input is 0, remove 1st characters, else not";
  '}R*                 "Put the closing bracket R times";
    '$_                "The final $$";

Few examples:

N = 0

$$\varphi=1+\dots$$

$$\varphi=1+\dots$$

N = 4

$$\varphi=1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\ddots}}}}$$

$$\varphi=1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\ddots}}}}$$

N = 15

$$\varphi=1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\ddots}}}}}}}}}}}}}}}$$

$$\varphi=1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\ddots}}}}}}}}}}}}}}}$$

UPDATE - 1 byte saved thanks to Sp3000!

Try it online here

CJam, 51 50 bytes

$$\varphi=1+""\cfrac1{1+"ri:R*'\"ddots"R!>'}R*'$_

Code explanation:

"$$\varphi=1+"             "This is a static string";
  "\cfrac1{1+"ri:R*'\      "Repeat this string input number times. Put a \ at the end";
"ddots"R!>             "If input is 0, remove 1st characters, else not";
  '}R*                 "Put the closing bracket R times";
    '$_                "The final $$";

Few examples:

N = 0

$$\varphi=1+\dots$$


N = 4

$$\varphi=1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\ddots}}}}$$


N = 15

$$\varphi=1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\ddots}}}}}}}}}}}}}}}$$

UPDATE - 1 byte saved thanks to Sp3000!

Try it online here

CJam, 51 50 bytes

$$\varphi=1+""\cfrac1{1+"ri:R*'\"ddots"R!>'}R*'$_

Code explanation:

"$$\varphi=1+"             "This is a static string";
  "\cfrac1{1+"ri:R*'\      "Repeat this string input number times. Put a \ at the end";
"ddots"R!>             "If input is 0, remove 1st characters, else not";
  '}R*                 "Put the closing bracket R times";
    '$_                "The final $$";

Few examples:

N = 0

$$\varphi=1+\dots$$

N = 4

$$\varphi=1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\ddots}}}}$$

N = 15

$$\varphi=1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\ddots}}}}}}}}}}}}}}}$$

UPDATE - 1 byte saved thanks to Sp3000!

Try it online here

6 edited body
source | link

CJam, 51 50 bytes

$$\varphi=1+""\cfrac1{1+"ri:R*'\"ddots"R!>'}R*'$_

Code explanation:

"$$\varphi=1+"             "This is a static string";
  "\cfrac1{1+\\"ri:R*'\    "Repeat this string input number times. Put a \ at the end";
"ddots"R!>             "If input is 0, remove 1st characters, else not";
  '}R*                 "Put the closing bracket R times";
    '$_                "The final $$$$\varphi=1+"             "This is a static string";
  "\cfrac1{1+"ri:R*'\      "Repeat this string input number times. Put a \ at the end";
"ddots"R!>             "If input is 0, remove 1st characters, else not";
  '}R*                 "Put the closing bracket R times";
    '$_                "The final $$";

Few examples:

N = 0

$$\varphi=1+\dots$$


N = 4

$$\varphi=1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\ddots}}}}$$


N = 15

$$\varphi=1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\ddots}}}}}}}}}}}}}}}$$

UPDATE - 1 byte saved thanks to Sp3000!

Try it online here

CJam, 51 50 bytes

$$\varphi=1+""\cfrac1{1+"ri:R*'\"ddots"R!>'}R*'$_

Code explanation:

"$$\varphi=1+"             "This is a static string";
  "\cfrac1{1+\\"ri:R*'\    "Repeat this string input number times. Put a \ at the end";
"ddots"R!>             "If input is 0, remove 1st characters, else not";
  '}R*                 "Put the closing bracket R times";
    '$_                "The final $$";

Few examples:

N = 0

$$\varphi=1+\dots$$


N = 4

$$\varphi=1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\ddots}}}}$$


N = 15

$$\varphi=1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\ddots}}}}}}}}}}}}}}}$$

UPDATE - 1 byte saved thanks to Sp3000!

Try it online here

CJam, 51 50 bytes

$$\varphi=1+""\cfrac1{1+"ri:R*'\"ddots"R!>'}R*'$_

Code explanation:

"$$\varphi=1+"             "This is a static string";
  "\cfrac1{1+"ri:R*'\      "Repeat this string input number times. Put a \ at the end";
"ddots"R!>             "If input is 0, remove 1st characters, else not";
  '}R*                 "Put the closing bracket R times";
    '$_                "The final $$";

Few examples:

N = 0

$$\varphi=1+\dots$$


N = 4

$$\varphi=1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\ddots}}}}$$


N = 15

$$\varphi=1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\ddots}}}}}}}}}}}}}}}$$

UPDATE - 1 byte saved thanks to Sp3000!

Try it online here

5 Rollback to Revision 3
source | link

CJam, 51 50 bytes

$$\varphi=1+""\cfrac1{1+"ri:R*'\"ddots"R!>'}R*'$_

Code explanation:

"$$\varphi=1+"             "This is a static string";
  "\cfrac1{1+\\"ri:R*'\    "Repeat this string input number times. Put a \ at the end";
"ddots"R!>             "If input is 0, remove 1st characters, else not";
  '}R*                 "Put the closing bracket R times";
    '$_                "The final $$";

Few examples:

N = 0

$$\varphi=1+\dots$$


N = 4

$$\varphi=1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\ddots}}}}$$


N = 15

$$\varphi=1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\ddots}}}}}}}}}}}}}}}$$

UPDATE - 1 byte saved thanks to Sp3000!


Pyth, 49 bytes

Here is a direct translation of the above code in Pyth, where it saves 1 byte:

s("$$\varphi=1+"*"\cfrac1{1+"Q\\>"ddots"!Q*Q\}"$$

Try it online here

Try it online here

CJam, 51 50 bytes

$$\varphi=1+""\cfrac1{1+"ri:R*'\"ddots"R!>'}R*'$_

Code explanation:

"$$\varphi=1+"             "This is a static string";
  "\cfrac1{1+\\"ri:R*'\    "Repeat this string input number times. Put a \ at the end";
"ddots"R!>             "If input is 0, remove 1st characters, else not";
  '}R*                 "Put the closing bracket R times";
    '$_                "The final $$";

Few examples:

N = 0

$$\varphi=1+\dots$$


N = 4

$$\varphi=1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\ddots}}}}$$


N = 15

$$\varphi=1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\ddots}}}}}}}}}}}}}}}$$

UPDATE - 1 byte saved thanks to Sp3000!


Pyth, 49 bytes

Here is a direct translation of the above code in Pyth, where it saves 1 byte:

s("$$\varphi=1+"*"\cfrac1{1+"Q\\>"ddots"!Q*Q\}"$$

Try it online here

Try it online here

CJam, 51 50 bytes

$$\varphi=1+""\cfrac1{1+"ri:R*'\"ddots"R!>'}R*'$_

Code explanation:

"$$\varphi=1+"             "This is a static string";
  "\cfrac1{1+\\"ri:R*'\    "Repeat this string input number times. Put a \ at the end";
"ddots"R!>             "If input is 0, remove 1st characters, else not";
  '}R*                 "Put the closing bracket R times";
    '$_                "The final $$";

Few examples:

N = 0

$$\varphi=1+\dots$$


N = 4

$$\varphi=1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\ddots}}}}$$


N = 15

$$\varphi=1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\ddots}}}}}}}}}}}}}}}$$

UPDATE - 1 byte saved thanks to Sp3000!

Try it online here

4 added 342 characters in body
source | link
3 added 66 characters in body
source | link
2 added 339 characters in body
source | link
1
source | link