5 removed LaTeX in preparation of disabling MathJax
source | link

Ruby, 76 75 71 70 bytes

This feels suspiciously straightforward, so please let me know if I messed up somewhere.

Incidentally, this is the first thing I've ever written in Ruby - I was looking for a language that supported string repetition by multiplying, and Ruby seemed to do the trick.

f=proc{|n|'$$\varphi=1+'+'\cfrac1{1+'*n+'\dd'[0,n+2]+'ots'+'}'*n+'$$'}

To be applied like so:

f.call(0)

$$\varphi=1+\dots$$

$$\varphi=1+\dots$$

f.call(3)
$$\varphi=1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\ddots}}}$$

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

Ruby, 76 75 71 70 bytes

This feels suspiciously straightforward, so please let me know if I messed up somewhere.

Incidentally, this is the first thing I've ever written in Ruby - I was looking for a language that supported string repetition by multiplying, and Ruby seemed to do the trick.

f=proc{|n|'$$\varphi=1+'+'\cfrac1{1+'*n+'\dd'[0,n+2]+'ots'+'}'*n+'$$'}

To be applied like so:

f.call(0)

$$\varphi=1+\dots$$

f.call(3)

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

Ruby, 76 75 71 70 bytes

This feels suspiciously straightforward, so please let me know if I messed up somewhere.

Incidentally, this is the first thing I've ever written in Ruby - I was looking for a language that supported string repetition by multiplying, and Ruby seemed to do the trick.

f=proc{|n|'$$\varphi=1+'+'\cfrac1{1+'*n+'\dd'[0,n+2]+'ots'+'}'*n+'$$'}

To be applied like so:

f.call(0)
$$\varphi=1+\dots$$

f.call(3)
$$\varphi=1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\ddots}}}$$
4 added 9 characters in body
source | link

Ruby, 76 75 7171 70 bytes

This feels suspiciously straightforward, so please let me know if I messed up somewhere.

Incidentally, this is the first thing I've ever written in Ruby - I was looking for a language that supported string repetition by multiplying, and Ruby seemed to do the trick.

f=proc{|n|'$$\varphi=1+'+'\cfrac1{1+'*n+'\d'+'d'[0,n]+'ots'+'}'*n+'$$$$\varphi=1+'+'\cfrac1{1+'*n+'\dd'[0,n+2]+'ots'+'}'*n+'$$'}

To be applied like so:

f.call(0)

$$\varphi=1+\dots$$

f.call(3)

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

Ruby, 76 75 71 bytes

This feels suspiciously straightforward, so please let me know if I messed up somewhere.

Incidentally, this is the first thing I've ever written in Ruby - I was looking for a language that supported string repetition by multiplying, and Ruby seemed to do the trick.

f=proc{|n|'$$\varphi=1+'+'\cfrac1{1+'*n+'\d'+'d'[0,n]+'ots'+'}'*n+'$$'}

To be applied like so:

f.call(0)

$$\varphi=1+\dots$$

f.call(3)

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

Ruby, 76 75 71 70 bytes

This feels suspiciously straightforward, so please let me know if I messed up somewhere.

Incidentally, this is the first thing I've ever written in Ruby - I was looking for a language that supported string repetition by multiplying, and Ruby seemed to do the trick.

f=proc{|n|'$$\varphi=1+'+'\cfrac1{1+'*n+'\dd'[0,n+2]+'ots'+'}'*n+'$$'}

To be applied like so:

f.call(0)

$$\varphi=1+\dots$$

f.call(3)

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

3 added 6 characters in body
source | link

Ruby, 76 7575 71 bytes

This feels suspiciously straightforward, so please let me know if I messed up somewhere.

Incidentally, this is the first thing I've ever written in Ruby - I was looking for a language that supported string repetition by multiplying, and Ruby seemed to do the trick.

f=proc{|n|'$$\varphi=1+'+'\cfrac1{1+'*n+'\d'+(n>0?'d':'')+'ots'+'}'*n+'$$$$\varphi=1+'+'\cfrac1{1+'*n+'\d'+'d'[0,n]+'ots'+'}'*n+'$$'}

To be applied like so:

f.call(0)

$$\varphi=1+\dots$$

f.call(3)

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

Ruby, 76 75 bytes

This feels suspiciously straightforward, so please let me know if I messed up somewhere.

Incidentally, this is the first thing I've ever written in Ruby - I was looking for a language that supported string repetition by multiplying, and Ruby seemed to do the trick.

f=proc{|n|'$$\varphi=1+'+'\cfrac1{1+'*n+'\d'+(n>0?'d':'')+'ots'+'}'*n+'$$'}

To be applied like so:

f.call(0)

$$\varphi=1+\dots$$

f.call(3)

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

Ruby, 76 75 71 bytes

This feels suspiciously straightforward, so please let me know if I messed up somewhere.

Incidentally, this is the first thing I've ever written in Ruby - I was looking for a language that supported string repetition by multiplying, and Ruby seemed to do the trick.

f=proc{|n|'$$\varphi=1+'+'\cfrac1{1+'*n+'\d'+'d'[0,n]+'ots'+'}'*n+'$$'}

To be applied like so:

f.call(0)

$$\varphi=1+\dots$$

f.call(3)

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

2 saved 1 byte
source | link
1
source | link