Could someone give me a brief explanation as to why n+(n-1) doesn't work? Mathematically it does but i'm not sure how to tell ruby this is what i'm looking for? As the title suggests, the code is supposed to return a Fibonacci sequence.
startyear = []
(1..100).each do |n|
puts n+(n-1)
startyear.push(n)
end