Post History
Japt, 11 9 bytes Outputs the first n terms. Change the h to g to get the nth 0-indexed term. ÈÑ+ZÔÅÎ}h Try it ÈÑ+ZÔÅÎ}h :Implicit input of integer U È :Function taking an int...
Answer
#4: Post edited
- # [Japt](https://github.com/ETHproductions/japt), <s>11</s> 9 [bytes](https://en.wikipedia.org/wiki/ISO/IEC_8859-1)
- Outputs the first `n` terms. Change the `h` to `g` to get the `n`th 0-indexed term.
- ÈÑ+ZÔÅÎ}h
[Try it](https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&code=yNErWtTFzn1o&input=MTM)
- # [Japt](https://github.com/ETHproductions/japt), <s>11</s> 9 [bytes](https://en.wikipedia.org/wiki/ISO/IEC_8859-1)
- Outputs the first `n` terms. Change the `h` to `g` to get the `n`th 0-indexed term.
- ÈÑ+ZÔÅÎ}h
- [Try it](https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&code=yNErWtTFzn1o&input=MTM)
- ÈÑ+ZÔÅÎ}h :Implicit input of integer U
- È :Function taking an integer X and an array Z as arguments
- Ñ : X*2
- + : Plus
- ZÔ : Reverse Z
- Å : Slice off the first element
- Î : Get the first element
- } :End function
- h :Starting with the array [0,1] repeatedly pass it (Z)
- and its last element (X) through that function
- pushing the result back to it each time until it reaches length U
#3: Post edited
# [Japt](https://github.com/ETHproductions/japt), 11 [bytes](https://en.wikipedia.org/wiki/ISO/IEC_8859-1)- Outputs the first `n` terms. Change the `h` to `g` to get the `n`th 0-indexed term.
@ZäÈ+YÑÃÌ}h[Try it](https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&code=QFrkyCtZ0cPMfWg&input=MTM)@ZäÈ+YÑÃÌ}h :Implicit input of integer U@ :Function taking an array Z as argumentZä : Consecutive pairsÈ : Reduced by passing through the following function as X & Y+YÑ : X+Y*2à : End reduceÌ : Last element} :End functionh :Starting with [0,1] pass it through the function, pushing the result back to it until it reaches length U
- # [Japt](https://github.com/ETHproductions/japt), <s>11</s> 9 [bytes](https://en.wikipedia.org/wiki/ISO/IEC_8859-1)
- Outputs the first `n` terms. Change the `h` to `g` to get the `n`th 0-indexed term.
- ÈÑ+ZÔÅÎ}h
- [Try it](https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&code=yNErWtTFzn1o&input=MTM)
#2: Post edited
- # [Japt](https://github.com/ETHproductions/japt), 11 [bytes](https://en.wikipedia.org/wiki/ISO/IEC_8859-1)
- Outputs the first `n` terms. Change the `h` to `g` to get the `n`th 0-indexed term.
- @ZäÈ+YÑÃÌ}h
[Try it](https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&code=QFrkyCtZ0cPMfWg&input=MTM)
- # [Japt](https://github.com/ETHproductions/japt), 11 [bytes](https://en.wikipedia.org/wiki/ISO/IEC_8859-1)
- Outputs the first `n` terms. Change the `h` to `g` to get the `n`th 0-indexed term.
- @ZäÈ+YÑÃÌ}h
- [Try it](https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&code=QFrkyCtZ0cPMfWg&input=MTM)
- @ZäÈ+YÑÃÌ}h :Implicit input of integer U
- @ :Function taking an array Z as argument
- Zä : Consecutive pairs
- È : Reduced by passing through the following function as X & Y
- +YÑ : X+Y*2
- Ã : End reduce
- Ì : Last element
- } :End function
- h :Starting with [0,1] pass it through the function, pushing the result back to it until it reaches length U
#1: Initial revision
# [Japt](https://github.com/ETHproductions/japt), 11 [bytes](https://en.wikipedia.org/wiki/ISO/IEC_8859-1) Outputs the first `n` terms. Change the `h` to `g` to get the `n`th 0-indexed term. @ZäÈ+YÑÃÌ}h [Try it](https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&code=QFrkyCtZ0cPMfWg&input=MTM)