05AB1E, 23(削除) 23 (削除ここまで) 22 bytes
>LÅfü2ε'+ý ̄Oú'=y¬g>ˆOJÌLÅfü3ε„+=.ιJ ̄Oú,yнg>ˆ
-1 byte after being inspired by @JonathanAllan's Jelly answer
Outputs the first \$n\$ lines.
TheOr a minor 22 bytes alternative:
ÌLÅfDü3„+=δ.ιJs€g>.\ú»
And the infinite sequence would be 2322 bytes as well:
∞Åfü2vy'+ý ̄Oú'=y¬g>ˆOJ∞Åfü3vy„+=.ιJ ̄Oú,yнg>ˆ
>Ì # Increase the (implicit) input-integer by 12
L # Pop and push a list in the range [1,input+1]input+2]
Åf # Get the 0-based n'th Fibonacci value for each of these
ü2ü3 # Pop and push all overlapping pairstriplets of this list
ε # Foreach over the pairstriplets:
# (implicitly push the paircurrent triplet)
'+ý „+=.ι '# # Join theIntersperse pairit with "+" delimiterand "=" delimiters
J # Join this list together to a string
̄ # Push the global_array (empty by default)
O O # Sum it together
ú ú # Pad the string with that many leading spaces
'= , '# Push# a "="
Pop and output this line with trailing newline
y # Push the pair again
н ¬ # PushPop and push its first item (without popping the pair)
g # Pop and push its length
> # Increase it by 1
ˆ # Pop and add it to the global_array
O # Sum the pair
J # Join the three values on the stack together
, # Pop and output this line with trailing newline
05AB1E, 23 bytes
>LÅfü2ε'+ý ̄Oú'=y¬g>ˆOJ,
Outputs the first \$n\$ lines.
The infinite sequence would be 23 bytes as well:
∞Åfü2vy'+ý ̄Oú'=y¬g>ˆOJ,
> # Increase the (implicit) input-integer by 1
L # Pop and push a list in the range [1,input+1]
Åf # Get the 0-based n'th Fibonacci value for each of these
ü2 # Pop and push all overlapping pairs of this list
ε # Foreach over the pairs:
# (implicitly push the pair)
'+ý '# Join the pair with "+" delimiter
̄ # Push the global_array (empty by default)
O # Sum it together
ú # Pad the string with that many leading spaces
'= '# Push a "="
y # Push the pair again
¬ # Push its first item (without popping the pair)
g # Pop and push its length
> # Increase it by 1
ˆ # Pop and add it to the global_array
O # Sum the pair
J # Join the three values on the stack together
, # Pop and output this line with trailing newline
05AB1E, (削除) 23 (削除ここまで) 22 bytes
ÌLÅfü3ε„+=.ιJ ̄Oú,yнg>ˆ
-1 byte after being inspired by @JonathanAllan's Jelly answer
Outputs the first \$n\$ lines.
Or a minor 22 bytes alternative:
ÌLÅfDü3„+=δ.ιJs€g>.\ú»
And the infinite sequence would be 22 bytes as well:
∞Åfü3vy„+=.ιJ ̄Oú,yнg>ˆ
Ì # Increase the (implicit) input-integer by 2
L # Pop and push a list in the range [1,input+2]
Åf # Get the 0-based n'th Fibonacci value for each of these
ü3 # Pop and push all overlapping triplets of this list
ε # Foreach over the triplets:
# (implicitly push the current triplet)
„+=.ι # Intersperse it with "+" and "=" delimiters
J # Join this list together to a string
̄ # Push the global_array (empty by default)
O # Sum it together
ú # Pad the string with that many leading spaces
, # Pop and output this line with trailing newline
y # Push the pair again
н # Pop and push its first item
g # Pop and push its length
> # Increase it by 1
ˆ # Pop and add it to the global_array
05AB1E, 23 bytes
>LÅfü2ε'+ý ̄Oú'=y¬g>ˆOJ,
Outputs the first \$n\$ lines.
The infinite sequence would be 23 bytes as well:
∞Åfü2vy'+ý ̄Oú'=y¬g>ˆOJ,
Explanation:
> # Increase the (implicit) input-integer by 1
L # Pop and push a list in the range [1,input+1]
Åf # Get the 0-based n'th Fibonacci value for each of these
ü2 # Pop and push all overlapping pairs of this list
ε # Foreach over the pairs:
# (implicitly push the pair)
'+ý '# Join the pair with "+" delimiter
̄ # Push the global_array (empty by default)
O # Sum it together
ú # Pad the string with that many leading spaces
'= '# Push a "="
y # Push the pair again
¬ # Push its first item (without popping the pair)
g # Pop and push its length
> # Increase it by 1
ˆ # Pop and add it to the global_array
O # Sum the pair
J # Join the three values on the stack together
, # Pop and output this line with trailing newline