Skip to main content
added 117 characters in body
Source Link

R, 37 3535 31 bytes

Nothing original, given the previous answers:

(((3+5^.5)/2)^(scan()+1)/5)%/%1*4+2 

was 35 bytes, but Guiseppe got rid of four parentheses

((3+5^.5)/2)^(scan()+1)%/%5*4+2 

Try it online!

R, 37 35 bytes

Nothing original, given the previous answers:

(((3+5^.5)/2)^(scan()+1)/5)%/%1*4+2 

Try it online!

R, 37 35 31 bytes

Nothing original, given the previous answers:

(((3+5^.5)/2)^(scan()+1)/5)%/%1*4+2 

was 35 bytes, but Guiseppe got rid of four parentheses

((3+5^.5)/2)^(scan()+1)%/%5*4+2 

Try it online!

added 18 characters in body
Source Link

R, 3737 35 bytes

Nothing original, given the previous answers:

n=scan()+1;(((3+5^.5)/2)^n^(scan()+1)/5)%/%1*4+2 

Try it online!Try it online!

R, 37 bytes

Nothing original, given the previous answers:

n=scan()+1;(((3+5^.5)/2)^n/5)%/%1*4+2 

Try it online!

R, 37 35 bytes

Nothing original, given the previous answers:

(((3+5^.5)/2)^(scan()+1)/5)%/%1*4+2 

Try it online!

Source Link

R, 37 bytes

Nothing original, given the previous answers:

n=scan()+1;(((3+5^.5)/2)^n/5)%/%1*4+2 

Try it online!