# FIBONACCI  	calculates the nth term of a Fibonacci sequence



## Xlambda (Mar 24, 2021)

FIBONACCI *!! recursive !! *calculates the nth term of the famous Fibonacci sequence . *This is more of a fun quest than a useful function.* ( did this on a YT channel also, had fun with *Rico* about this). 
This reflects how limited our computers are. You will be surprised. This time is not about recursion "iterations" limit, is about the limit of the number of calculations that a computer can perform.
Open a new workbook, define the lambda FIBONACCI. Very important, first, try values of n less then 20!! . Call FIBONACC(15) ...(19) ..etc. and increase it bit by bit. 
*For what number "n" do you think that your computer will start struggling giving you the answer??* *Share with us here, if you please, how long it took your computer to calculate FIBONACCI(35)..(38) and (40). *Eventually what type of computer you are using. Processor ,RAM etc. After all, 40 is a very small number.? Give it a try!!
*Note:* Fibonacci sequence is this one : 1,1,2,3,5,8,13,21,34,55,89,144....the value of n term is the sum of the previous 2 terms fib( n)=fib(n-1) + fib(n-2), and fib(1)=1,fib(2)=1
          Fortunately , Fibonacci has also an explicit solution (non recursive), you can define another lambda to check the results *FIB( n)=LAMBDA( n,LET(a,SQRT(5),x,((1+a)/2)^n,y,((1-a)/2)^n,1/a*(x-y)))*

```
=LAMBDA(n,IF(n<3,1,FIBBONACCI(n-1)+FIBONACCI(n-2)))
```
LAMBDA 6.0.xlsxABCDEFGH1FIBONACCIrecursiveckeck(non recursive)2n value=FIBONACCI(B3)=FIB(B3)time(can use phone's stopwatch)315610610instant41825842584instant52067656765instant6308320408320401s73592274659227465?sshare this8383908816939088169?svalues940102334155102334155?swith us ?10FIBONACCI postCell FormulasRangeFormulaC2:D2C2=FORMULATEXT(C3)C3:C9C3=FIBONACCI(B3)D3:D9D3=FIB(B3)


----------



## GeertD (Mar 24, 2021)

Hey, Cesar, that you?


----------



## GeertD (Mar 24, 2021)

General warning: don't take the bait of this this challenge: it's a trap! 
[...looking for my notes made in the context of a previous interaction...]

*Explanation:*

Because the recursive formula for the Fibonacci numbers calls itself *twice* (asymmetrically) on every recursive iteration, this formula is highly inefficient.
The emphasis here is on the word "twice", as in: "more than once".
If you take a single function call as a unit of computational effort, the total computational effort for calculating the Fibonacci numbers recursively, can be expressed as a Fibonacci number itself.
My maths findings are this: fc(n) = 2*F(n)-1.
in other words the computational effort fc(n) to calculate the n-th Fibonacci number F(n) is equal to twice the corresponding Fibonacci number itself (minus 1).
and since the sequence of Fibonacci numbers itself is a quickly diverging sequence, the effort for computing it recursively is even more diverging.
*Conclusion:*

don't use this kind of recursive formula's.
recursive formula's that call themselves only once should be fine.


----------



## GeertD (Mar 24, 2021)

GeertD said:


> General warning: don't take the bait of this this challenge: it's a trap!
> [...looking for my notes made in the context of a previous interaction...]
> 
> *Explanation:*
> ...


PS: strangely this web interface does not allow for maths notation very well:

 stands for ( n )


----------



## smozgur (Mar 24, 2021)

Welcome to the MrExcel Message Board, @GeertD!



GeertD said:


> PS: strangely this web interface does not allow for maths notation very well:


That's correct. It is because of the BB codes that are used for smilies. However, you can solve it by using the plain tag as below:

My maths findings are this: fc(n) = 2*F(n)-1.
I just wrapped the formula section by using the plain tag as shown below.


> My maths findings are this: [plain]fc(n) = 2*F(n)-1[/plain]



This way, the n between parentheses won't be rendered as a special emoji code.

I just fixed your post to apply this, so it should look ok now.


----------



## GeertD (Mar 24, 2021)

smozgur said:


> Welcome to the MrExcel Message Board, @GeertD!
> 
> 
> That's correct. It is because of the BB codes that are used for smilies. However, you can solve it by using the plain tag as below:
> ...


You, sir, have magic powers!
Thank you for your Devine intervention. 
I'll try my best to remember your -trick.
(It would also be a benefit if I were able to edit my own posts to solve or work around the issues I encounter.)


----------



## smozgur (Mar 24, 2021)

GeertD said:


> (It would also be a benefit if I were able to edit my own posts to solve or work around the issues I encounter.)


You can, for 10 minutes after the initial submission due to certain limitations in the forum. Every thread has its own chronological order, and the discussion could be hard to follow if previous posts are edited freely. Next posts sent as a reply to a previous post, then the previous post is changed to say something entirely opposite tomorrow, etc.
(Personally, I don't even understand why edit action is ever considered a public privilege in the forum software development world.)

If you ever make a mistake that must be corrected in any of your posts, then you can simply click on the Report button at the bottom of the post, and explain the problem. A moderator will help to fix it.


----------



## GeertD (Mar 24, 2021)

smozgur said:


> You can, for 10 minutes after the initial submission due to certain limitations in the forum. Every thread has its own chronological order, and the discussion could be hard to follow if previous posts are edited freely. Next posts sent as a reply to a previous post, then the previous post is changed to say something entirely opposite tomorrow, etc.
> (Personally, I don't even understand why edit action is ever considered a public privilege in the forum software development world.)
> 
> If you ever make a mistake that must be corrected in any of your posts, then you can simply click on the Report button at the bottom of the post, and explain the problem. A moderator will help to fix it.


Thanks for your reply. I understand your concern.
I guess I'm not used to moderated message boards. As a Facebook and YouTube commenter I'm used to fend for myself – in relative independence.
I have the habit of self-moderating my own posts in all personal integrity – no hiding behind fake pseudonyms and all that.
I will adapt. resistance is futile.


----------



## Xlambda (Mar 24, 2021)

Hi Geert, now you have scared everybody out with the "trap" word. ??. Is no trap. Is fun to see how different computers get different timing results and how these results are proportional with computer power.
PS. to get rid of the emoji you can insert a space f( n) like I did.
What are your computer timing results for FIBONACCI(35)..(38) ..(40) ? Share this. ?
setting a counter inside the formula, nr. of calculations that computer does (or how many times the function is called) is as follows 
n = 30 => 2692538 times
n = 31 => 4356618 times 
n = 42 => 866988874 times (2^n-C)


----------



## GeertD (Mar 24, 2021)

Hi Cesar,
Sorry, if I scared everybody off. It was intended as a bit of a funny remark, hence the wink .
Anyway, here are some calculation times for my computer:

F(35) => 8.5 à 8.7 seconds
F(40) => 106 à 108 seconds
I used the FastExcel V4 Calculation Manager for timing this.
I don't think the CPU, RAM, etc. is all that important, because my PC used less than 1 core for this and far less memory than is present in any modern computer.
I think my computer did average.

What about yours?


----------



## Xlambda (Mar 24, 2021)

FIBONACCI *!! recursive !! *calculates the nth term of the famous Fibonacci sequence . *This is more of a fun quest than a useful function.* ( did this on a YT channel also, had fun with *Rico* about this). 
This reflects how limited our computers are. You will be surprised. This time is not about recursion "iterations" limit, is about the limit of the number of calculations that a computer can perform.
Open a new workbook, define the lambda FIBONACCI. Very important, first, try values of n less then 20!! . Call FIBONACC(15) ...(19) ..etc. and increase it bit by bit. 
*For what number "n" do you think that your computer will start struggling giving you the answer??* *Share with us here, if you please, how long it took your computer to calculate FIBONACCI(35)..(38) and (40). *Eventually what type of computer you are using. Processor ,RAM etc. After all, 40 is a very small number.? Give it a try!!
*Note:* Fibonacci sequence is this one : 1,1,2,3,5,8,13,21,34,55,89,144....the value of n term is the sum of the previous 2 terms fib( n)=fib(n-1) + fib(n-2), and fib(1)=1,fib(2)=1
          Fortunately , Fibonacci has also an explicit solution (non recursive), you can define another lambda to check the results *FIB( n)=LAMBDA( n,LET(a,SQRT(5),x,((1+a)/2)^n,y,((1-a)/2)^n,1/a*(x-y)))*

```
=LAMBDA(n,IF(n<3,1,FIBBONACCI(n-1)+FIBONACCI(n-2)))
```
LAMBDA 6.0.xlsxABCDEFGH1FIBONACCIrecursiveckeck(non recursive)2n value=FIBONACCI(B3)=FIB(B3)time(can use phone's stopwatch)315610610instant41825842584instant52067656765instant6308320408320401s73592274659227465?sshare this8383908816939088169?svalues940102334155102334155?swith us ?10FIBONACCI postCell FormulasRangeFormulaC2:D2C2=FORMULATEXT(C3)C3:C9C3=FIBONACCI(B3)D3:D9D3=FIB(B3)


----------



## Xlambda (Mar 24, 2021)

Super cool that you tried?✌✌
Mines are: (used a stopwatch, approximations are accepted)
F(35): 8.23s
F(38): 44.86s
F(40) : 2m 4.29s so 124,29s

I have a Surface Book 3 i7 10th gen 32GB RAM
It will be interesting to find someone who has the new i9 11th gen intel processors or someone with a Mac with the new Apple M1 chips. What timing they will get.
Imagine everybody in a computer shop asking the salesperson, how fast this computer does FIBONACCI(50) ?? ?
If we get enough data we will see if there is correlations between CPU power or RAM, will do a chart in excel to analize.?


----------



## Xlambda (Mar 24, 2021)

GeertD said:


> Hi Cesar,
> Sorry, if I scared everybody off. It was intended as a bit of a funny remark, hence the wink .
> Anyway, here are some calculation times for my computer:
> 
> ...


Super cool that you tried?✌✌
Mines are: (used a stopwatch, approximations are accepted)
F(35): 8.23s
F(38): 44.86s
F(40) : 2m 4.29s so 124,29s

I have a Surface Book 3 i7 10th gen 32GB RAM
It will be interesting to find someone who has the new i9 11th gen intel processors or someone with a Mac with the new Apple M1 chips. What timing they will get.
Imagine everybody in a computer shop asking the salesperson, how fast this computer does FIBONACCI(50) ?? ?
If we get enough data we will see if there is correlations between CPU power or RAM, will do a chart in excel to analize.?


----------



## GeertD (Mar 25, 2021)

I have a laptop with an i9-9900K with 64GB of RAM.
BTW: Fibonacci(50) would be brutal!  
Like I said before: the CPU was not used 100% during calculation. Therefore this is not representative for the overall performance (monitor your Task Manager).


----------



## Xlambda (Mar 25, 2021)

wow , gaming laptop? that's way you do not have enough time for writing formulas.??
if the computers have same architecture it does not matter if they use 1% or 120%. The proportion is kept. The purpose was not to diagnose CPU's , was to find correlations, with enough sample data.
Your laptop did better for f(40) and is more powerful, my desktops, less or more powerful than my Surface, act accordingly . So correlations are. 
You made also 2 statements:

"don't use this kind of recursive formula's."
Recursive formulas are brilliant smart, simple, powerful and elegant. If we don't have enough power to handle them , is not the recursive's algorithms fault, it's our problem that we are not powerul enough for them.  Keep the formula, always, and improve the power. We don't have the power, we don't deserve them.  Everything that is inteligent around us is based on recursive algorithms. 
If I can find a recursive pattern in anything I will reveal it , no matter if we can not use it today or not, we will use it tomorow.  The power will come. 
The second statement is purely hilarious ? 

"recursive formula's that call themselves only once should be fine."
I want to print it on T-shirts if you give me the rights. Sounds like a Woody Allen quote.? 
Somehow this triggered another quote that came to my mind (recursively) "If you are lonely when you're alone, you are in bad company." I think it was Jean Paul Sartre.?
It was fun, like always, see you around. ✌. Too much work on pending.


----------



## GeertD (Mar 25, 2021)

Hey Cesar,
*Hardware:*

I bought my current laptop on Black Friday 2019 to save me some money, so it's fairly recent.
I always buy a high-end model so it lasts me as long as possible (I don't have a desktop).
I haven't gamed in a long time (10+ years) – I have a fulltime job that takes up most of my time.
But I guess it would be more than adequate for gaming.
(Just not so much for calculating recursive LAMBDA Fibonacci numbers )
*Recursive formulas:*

Don't get me wrong: recursive formulas are great, and useful.
It's just that one has to be careful how to treat and calculate them: if a recursive formula calls itself more than once (per recursive iteration, that is): don't use the "recursive LAMBDA"-approach; there are far better methods, even recursive ones.
BTW: did you know that every discrete recursive equation with constant coefficients has a closed-form analytic solution?
Fibonacci is one example for this, but there are infinitely many more. 
There are several ways of analytically solving equations like these; using the Z-transform is one of them.

In conclusion: computers can be powerful, math can be much more powerful, stil. 
imagine if you'd combine them both!
for all we know, we could even play life-like games in real-time on them...


----------



## Eric W (Mar 25, 2021)

GeertD said:


> BTW: did you know that every discrete recursive equation with constant coefficients has a closed-form analytic solution?
> 
> Fibonacci is one example for this, but there are infinitely many more.




```
=((((SQRT(5)+1)/2)^A1)-(-((SQRT(5)+1)/2)^-A1))/SQRT(5)
```

or


```
=LET(phi,(SQRT(5)+1)/2,n,A1,((phi^n)-(-phi^-n))/SQRT(5))
```


----------



## tboulden (Mar 25, 2021)

Thought I'd be clever and make a TimeIt function, but still had to use a stopwatch because of the behind-the-scenes house-cleaning that Excel does between function calculation completion and when it is finally loaded to the sheet: 2x function calc time! Any ideas about what's eating up this "extra" time? Running on my sad "old" desktop, nothing special about it.




Since the posted function ends up creating a tree structure, there's a lot of covering the same territory, but in branches of the tree that can't see one another, so inefficient as @GeertD points out above. FIB below uses a bottom-up approach, so doesn't do a lot of needless calculation; much faster such that TimeIt wasn't often more that 0.01 seconds.

Also created FIB_Large using FIB and Mourad Louha's Large Number LAMBDAs; Excel runs out of precision once you get to FIB(73), but can extend FIB_Large(164) when we run out of stack depth.

TimeIt

```
=LAMBDA(func,param,
    LET(
        begin,NOW(),
        result,func(param),
        end,NOW(),
        elapsed,end-begin,
        CHOOSE({1,2},result,elapsed*86400)
    )
)
```

FIB

```
=LAMBDA(n,a,b,
    LET(
        a_,IF(ISBLANK(a),0,a),
        b_,IF(ISBLANK(b),1,b),
        IF(
            n=0,a_,
            FIB(n-1,b_,a_+b_)
        )
    )
)
```

LAMBDA_Testing_Mourad_Louha.xlsmABCDE1Seconds2nLookupFIBONACCI (Tree)TimeItStopwatch31055550.004206,7656,7650.01530832,040832,0401.583.626311,346,2691,346,2692.566.447322,178,3092,178,3094.178.808333,524,5783,524,57810.0017.009345,702,8875,702,88717.0034.6010359,227,4659,227,46526.5153.89113614,930,35214,930,35240.8281.98123724,157,81724,157,81766.84135.11133839,088,16939,088,169112.12225.991415nLookupFIB (Bottom-up)TimeIt161055550.0017206,7656,7650.001830832,040832,0400.001940102,334,155102,334,1550.00205012,586,269,02512,586,269,0250.0021601,548,008,755,9201,548,008,755,9200.002270190,392,490,709,135190,392,490,709,1350.002373806,515,533,049,393806,515,533,049,3930.00247413049695449286571,304,969,544,928,6600.002526nLookupFIB_Large (Bottom-up)2710555528206,76567652930832,0408320403040102,334,155102334155315012,586,269,0251258626902532601,548,008,755,92015480087559203370190,392,490,709,135190392490709135348023416728348467685234167283484676853590288006719437081612028800671943708161203610035422484817926191507535422484817926191507537164840403783297413488274376762678017384040378329741348827437676267801733816513598018856492162040239554477268290#NUM!ScratchCell FormulasRangeFormulaC3:D3C3=TimeIt(FIBONACCI,A3)B16:B24B16=XLOOKUP($A16,$G$3#,$H$3:$H$1003,"",0)C16:D24C16=TimeIt3(FIB,A16,,)C27:C38C27=FIB_Large(A27,,)Dynamic array formulas.


----------



## Xlambda (Mar 26, 2021)

Hi, tboulden, great study!! Thanks that you took the quest. ✌✌. You choose the iteration way which is more "efficient".  It will be interesting to do the same , on your computer , with this also
=LAMBDA(n,IF(n<3,1,FIBBONACCI(n-1)+FIBONACCI(n-2))) (less "efficient") to compare the timing results on a same computer.
My purpose of this quest , as I wrote in the description , was not a way to solve fib in real life, was exactly to reveal how a simple formula, in its most beautiful, simple and inofensive form , can make our self proclaimed powerful computers struggle. " *This is more of a fun quest than a useful function.* " "This reflects how limited our computers are. "
My approach is a tiny bit different , in a philosophical way , the formula is not inefficient , WE are. The formula is THE formula. Is how nature thrives, is how evolution works, is how our brain functions. Anybody figured out so far that I like recursion. Of course, I can find ways avoiding the "ineficient" over stacking recursion problems , (that Geert call it recursion in recursion something ?) doing everything explicit and people to think , this guy is efficient. I don't care. If excel is giving me #NUM error , excel has to improve, not me. 200 iterations, in 21 century? Come on. They have to catch up, and they will. Thats way probably we realised that we have to go quantic. In real life I do take care of "efficiency" ,no complains there, but here, let me feel free , this forum I see it like a canvas where we can create , push the limits, nobody will stop me of thinking recursive pointing: is no good, I got a num error. 
A pleasure to interact with you (you know to write formulas) I bow!!?✌


----------



## tboulden (Mar 26, 2021)

Xlambda said:


> It will be interesting to do the same , on your computer , with this also =LAMBDA(n,IF(n<3,1,FIBBONACCI(n-1)+FIBONACCI(n-2))) (less "efficient") to compare the timing results on a same computer.


That's exactly what happens in C3:D13; TimeIt just wraps the function being timed, in this case =TimeIt(FIBONACCI,n) ={FIBONACCI(_n_),Seconds to calculate}



Xlambda said:


> My purpose of this quest , as I wrote in the description , was not a way to solve fib in real life, was exactly to reveal how a simple formula, in its most beautiful, simple and inofensive form , can make our self proclaimed powerful computers struggle. " *This is more of a fun quest than a useful function.* " "This reflects how limited our computers are. "


Yes, and I wanted to find a different limitation as the fun ended for me when I had to wait for FIBONACCI(35) to run.  There was no hope of me finding the last accurate FIBONACCI calc that Excel could make because it would take all day if it even completed! So I switched to FIB/bottom-up approach, and found FIB(73) was the last accurate result so implemented FIB_Large. And likewise, I won't be able to find the stack-depth limitation of FIBONACCI due to calc times, so can use FIB_Large to find both accurate results and the max value of N before stack depth is exhausted.


Xlambda said:


> My approach is a tiny bit different , in a philosophical way , the formula is not inefficient , WE are. The formula is THE formula. Is how nature thrives


I would argue that F(_n_) = F(n-1) + F(n-2) is NOT how nature thrives in this case; even using Fibonacci's original unrealistic example of rabbit population, you start from small population and increase  The bottom-up approach is recursive, but perhaps not as interesting/etc. And we can create a version that performs the same calculation, but populates a helper array for everything less than n-1 the first time we call F(n-1).


Xlambda said:


> If excel is giving me #NUM error , excel has to improve, not me. 200 iterations, in 21 century? Come on. They have to catch up, and they will.


I imagine Microsoft will improve the stack depth limitations, but that's a different issue than resources needed to complete a computation. As mentioned above, using FIBONACCI doesn't run into stack-depth issue, it bogs down due to resource usage. This link is good, I think, to better communicate what I mean perhaps.

* edited for issues with  => (_n_)


----------



## Xlambda (Mar 26, 2021)

Uf, sorry to "trap" your computer. ?  Quod erat demonstrandum !
Let's see if someone with the new M1 MacBook can share some results with us. 
See you around guys, thanks for participation and have fun!! ✌✌?


----------



## Xlambda (Mar 24, 2021)

FIBONACCI *!! recursive !! *calculates the nth term of the famous Fibonacci sequence . *This is more of a fun quest than a useful function.* ( did this on a YT channel also, had fun with *Rico* about this). 
This reflects how limited our computers are. You will be surprised. This time is not about recursion "iterations" limit, is about the limit of the number of calculations that a computer can perform.
Open a new workbook, define the lambda FIBONACCI. Very important, first, try values of n less then 20!! . Call FIBONACC(15) ...(19) ..etc. and increase it bit by bit. 
*For what number "n" do you think that your computer will start struggling giving you the answer??* *Share with us here, if you please, how long it took your computer to calculate FIBONACCI(35)..(38) and (40). *Eventually what type of computer you are using. Processor ,RAM etc. After all, 40 is a very small number.? Give it a try!!
*Note:* Fibonacci sequence is this one : 1,1,2,3,5,8,13,21,34,55,89,144....the value of n term is the sum of the previous 2 terms fib( n)=fib(n-1) + fib(n-2), and fib(1)=1,fib(2)=1
          Fortunately , Fibonacci has also an explicit solution (non recursive), you can define another lambda to check the results *FIB( n)=LAMBDA( n,LET(a,SQRT(5),x,((1+a)/2)^n,y,((1-a)/2)^n,1/a*(x-y)))*

```
=LAMBDA(n,IF(n<3,1,FIBBONACCI(n-1)+FIBONACCI(n-2)))
```
LAMBDA 6.0.xlsxABCDEFGH1FIBONACCIrecursiveckeck(non recursive)2n value=FIBONACCI(B3)=FIB(B3)time(can use phone's stopwatch)315610610instant41825842584instant52067656765instant6308320408320401s73592274659227465?sshare this8383908816939088169?svalues940102334155102334155?swith us ?10FIBONACCI postCell FormulasRangeFormulaC2:D2C2=FORMULATEXT(C3)C3:C9C3=FIBONACCI(B3)D3:D9D3=FIB(B3)


----------



## GeertD (Mar 26, 2021)

tboulden said:


> FIB
> 
> ```
> =LAMBDA(n,a,b,
> ...


Your implementation of the Fibonacci formula in FIB is BRILLIANT! Really love it!
It has all the good properties of the most efficient of implementations as far as recursive formulas go:

you generalized the starting conditions with your a & b parameters,
you created a recursive function that calls itself only once, making it linear and thus super efficient to compute.
only the closed-form analytic solution formula is more efficient to compute (for large n), IMO.
And I saw what you did there, using those additional arguments so smartly.
This proves that the guy with the smartest algorithm will always beat the guy with the most powerful computer.  
And the difference in performance can be "unbelievable".
Awesome!


----------



## Rick Rothstein (Mar 26, 2021)

Eric W said:


> ```
> =((((SQRT(5)+1)/2)^A1)-(-((SQRT(5)+1)/2)^-A1))/SQRT(5)
> ```
> 
> ...


This formual fails at 55 (starts reporting result in E-notation meaning digits were lost). By contrast, here is a UDF (user defined function) with *"infinite precision"* (assuming you are willing to wait while it calculates very large numbers). The remarks refer to timing on a computer I owned probably a dozen or more years ago when running the compiled version of Visual Basic... I have no idea of timing for Excel's VBA on modern computers, but the code does work.

```
' This is an "infinite" precision calculator which prints the full Nth
' Fibonacci number up to virtually any maximum Fibonacci Number,
' limited only to the maximum number of digits that a string can hold. Be
' aware, however, this routine slows down as the inputted number gets larger;
' for example, my fairly fast computer and it took 7.8 seconds for it to
' calculate the 2090 digits for the number 9999 and 12.6 minutes to calculate
' the 20,899 digits for the Fibonacci Number 99999, so if you plan to print
' out larger Fibonacci numbers, be forewarned it could take awhile to do so.
Function FN(ByVal N As Long) As String
  Dim X As Long, Z As Long, Carry As Long, PositionSum As Long
  Dim N_minus_0 As String, N_minus_1 As String, N_minus_2 As String
  If N = 1 Or N = 2 Then
    FN = 1
  Else
    N_minus_1 = "1"
    N_minus_2 = "1"
    For X = 3 To N
      Carry = 0
      N_minus_0 = Space$(Len(N_minus_1))
      If Len(N_minus_1) > Len(N_minus_2) Then N_minus_2 = "0" & N_minus_2
      For Z = Len(N_minus_1) To 1 Step -1
        PositionSum = Val(Mid$(N_minus_1, Z, 1)) + Val(Mid$(N_minus_2, Z, 1)) + Carry
        Mid$(N_minus_0, Z, 1) = Right$(CStr(PositionSum), 1)
        Carry = IIf(PositionSum < 10, 0, 1)
      Next
      If Carry Then N_minus_0 = "1" & N_minus_0
      N_minus_2 = N_minus_1
      N_minus_1 = N_minus_0
    Next
    FN = N_minus_0
  End If
End Function
```

EDIT NOTE: I am guessing that besides being able to report more total digits, my UDF is also faster then the Lambda formula as well... is that correct?


----------



## GeertD (Mar 27, 2021)

Sorry, @Rick Rothstein, this is the LAMBDA section, not the VBA-section.    (just kidding!)
Yes, your compiled VBA will run faster than our interpreted LAMBDAs. 
OTOH, see earlier in the thread: it is possible to have arbitrary precision using LAMBDAs, as well.
But it seems that LAMBDA will not reach the level of performance of your compiled (!) VBA any time soon.
BTW: I think arbitrary length calculations should be available in Excel by means of providing the right data type(s) and extending the functions to be able to deal with said data type(s).
That would be the cleanest solution. So, here come the most used words on the internet: "Microsoft, if you're reading this...".


----------



## tboulden (Mar 28, 2021)

Still trying to fully wrap my head around it, but I looked up someone's implementation of Fibonacci using the Y-combinator and converted it to Excel LAMBDA: gets us up to F(493) before running out of stack depth when using the LNum.Sum linked previously. TimeIt values aren't bad either!

LAMBDA_Testing_Mourad_Louha.xlsmABCD12nLookupFIB_Y (Y Combinator)TimeIt31055550.0141003542248481792619150753542248481792619150750.0352002805711729925101400376119324130386771895252805711729925101400376119324130386771895250.0563002222322446294204455297398934619099672066669390964997649909796002222322446294204455297398934619099672066669390964997649909796000.0774001760236806450139664682269453924112507703843833044921918867259928965753450442160196751760236806450139664682269453924112507703843833044921918867259928965753450442160196750.1284884329955567744269139531236105187857407389973522931477733916026995117937562355208106323825570839977289814329955567744269139531236105187857407389973522931477733916026995117937562355208106323825570839977289810.14949348019943095168184084529951903839736466718355372130251060170415253331565228003797424969952856876433055134801994309516818408452995190383973646671835537213025106017041525333156522800379742496995285687643305513104947769790006581794836315417026718114982822736329999469724305586980435409187727711750121668968517028834617#NUM!FIB_YCell FormulasRangeFormulaB3:B10B3=XLOOKUP($A3,Scratch!$G$3#,Scratch!$H$3:$H$1003,"",0)C3:D3C3=TimeIt(LAMBDA(n,
    LET(
        U,LAMBDA(f,f(f)),
        Y,U(LAMBDA(h,LAMBDA(f,f(LAMBDA(x,h(h)(f)(x)))))),
        loop,Y(LAMBDA(recur,LAMBDA(a,LAMBDA(b,LAMBDA(m,IF(m=0,a,recur(LNum.Sum(a,b,))(a)(m-1))))))),
        loop(0)(1)(n)
    )
),A3)C4:D8C4=TimeIt(FIB_Y,A4)C9:C10C9=FIB_Y(A9)Dynamic array formulas.


----------



## Eric W (Mar 28, 2021)

Rick Rothstein said:


> This formual fails at 55 (starts reporting result in E-notation meaning digits were lost).


True enough Rick, but my main purpose for presenting it was to show the closed form formula for the Fibonacci sequence for the curious.  As you said, rounding causes lack of precision after a while.  I like your "infinite precision" function, but it takes some time as you noted.  One way you can speed it up is by using byte arrays instead of strings.  String manipulation is relatively slow.  At the risk of getting chided about this not being a VBA forum  , here's another function:


```
Function Fibonacci(ByVal N As Long) As String
Dim f(1 To 3, 1 To 32767) As Byte
Dim i As Long, loc As Long
Dim addIx1 As Byte, addIx2 As Byte, sumIx As Byte
Dim Carry As Byte, MaxLen As Long, nextDigit As Byte
 
    f(1, 1) = 1
    f(2, 1) = 1
    addIx1 = 1
    addIx2 = 2
    sumIx = 3
    
    MaxLen = 1
    For i = 3 To N
        Carry = 0
        loc = 1
        Do
            nextDigit = f(addIx1, loc) + f(addIx2, loc) + Carry
            If loc > MaxLen And nextDigit = 0 Then Exit Do
            f(sumIx, loc) = nextDigit Mod 10
            Carry = nextDigit \ 10
            loc = loc + 1
        Loop
        MaxLen = loc - 1
        addIx1 = (addIx1 Mod 3) + 1
        addIx2 = (addIx2 Mod 3) + 1
        sumIx = (sumIx Mod 3) + 1
    Next i

    For i = 1 To MaxLen
        Fibonacci = f(addIx2, i) & Fibonacci
    Next i
    
End Function
```

The algorithm is substantially the same as yours, but it runs about 8 times faster with my rough timing (on a 10-year old computer).


----------



## Rick Rothstein (Mar 28, 2021)

Eric W said:


> I like your "infinite precision" function, but it takes some time as you noted.  One way you can speed it up is by using byte arrays instead of strings.  String manipulation is relatively slow.
> 
> The algorithm is substantially the same as yours, but it runs about 8 times faster with my rough timing (on a 10-year old computer).


Yes, I know Byte arrays are faster than String manipulations, but I wrote my routine quite a long time ago, well before I had an appreciation for Byte arrays. Fibonacci calculations have not come up all that often across the years so it never occurred to me to attempt to revise my original code. Thanks for doing so. And you are right... your revision is notable faster than my original (probably more than 8 times faster as it only took a little under 2 minutes to process 99999) on my somewhat slow laptop (my desktop died a couple of years ago and I've never gotten around to replacing it).


----------



## GeertD (Apr 6, 2021)

Xlambda said:


> Uf, sorry to "trap" your computer. ?  Quod erat demonstrandum !
> Let's see if someone with the new M1 MacBook can share some results with us.
> See you around guys, thanks for participation and have fun!! ✌✌?


Hey Xlambda, Tboulden,

I modified Tboulden's Fibonacci and your LARGESUM (sub-) functions, and tried to calculate Fibonacci numbers for large integers, but the best I can do is Fibonacci(1274).
Any suggestions for improving this a bit? Because the big boys with their VBA code can do a lot better than this...


----------



## tboulden (Apr 6, 2021)

GeertD said:


> Hey Xlambda, Tboulden,
> 
> I modified Tboulden's Fibonacci and your LARGESUM (sub-) functions, and tried to calculate Fibonacci numbers for large integers, but the best I can do is Fibonacci(1274).
> Any suggestions for improving this a bit? Because the big boys with their VBA code can do a lot better than this...


Can you show us what you've got for modifications? F(1274) sounds pretty good considering the limitations.


----------



## GeertD (Apr 8, 2021)

tboulden said:


> Can you show us what you've got for modifications? F(1274) sounds pretty good considering the limitations.


Here you have it (see: below).
Some additional information:

ALISUM14 stands for: Arbitrary Length Integer SUM (but it breaks down long before one would call it "arbitrary"...) – block-length=14,
Contrary to DAX where (evaluation) contexts are wrapped around the formula, here in Excel Classic (that's what I call it) "contexts" can pop up anywhere in the formula, without prior warning...
...that's why I made an equivalent, more intuitive and more easy to understand ALISUM14_Long version.
FIB14_ breaks down at n=247.
ALISUM14 breaks down at n=1275.
Any suggestions on how to improve this a little bit?
I mean: we're never gonna beat the big boys with their VBA code, but I wouldn't mind narrowing the gap a little more... 

DXLR's LAMBDA.LET Library_v00.07.xlsbABCDEFGHI1FIB14_2=LAMBDA(n,a,b,IF(n=0,a,FIB14_(n-1,b,ALISUM14(a,b))))3ALISUM144=LAMBDA(A,B,
IF(and(--A<1e14,--B<1e14),A+B,LET(
   AB,CHOOSE({1;2},A,B),L,LEN(AB),NrBlocks,ROUNDUP(MAX(L)/14,0),NrDigits,NrBlocks*14,
   SumDigits,CarryDigits14(MMULT({1,1},--MID(IF(L<NrDigits,REPLACE(AB,1,0,REPT(0,NrDigits-L)),AB),(SEQUENCE(,NrBlocks)-1)*14+1,14)),0),
   INDEX(SumDigits,1)&CONCAT(RIGHT(INDEX(SumDigits,SEQUENCE(,NrBlocks-1,2)),14))
)))5CarryDigits146=LAMBDA(A,Stack,LET(
   ColsA,COLUMNS(A),ColdexSp1,SEQUENCE(,COLUMNS(Stack)+1),
   NewStack,IF(ColdexSp1=1,INDEX(A,ColsA)+INT(INDEX(Stack,1)/1e14),INDEX(Stack,ColdexSp1-1)),
   IF(ColsA=1,INDEX(NewStack,SEQUENCE(,COLUMNS(Stack))),CarryDigits14(INDEX(A,SEQUENCE(,ColsA-1)),NewStack))
))7ALISUM14Long8=LAMBDA(A,B,
IF(and(--A<1e14,--B<1e14),A+B,LET(
   AB,CHOOSE({1;2},A,B),L,LEN(AB),
   NrBlocks,ROUNDUP(MAX(L)/14,0),NrDigits,NrBlocks*14,
   ColdexBlocks,SEQUENCE(,NrBlocks),ColdexBlocksShift,SEQUENCE(,NrBlocks-1,2),
   Equalize,IF(L<NrDigits,REPLACE(AB,1,0,REPT(0,NrDigits-L)),AB),
   SplitDigits,--MID(Equalize,(ColdexBlocks-1)*14+1,14),
   SumDigits,MMULT({1,1},SplitDigits),
   CorDigits,CarryDigits14(SumDigits,0),
   ConcatDigits,INDEX(CorDigits,1)&CONCAT(RIGHT(INDEX(CorDigits,ColdexBlocksShift),14)),
   ConcatDigits
)))910nFIB14_110012111316987143113462691546183631190316612.50473E+121776341645462290670718914660046610375530309191066356306993006846248183201218670007398507948658051921211361182589644787183497642906842722151161305314249045814157979073863492316676734806894662969229833221040484632418110466444782963453907530667147829489881251961427623835744284059616875297296152824614726211194727995859968175366280865857866723572343892722626560912911538016562801306271765994056795952743282413622910468413744058847851838277540168014203677584129247#NUM!3031nALISUM143212724551008081993122044637567355266718418534161449798908735293378927349657573562059775730579536649409900132008568349182440189931958067294707610305850821443830935089480195974733280377340158570152493408842344835712687319132957464104780469327079428547217816643312737368136085003305326266742426002168584796535871474905451793610151048872191451076950709245615497757856183720352446509012378778950948312515232482986421298298309877236457529433428816092952219874521369400692276683497101903092633920662830160150007667006725933412741191914416699642737090430978126888700333069732127381418708698907839852976501313672643982515214716775631572892079569145256871090901560722284278883724274212924496671665350416670919343311079002701477824303711239618442103605009802544329948722943621422454257351275#VALUE!36Sandbox_pubCell FormulasRangeFormulaC11:C29C11=FIB14_(B11,0,1)C34:C35C34=ALISUM14(C33,C32)


----------



## Xlambda (Apr 11, 2021)

Haha, I am impressed how a simple inocent fun quest, declared from the beginning as "not a useful formula" turned into a scientific study, with such a big traction. ??
I salute all the visitors and also, the participation of vba masters, I want them to know, as humble creator of this post, that they are more than welcomed here. 
Thinking already to the next fun quest , who can find more digits of Pi. You have to beat this guys, they found only 100 000.
100,000 Digits of Pi . Some of us have too much time ? 
PS. I have the solution for fib(1275), it's called pen and paper ? Peace !!


----------



## Xlambda (Mar 24, 2021)

FIBONACCI *!! recursive !! *calculates the nth term of the famous Fibonacci sequence . *This is more of a fun quest than a useful function.* ( did this on a YT channel also, had fun with *Rico* about this). 
This reflects how limited our computers are. You will be surprised. This time is not about recursion "iterations" limit, is about the limit of the number of calculations that a computer can perform.
Open a new workbook, define the lambda FIBONACCI. Very important, first, try values of n less then 20!! . Call FIBONACC(15) ...(19) ..etc. and increase it bit by bit. 
*For what number "n" do you think that your computer will start struggling giving you the answer??* *Share with us here, if you please, how long it took your computer to calculate FIBONACCI(35)..(38) and (40). *Eventually what type of computer you are using. Processor ,RAM etc. After all, 40 is a very small number.? Give it a try!!
*Note:* Fibonacci sequence is this one : 1,1,2,3,5,8,13,21,34,55,89,144....the value of n term is the sum of the previous 2 terms fib( n)=fib(n-1) + fib(n-2), and fib(1)=1,fib(2)=1
          Fortunately , Fibonacci has also an explicit solution (non recursive), you can define another lambda to check the results *FIB( n)=LAMBDA( n,LET(a,SQRT(5),x,((1+a)/2)^n,y,((1-a)/2)^n,1/a*(x-y)))*

```
=LAMBDA(n,IF(n<3,1,FIBBONACCI(n-1)+FIBONACCI(n-2)))
```
LAMBDA 6.0.xlsxABCDEFGH1FIBONACCIrecursiveckeck(non recursive)2n value=FIBONACCI(B3)=FIB(B3)time(can use phone's stopwatch)315610610instant41825842584instant52067656765instant6308320408320401s73592274659227465?sshare this8383908816939088169?svalues940102334155102334155?swith us ?10FIBONACCI postCell FormulasRangeFormulaC2:D2C2=FORMULATEXT(C3)C3:C9C3=FIBONACCI(B3)D3:D9D3=FIB(B3)


----------



## Xlambda (Feb 14, 2022)

On Feb-8-22 Excel announced lots of improvements including increasing recursion limits by 16 times. 
This fact triggered me to go back on some of my old recursive functions, to check them out and even to try to improve them.
A novel approach this time, *no recursion*, will solve *Fibonacci sequence iteratively,* using the new lambda helper function REDUCE.
*Calculation time* *FIB(1000)*, *instant*.
*FIB(n,[l])*
n: n th term of the sequence
[l]: list argument, if 0 or omitted, only nth term, if 1 or <>0, entire sequence

```
=LAMBDA(n,[l],
    LET(f,REDUCE(0,SEQUENCE(n+1),LAMBDA(v,i,LET(s,SEQUENCE(i),IF(s=1,0,IF(s=2,1,IF(s=i,INDEX(v,i-2)+INDEX(v,i-1),v)))))),
        IF(l,f,INDEX(f,ROWS(f)))
    )
)
```
FIBONACCI.xlsxABCDEFGHI1=FIB(55,1)FIB.Part 1. Numeric values (scientific notation for large numbers)200311nFIB42153533162911735325486267571272643551.39584E+11755562.25851E+1186897131003.54225E+201082110004.3467E+2081193411003.4429E+22912105512002.727E+25013118913002.16E+271141214414001.7108E+292151323316143771715610181698714758.0776E+3071917159714761.307E+308201825841477#NUM! exceeds largest allowed number in Excel21194181will solve this using large number functions22206765ALADD, ALARGESUM thread post #623211094624221771125232865726244636827257502528261213932927196418302831781131295142293230832040333113462693432217830935333524578363457028873735922746538361493035239372415781740383908816941396324598642401023341554341165580141444226791429645434334944374644701408733474511349031704846183631190349472971215073504848075269765149777874204952501258626902553512036501107454523295128009955535331629117356548626757127257551.39584E+1158FIB 1Cell FormulasRangeFormulaB1B1=FORMULATEXT(B2)A2:A57A2=SEQUENCE(56)-1B2:B57B2=FIB(55,1)E4:E7,E18:E20,E9:E14E4=FIB(D4)Dynamic array formulas.


----------



## Xlambda (Feb 15, 2022)

*FIB.Part 2. Numbers as strings*. Function *LFIB*
*LFIB(n,[l])* *L*arge numbers *FIB*onacci.  Calls ALADD (Array Large numbers Adding)
same arguments as FIB(n,[l])
There is a *single cell formula* for first *1200* terms of the sequence, in cell *B2: =LFIB(1200,1) *( l=1, lists all sequence) . *Calculation time, around 1 second. *
A:A colum, easy to visualize n th term values (in bold), formula in A2: =SEQUENCE(1201)-1.
Note: Depending of how many cells the minisheet can capture, there will more posts. Sorry for scrolling inconvenience.
Attached, screen capture, WolframAlfa for fib 400.

```
=LAMBDA(n,[l],
    LET(f,REDUCE(0,SEQUENCE(n+1),LAMBDA(v,i,LET(s,SEQUENCE(i),IF(s=1,0,IF(s=2,1,IF(s=i,ALADD(INDEX(v,SEQUENCE(2,,i-2))),v)))))),
       IF(l,f&"",INDEX(f,ROWS(f)))
    )
)
```
FIBONACCI.xlsxAB1n=LFIB(1200,1)20031142153264375586897131082111934121055131189141214415132331614377171561018169871917159720182584211941812220676523211094624221771125232865726244636827257502528261213932927196418302831781131295142293230832040333113462693432217830935333524578363457028873735922746538361493035239372415781740383908816941396324598642401023341554341165580141444226791429645434334944374644701408733474511349031704846183631190349472971215073504848075269765149777874204952501258626902553512036501107454523295128009955535331629117356548626757127257551395838624455856225851433717595736543529616260585912867298796159956722026041626015480087559206361250473078196164624052739537881656365574703198426664106102098577236765171676801775656866277778900352886967449455702128537068727234602481417169117669030460994727019039249070913573713080615211701297472498454011879264757380651553304939376741304969544928657777521114850779780507876341645462290670779775527939700884757807889443943237914648179144723340246762218280234167283484676858381378890623731439068482613057907216115918583991948530947554978684160500643816367088878525969549691112258588864201961407274896738987679891637638612258908811000877783661019319189177997941600471418992902880067194370816120939146600466103755303099492754011380474634642995931220016041512187673896941974027421986822316797953194043463499009990598965168070885485832307299978362114348984842297710098135301852344706746049101992189229958345551690261021003542248481792619150751031015731478440138170841011041029273726921930789991761051031500520536206896083277106104242789322839997508245310710539284137646068711657301081066356306993006846248183109107102847207576137174139131101081664102775062056366209611110926925748508234281076009112110435667762588548447381051131117049252476708912581411411411211405930102594397055221911511318455182579303309636633311611429861112681897706691855211711548316295261201016328488511811678177407943098723020343711911712649370320429973934883221201182046711111473984623691759121119331164814351698201718008112212053583592549909666408718401231218670007398507948658051921124122140283666534989152989237611251232269837405200686395697568212612436726740705505779255899443127125594251147575126432128751251281269615185546301842246877456812912715557697022053106568164969313012825172882568354948815042426113112940730579590408055383207395413213065903462158763004198249821513313110663404174917105958145721691341321725375039079340637797070384135133279171545657105123361164255313613445170904956503918714087129371371357308805952221443105020355490138136118258964478718349764290684271391371913470240009327808144942391714013830960598847965113057878492344141139500953012480583911393279162611421408105590009602350419720640860514314113115120134408189533653432486614414221220710144010539953374073347114514334335830278418729487027505833714614455556540422429269440401579180814714589892370700847998927429085014514814614544891112327726836783066419531491472353412818241252672952597492098150148380790192947402535663090413405115114961613147477152780295835016261491521509969216677189303386214405760200153151161305314249045814157979073863491541522609974810209388480201231314654915515342230279526998466217810220532898156154683300276290923510198225336794471571551105603071560908172376327542123451581561788903347851831682574552878917921591572894506419412739854950880421041371601584683409767264571537525433299959291611597577916186677311392476313721000661621601226132595394188293000174702095995163161198392421406191943224780607419606116416232100568094561077252479807762920561651635193981023518027157495786850488117166164840403783297413488274376762678017316716513598018856492162040239554477268290168166220020566894662969229833221040484631691673560007554595845896322287658131675317016857602132235424755886206198685365216171169932022077813832148494290752666819691721701508043400168079707356352739520471851731712440065477981911855850643492187291541741723948108878149991563206996231707763391751736388174356131903419057639723895054931761741033628323428189498226463595560281832177175167244575904137984013222756794978732517817627060740824695693383586911635100691571791774378519841510949178490918731459856482180178708459392398051851684960989496992563918117911463113765491467695340528626429782121182180185477076894719862121901385213997077601831813001082145496345390753066714782948988118418248558529144435440119720805669229197641185183785693505993988940272514728170586875221861841271278797438343341469722784862878851631871852056972303432332281742237513033465726851881863328251100870675623211960297896344578481891875385223404303007904954197810929810305331901888713474505173683528166158108826154883811911891409869790947669143312035591975596518914192190228121724146503749612865140285821200729519319136910870324127066394406869948338085262091941925972304273877744135569338397692020533504195193966339130629045077501002539252582905971319619415635695580168194910579363790217849593217197195252990868864586456855893891827436786529301981964093478246662684059616875297296152824614719919766233869353085486281758142155705206899077200198107168651819712326877926895128666735145224201199173402521172797813159685037284371942044301202200280571172992510140037611932413038677189525203201453973694165307953197296969697410619233826204202734544867157818093234908902110449296423351205203118851856132312604643220587180785991565717720620419230634284809441396671147739183092120805282072053111581989804070186099320645726169127737705208206503464541828501432576643541964447833981823320920781462274080890845118657560653706474675559382102081318087282637409883763219148501512580737417121120921327100234463183349497947550385773274930109212210345079730608372821871301390354008990823042802132115583507329530046553662808658578667235723438921421290343046356137747723758225621187571439538669215213146178119651438213260386312206974243796773058216214236521166007575960984144537828161815236311727217215382699285659014174244530850035136059033084785218216619220451666590135228675387863297874269396512219217100191973732560430947320623789843393330248129722021816211401889921944447018816257617318075718778092212192623059926317798754175087863660165740874359106222220424420011530999319887696948942189754844623691522322168672600416277919530520573530820632893205960212242221111146015693778515192902684250396083776683293622522317978720198565577104981084195586024127087428957226224290901803555033622569101110380899849648542618932272254706890055406893936189119523367600909194169085022822676159080909572301618801306271765994056795952743229227123227981463641240980692501505442003148737643593230228199387062373213542599493807777207997205533596336231229322615043836854783580186309282650000354271239929232230522002106210068326179680117059857997559804836265233231844617150046923109759866426342507997914076076194234232136661925625699143593954654340236599547388091245923523322112364063039145456994129697448739933879569886532362343577855662560905981638959513147239988861837901112237235578909206886482052733837248289211398224979488976523823693669477314257265089773319960393539711116327908772392371515603980029054703631570447893146795336142768064224023824522987531716273545293036474970821924473060471519241239396790273320068205816087409539022898778344881521612422406420201486372309412690177742887311180230754862368024324110388104219572991470851051838277540168014203677584124424216808305705945300883541229581164851348244958539952124524327196409925518292354392281419442391516259162217536224624444004715631463593237933511000607242864504120757488324724571201125556981885592325792420049634380763282975024524824611520584118844547883025930342065687724526740373251282492471864069667454273644225850958407065116260306867075373250248301612807933872843252844399261363388871298090440050125124948801977467930020767542949510206990049732877714758742522507896325826131730509282738943634332893686268675876375253251127765235729247325860370338946550318986595564473522492542522067284939905646309531977283828936479234582512322862425525333449372971981195681356806732944396691005381570580873256254541222223710376587766765795712337614833512066938094972572558757159534301885445803338630417815817435658826439037025825614169381771405651323470996587541191965770779495819986725925722926541305707536769274335217959007783206438322259023726025837095923077113188092745331805500199748977217818079010426125960022464382820724862019667023459207532183656140338034126226097118387459933912954764998828959407281160873958417044526326115714085184275463781678466585241861481334453009875507862642622542592393026885507715496646813780220945054040571721231265263411400091145443188588334330533796636907849934155927201726626466565933044813173935988399521517465900235533821309932482672651077059421593574927948218325748971295910205272369026526526826617427187520417066673081023209641459549125606105821258513269267281977817363528159525632064671311725082276588295115237782702684562496925676988262564422967677263205735326493533278229127126973822750993122698578207436143903804565580923764844306069272270119447720249892581203851665820676436622934188700177088360273271193270471243015279782059101964580241188515112465021394429274272312718191492907860985910767785256677811449301165198482789275273505988662735923140767969869749836918999964413630219877218276274818706854228831001753880637535093596811413714795418360007277275132469551696475414252185050728493051581137812842563823722527827621434023711935851442757311448200241126227918432210565972322792773468097888158339286797581652104954628434169971646694834457280278561150025935192443107331279692497874105696181486775143168928127990795981475102637178708944490299333694911317865144462661462822801469109840686218814894420724595491211054809360138219769783528328123770696554372451866815101694984845480039225387896643963981284282384617949612346400157593089409397575905873189892788416618162852836223249151560709188257441063592460307062654437717548562579728628410069428647684173189833371957686436066121386336645432728761328728516292677799244882378090813021278896373184040774362981291341028828626362106446929055567924184978965332439305427111008414020102328928742654784246173937946014998000244228812489467885371395311443329028869016890693102993513939182979209561251794894996379809331545629128911167167493927693145995418097945379006428436288175120464298892922901806885656323799249738933639586633513160792578781310139745345293291292360240571656856433847544938117141380363620759882218617523429429247304880620403678140774090889678049269644287863801323259205792952937654090467756936378415884538348976340768064993978954512095813296294123845785297973041924932936273167812677324937803590868380163922972952003866899755424057090917816566575760850055877433804135011220529829632423247527351544763402471792982538876233052554697128188128597299297524619165249057853343116499586482964847336113290351695382408023002988488516405225733009771412175163083536096666388373229772636939930129913734708057716311543202577171027913184570027521276746726461020130230022223224462942044552973989346190996720666693909649976499097960030330135957932520658356096176566517218909905236721430926723225558980130430258181156983600400649150555863409906625903415340576699724656940130530394139089504258756745327122380628816531140136771503422950215920230630415232024648785915739447767824403872315704355211208012267487286033073052464593359921179141398048006246675396881836888835835456250887805308306398779582479977071534282478868706262845227240995663668299961640830930764523891847209498567408727949337380253341092987924721392505042133103081044018500952072057208369758362080065378638170874910882225012062131130916892574194241670428824570378554538679120491007541580961500624834312310273327592037623910009082679621753393329068727162906897837507454553133114422533339800406142973283834072987801202736372383227074525137028931431271558092601766452430641106302905217344934236440122960529002115744315313115783425999770513860373944643635095356961600163955231274253486033316314187341518601536966291015050946540312701895836604078191803255601777317315303124944601307480151388995590175408058857436768033423077509087810318316490466463202844446442404046536715720760753273372111614880764689587319317793591407804151926593793042126891128819610710140145037958273777397320318128405787100699637303619708866360684958036398351225665283903846698432131920776492788111482996299901307904979783999746936524016907973122443813223203361707149818144672666187219454104827980338677164658343636350711365323321543935642862929297229617735024460280638031337081706003443366295574632432288010635784474376449623645696987076343606520479817183780700136671113253231424042000707673061725854191994331044074096541879877841250367662285732632423041483585524168262220906489642018075101617466780496790573690289968327325372819035926008988794794484095853285158425828855792752030773669128253283266032338717812506714170035489922734659094420035235977199365105720279332932797605290770725966021179803308812675106786783237939047196728424115618330328157928677948851033162880158208040021697730983590298819190379481318411331329255533968719576999184059961516852696804517766828237866387107905434029332330413462646668428032346940119724892718502248750418536685577487386752440333331668996615388005031531000081241745415306766517246774551964595292186469334332108245926205643306387794020096663813380901526766531123754208267893890933533317514558774444380954089402822083835491157817849120857895066779711253783363342833915139500871159286880483175021682924797052577397027048760650064287337335458537101694530925469582076538340523204057883748948281655543862118966533833674192861564461804139827012485584269149653758900668798436041992712539523393371200465717339148966867852201394183214700595472755636266015963789244361734033819423943329837670082661223262500259061971330617623242503763837163697569341339314286005032291597513397452764420912089772853451796051639234750561411863423405085254383306682983400096853894235027094861596280284766768731221983875534334182281144336295989585340713815384441479925901307982452831610787275979941344342133133688169362819419341682354326791750874517270785300499298099495818696345343215414832505658809004682396169711233230800418578767753330908886771798637346344348548520675021628424024078524038024981674935849553053830206986267617333347345563963353180680437428706474693749258212475354428320807161115873039415970348346912511873855702065852730553217787283194150290277873860991322859307033303349347147647522703638250328143702791153654140662564470619466815243873234644927335034823889871008920845691341675811293238246007759349840685291437615916534825763513493865462327928467072415604609040860366007401579690263197296200323999931849352350625444942882055164154977219017018419060817751467433172643996191565341442535335110119911756749018713965376799211044556615579094364594923736162239653346274354352163743611855695703555151489893812287472237566090389266501761241553067606993553532649427294231858906948052578859227330383933570340352157391228639496010697335635442868634127888159424995674777973502051063092312442448224088410550266867672357355693629070702067484944762005665657753549024280158459697980006969452269746453583561122315411980949079194718753445392774059655203282884180220891074954938423173593571815944482683016564139480759111050527608679483441343878200898044407208169623603582938259894663965643334199512556443301668334686724228058421789119362146592793613594754204377346982207473680271667493829277014170165571936622687163769354762413623607692464272010947850807879784223937130945348856889799995044476283131501355203633611244666864935793005828156005589143096022236302705537193166716344690085611761364362201391329213688779090894398401153680911677118839451719267116397300323574728136536332585801570726807967370999896006799051390074911000543858378803176933213590423663645272493449209568587646043973612216714255778679494571578509044290696557106323367365853107360628224938438314396321289661939478617059462596434692460838987846536536836613803567055491817972029187936825113333650564850089197542855968899086435571688369367223346406617740673564123319000380099530453510206838235072028935074763140370533703683613820771726588532844151983686312328669591587077302105005886240656274960874137136958472848379039952684853851736901133239741266891456844557261755914039063645794372370946110560963058380132953715737642565264371827622298656073206183206018132545353733711530839044753457906981492233106653897661784496536867101645823742346408769003293743722476949605716516287114445948844296462926156324159165757719029925552426901548643753734007788650469974194095938181950950360587940820696032859364853667898835670551933763746484738256186490481210384130795246823514097144855198617083883593451262572100573773751049252690665646467530632231274619718410203796555123147644873726135009824265250378376169772651628429551565167064435414440076161351104064300935326208548013608147530737937727469792069499419831823028756287641191718173075957661569981358116151459057405573803784444705723234237498833973519982908519933430818636409166351397897095281987215864381379719168493018417948201627639561167263910524812623217532334953370871042789295642138238011636390653418416980850249915594581159038678944868584489700931605805709880172285383381188280755836025964628665263112062537981439270711007598130504653145161377731287063843823046446623702101344371677622680083495718260601596934430275139692032184765330099138538349292541820623609906583302538007088755326533087070104115801862234837985426429697386384797570080576446233503000787648079237125091391030394484185532591551598330797306883873851290495498782682332568833813028150124678356721901095525343551213899978185061603853883862088065579359128566071834600676229361803448112931490009529083805451576515858910733893873378561078141810898640668413704379486481804834832585534872635019351554700920514583903885466626657500939464712503014380608848285252947764075544401718824803131216779425313913898845187735642750363353171428084988334767057782596661079274353844154685917699939893923901431181439314368982806567444246559718305231073036073662367607266895781713447936520393391231570021287864401914188458705505855178193685129573977029504265131125030521793050939439237468816521930130019484520313016182700871679243318134326626499182070320186658670293953936062581865071657021090336618356676821869104775627553202957692569518282323883797538396394980946351726467002303878864965829509195627269995936663562034248772531434254966456739739515872045382336327044129125268014971913825377475586919838578035057243596666433462105398396256815088996009970671679139176732670057816501755462864741983775449689110089831266723993974155355428193732411129703918568823891960702765113320631277641260221250767541658877740039867235063181538321178464953103361505925388677826679492786974790147181418684399715449401399108788617463475645289761992289049744844995705477812699099751202749393926359816304226402400176023680645013966468226945392411250770384383304492191886725992896575345044216019675Sheet3Cell FormulasRangeFormulaB1B1=FORMULATEXT(B2)A2:A1202A2=SEQUENCE(1201)-1B2:B1202B2=LFIB(1200,1)Dynamic array formulas.


----------



## Xlambda (Feb 15, 2022)

*FIB for n 400 to 700 section*
Attached screen capture, WolframAlpha _*F **700*_
FIBONACCI.xlsxAB40240017602368064501396646822694539241125077038438330449219188672599289657534504421601967540340128481229810848961175798893768146099561538008878230489098647719564596927140403232390140440246083597875350357822621588307387224638576447208679708287320318854254461644824834357640540374564827686199318998420482075533324200114456086910197385968038418851388785228066747740640412064842556154967682104207038292054883869090329558990567328835727310585043005290110534074051952132532477489958194625524584538730388053593825001030592563956919572392152809678530408406315861678809298672640504622841374421877496262678090008732544752965063089645333868958340940751107493205704766845996717529982829491630162206059011179180114865702032886061483681134104088269366108663463411004717981412027167937978847386801205243459016220834185059487057696411409133801154292339400956043897344103101171009950679927023231614705027910374736656354258094124102164948153789740350660910771582233728503897391537950352840492951901187165872512248350541341135029596967131343602213497450232647402139968983372205851566400021802909132390757909314414412566790785050287471088226051660549846871789428987517093799713295408147807911158803928194154139170867547216009071103610261628763208931891188212391523153772956261768992350663830213341641414838775397718883781985870778234261677649785478087562461150905910343247071462251869495241741524009642944934892853089481039863024886581676666299953984304678866605016063812915699708541841638848418342653776635075351818097286564231462144387516445455584776948263135275167569203741941762858061287588669488164832857960311450813138810687470429760263643553279199088083268912242041810170647963024244612324018467605759801504460095507498687521584842050154233436325083811594214191645645409178311156114050175340179094658577397657624573049761120640548215334513341070281422420266271020548073561734645202210075507480902340720837444180191960484556363867814584945144042342143083556146590467734605021974409341694676008048659990148516807254861118540126591905217214244226971065820139782390806954219541689244276624212074373456653600330331675492690805039973161425423112794214347988291642674564169826234137442250169403724715052810558177873467034642304948824264241825048725493861155507441063652431265802084922901474592815888138614946283939426927046804342742529529908689737440719341867053506936071765074245955118399664162441967250186097733500962925428426477803959446760522744162776900312487297859234749698643278230438281167130254920027714309684294277731030463441349299375814474353818480155099772092498272748720627008396321158973627239389343042812509070057908954526817442243356943353133692119589484705531025009820067623708173904382486143142920240100521350303826193256717710761833288791891681982978279745636828463944867147531621875443243032749170579259258353010698961067705186422484011271467683810770646648531568575321436004361543343152989271100609562179203955678778467019711275902953450662090516283476995513442468967626236943443285738441679868820532214654639846172206133759914224918345901286930125527082017790403630598443543313872771278047838271141861031862463922584503581717836900799180321360252259546025937125683534364342244661544603472032436332649584708114319787957314032873538930901437280496774780497748874337437435363193867240825585955051875277095450657823831548581656361884893357330572272938309146144269043843658766002170117278919868514023556626208980262727998494371577798350105862195041635892103170274394379508538889419983751537370155126617127476264588285666000776628768583891942233546680671759717440438153851391064317116435242215574822797483742908610855154379344086035944781617377102698820767444414392489367799585169539506159171260889687585055544937118143871103737217837010397125695055383646144244040278817102283407038585813270091176624224846310456696876645445975772848265708967220435913205443441651724950981351024336474049827000735000754017598278783153564833479512183696802241709897496664444421054513122004185094722332182527912501243002480702845751920019293237240666353891913914256628714454431706238072985536119058806232354913236243756498301124535073584126716752850050694155624154125374464442760751194989721213781138414882825737486758979003970286993603419953993516404586069538410754084474454466989267975257332839944647237738973730515477305094822067187546670746366455280225162564879454484467227740462964978546621083062120564711217274456309065109060790966624739882859866294700975633534494471169472973094023587946102770935830368494778993361415993112797851329548624931514651986354051298450448189224701939052144260821107714788683961650643899232250401887694799202261321750128145645161465145144930617199924845450305543138480837172081112854323537384971316747993215712381490159334428056659494524504953967011875066473162524925231604047727791871346061001150551747313593851366517214899257280600453451801568700435961150371683877331532125583907730369979949828222654663516508951553314834206294654945445212969654016234677976879363698546925303566869175045860499432778293948758940882050363241320227149455453209853410205942894805962024718622465594059464787456599977150048405839240303975835115833831736984564543395499503682896745747556617040917186297281565379152049714778313453268297127963387482470340084745745554940336057423256938071768642271418422378762132537180494862787975116607001677217386408086574545458456888953310942522243955473348126805902853515777863287009920105711096492899729568512612327899753924594571438356671516754813336191034549520087077303399188658814868733590847658969746340686476408765499374604582327309982459277057291664382676325989930819177051945824788839301944151869475909199088736665253294614593765666653976031870627855417225846077008122576240604639657572892791810839222249885565145430752664624606092976636435308927919519799902172066938941753292550464446412194735962708698159084653882096005954634619858643290411340798547375217128018143947064329533155104103985087527773547920408970219027526758614644621595161992684664972646689501703019021088600608282570556855039728226373625661856805487290962276456465463258102632172579905250142702341582083548330704123588606726543823697915098045389770250919371495231746646441761883144104640251481165251188398565719076495184566241204779652055246061157545079964846772287734674656757214636136263077649543548534660692055214690754342691385916202184675586569652210505678392181090468466109334029505467271027976600736535005486271223402727993155063941673902001926854067185021630694098634694671769061758668299018044720362218816124068233703102714200689231036957487577925505892900784146159095347046828624020537229717283244863695841661789309459371299941322398704536965075971940465647510004531000816471469463146381239127074636920673180298230299917964023270833292910149065399517511955245765178459925917694724707493865866114242474693693101387148481930125577362702465168971944350502772313599022402785052359258547347112125329678505513221062899833190130784929305217595410798098073435004497947433151480054569651618435447447219619195544619755695756592934577279266859430794958113263267045379355000719746750502457354703977693947547331744525223125268916819492767767410051788736012553524061365118814359498667179901982511924355596129347647451363720767745024612576085702344689318648166807511637324632164193714499386926652484969279059573823247747583108245990870293529395578470112099370436902820065161385997283008073998054106554467481203415169952547847613447196675861531814197166417245678868908506962757679871062944720178849744103320695245048247474377574794772175802127494856116713672426425688880595219724476419600966267302098624954951397614199316858899137282480478352052179508100929813338906815025676748607042075218758807256177411650992936172968372382168364657503948147956963239225758654148470614945759456480812901452286071890388290762151348843131272979231385425457123214824809216845717656874712980450562726202415567360565980794777111390850331644813674856981646960226192287360483481149131696402327401278275120573021480636486507112094019661502199265467796979879842795700987687379996814844822413001535788961484080796262002835047921601127719019674326161077687842451166284126121705899493028704148548339043184998122354968635474677330498542864661988399598709411830703425204209650825540787157763668286722486484631732003560119698094434372973588490220806732655897954526734414803036287213136668020042167585985737634874851022163853541343247780789119746893475649453352539893941620852721837288329309644923427913745222668604854884861653895857101462945875223492720481965870260085195791896147587136640324616522781591447955912808654342484894872676059710642806193656012612467375441519713437735685837768439858477612945832426514875869658031322947334904884329955567744269139531236105187857407389973522931477733916026995117937562355208106323825570839977289814914897006015278387075333187248717655232848909686960667163571684466853595550508187634621199695228871300237144924901133597084613134447271848482284309025629966048359864130560049384871348807054284272752352079971127752695493491183419861245184198059057335404983231052093474442658048772849607023090385787304773487232160285825777640949449229677956970649764278624218363341413361509007927864446182885454551022526649273320076246736828293855291044954934801994309516818408452995190383973646671835537213025106017041525333156522800379742496995285687643305513496494776979000658179483631541702671811498282273632999946972430558698043540918772771175012166896851702883461749749512571784316098613244768412217102088629494571867212494830322628505768565710528091492618664254204672140130498496203415743226804080810838292438202036123173081972119645546282154862039748982558032427403332227217009747474994973291335863877902132585224146092229224181188006442445938495084399197254060878389473535899747692637311487750049853254932961459429406936070704742495854129188261636423939579059478176515507039697978099330699648074089624501499861682916002384507327883121656647880959410683260608833245299034701490561158235927134583281765744472045015025001394232245616978801397243828704072839500702565876973072641089629483255716228632906915576588762225212941255035012255915161619363308725126950360720720460113249137581905886388664184746277386868834050159870527969684986265045023650147407236342110122370779064793559960815815014554978527478293668001993615501740965736459290194897927515055035906062568855705418847497729425514280420929064152136884413866957852748271002370575015896329818164582913775065049556209976092047528969868508490307840381744879166691862941345251520750264617872315981632789108359480841285075051546227254494775294781736623791582212080267394331882874735521220937349853562024289099752911892652406375505508506250184825210398004767872347464061299611844188224855206102965574608942488002381152069791619080348835445963350950740480755065987553424604600984321952081987092765804349357651769670267747335858358097976691026961407608351385105086549923758702735390139183573072808204317151158828986996794832713116199613609647330495585293499629115294771511509105979992653014907325996436715050034125158604354094219325600096801429743471954831402932543961957698761299095125101714792302400422612273882724457781161683301159423840892935484239325917396080513047078883968969539899142468051351127745922289305716855338470916082815029348872029647830861914852073402148308000613611082094085891168867554589514512448938453133099429780772981606606266461818836238862397912696944666613222688057440818709337755865678589792695155137263976760261565983341576907674344167553075565353407065318454654006347057680635769295302786147773672653385851651411753361291592560281149306723740406832171263927742031044445424100672479284561210177482396163706430458551312751751519017338051854126264490883631414750999724339493095438109763878754678826342241845946777698949854204131204698551851630770699343446686545640190355155157831895603420837469154209302855351305626803056124260095113560634589756011251951749788037395300812810131073986569908831619942913932907263973181610030131969044902071037794063414838720960709752051880558736738747499355771264341725066663515546334770376418182484465381437595847958195297889176975473310716720952151913034677413404831216590233832829497549513548924870328368215566607541156956489286026633568324039031203167743065225202109055108727958115216736026700200421586510355834736601003381505407930071607408184616335724173657853423941515523521341252285006844123687575940998315017653786524832176943782493816616204576725633678727969255657756097374071582152452255215779587963993520924954366833505981243756041565060388283196715699758388637449718960282807512188271646573365255238934100808864840588968254846666500774662240852478275476653257837732021606120081759175720837328779800905373157526524144556787676612399410607502833498513727866164566347815154815775093019974449838267310717491180799986280700304935275252338977957652608053002900513001635214744885730911305699213483534703401905110390849024746995540877842897540365052852637845458344187320471089755413366203520235473765747838507616412856336016496087735221319219073488777057045434143529527612352379207134010011187605433825556676843310748608954997512482033700355471916437115666890288975554860208377935305289908069626490072147220851595674875918791980484060873400736766105970605204327937893288590810238633254306627193653152916031593418561412247332727650013131485560413591546962950711890926307608759047102264445259713128388802908710972953253025939663045051484394553579245688007404352394075607836351448657032278213963375040157733850523367022057215338166553353141971256463612896641886306895701138889912807667154799302160547958585822722422142422179110236495410860124049139453453267910919508664381036439886141389146294265201742762635653609204990864036685797182579912960759862432917339387305953553310988217597227727767832619303709028518417800940991743495576975294944985940821932500209207099635784377746343644535365341777930954809416587147660791784794314784432111526800706093789579403138960940165075820050317562202766948028237512537535287675271453218936393092272215569716662621220562597505565148710889763755502235832584097102752578120472266260196553853646546836693416059510785835139404914814106443171527757617452766883007765159625234016610213450879839716706908394775395377531436383873795315009506236096188648036856522778750817396763797198414070984881727501992372613765176393353441442540538121861200532154012660880897500366801294475008399315265791420404854991905869474051291630137177017491480640442809195415391971755643708919658109759598613286877748435736271027739653880428269760465793228685666500609031551432445739772236154254031903676490304597847185685736169548906931858202641803975680844768196795244879691985828019808017263472521442003280543541516212329273937944282832817223024176844162155653520813722196490508943999028119788424930258983327777969788397256415445428352490941769839227546896745847196659134807376799388534790049381909119514769167082832104570635004126950028172892154554313514614234509218670375224918077438427576428933334596672012014286998559505050364967081407160468281906647912145456254654421867105176279057897922121663924635086711236310133985206802063668907679019819532049913511731103286033597940318348354754535381719410788276568297346582002073514287665243468581878814077955906238524869897016994918891571567940245852463804554854657248824587067334466219468245926708600998901553602567085616141624813917544689429066908430622674853973843792782152854954792630543997855611034516814827928782115286566797071148964430219580720156069559326083903349514246421914089645245957355054814987936858492294550073628307385549071628546835067371605004636120553407361424875515081178013692127588793343802811015515492425099125827785565352530979017842728315720351477448650144765807862542296838080812347151296511676978020230832740674552550392389281167701502035989380975639763547857503498418581064522941991788303298056836385526909788088973689956521302177555355163489919375048005857124247887742403637942953864616344607899952277804253298186491762024203943925667149197960457624495545521027288474918181560607231859853063799927287042144582027143522464769830836279921754005768949227345645181936125878422455555316621876686686616191784743387304878363067165807907454732225219875478733692617866716260109886666023166739157304546673556554268947614358684317978570619858355163623400362293532750036604445231770420554170842563177993789394796185585185633308975575554351663812255504798964180537314039472540720203726072973588566439865577574803495097257790926560550278529767586787757055855670411399558423479787498867358975911087747238266614004739546108921832817803452035228895708644544982403856194431208467559557113928037680978527777140672732116305813154440303874734475431773320488593551486986201473617910150485189153870299086037560558184339437239402007564639540091092216900901678570488739214977882242321411354939021430369326554695467593010064730294504561559298267474920380535341780212823208522714056118874363473690409655562810004906426007631842944464845952782163935029380541562560482606912159782542906419752914300739614957797444852212905387537805131416261365029062212271019541420375173999759675045563561780874387080163078248199965737509262329013916319215686595797193367941421167791036694055215484387373157337934789055586564562126348129923994562115461971865181000194397171376406789950118473117307283742915606575626748650392879353251193454873063156556320443556863201086994028196843893192642729856300832835860969819245410142585969471024503227019883161666898498693377862175665643307836985560054320557439403041129266216957343847351485598166655714087096026103168206590188492244960222361803886516848567565535219267188016301996025908743044853048994297393063507169514858025510135462305027065691289048056112691221167322430306556856686600296574402173405176984904715777967069003177779865572933152359691884506491534388635030789728060871345734771108199135695671401222232932038036047795757790202632719684329170862162898846381622428980527220370952041596945336721404678515033512297857056822672251986760597700995656068373604123903743609486608186281779052193478255921357148383919048426173301181358627445942891571569366844743160809780614736136462756304511005869011952298152702428684177680611935608579043350178795405152281437777810658695725705935672630284157576246926971464923457500433051068183800155202192061124631711491800628825406630571381640950240522700876057357196041200618922553823942883360924865026104917411877067816822264789029014378308478864192589084185254331637646183008074629574572155397926921764129586412153075574099601109247922558905818374286709640260695423396870480843150490968148047148588235083389575573251439127540686683410355036436498964627214165334435973635196551498669275073731875734673432234676222479684794771243158018576574406837054462450812996767189512073064228323413256994879453570838208309535769155272605154275385167190627731943359478241407577575658276182003137496407122225948572028855537578591430853088767389706978810842887148339827707619843413107416738130721399425578576106511323646558830940388941546064509308386099184842573254233822791528834661204242094498198300501060373514868149019964083257957717233894184687258058110116414092171219393985704398565856311056176222671574549295692848096906248540168425654196209210402575805782788502654934314115214901056869862215023259562288282318173443845537555504066971990229791673629864620577714101111120681089581579451189207340303992102591269827907933696265813272813890380454946315982266152190155951460136425471863742027952073204172134658258073003947283373540362408137551489415519859176950164212219779933086973781655888735497443930378845832579979936218431624024355835811181228680174039395726672645342802088894857582774456012578254277185720082711077510925899440213930189541827314257520412378158458219112681530077747993507540208576962440934493522760981347760536080554578992699648659003387440023885153416266764418366526216585583309249683318181419507742666620049833298830693505055414735430788524117798198104237682623818421631870488345399069935706499975865845003764986189588994428180687058194577081756287326652282130361493296635881251007242726576928218707220225080667141193717621358758580962618193714031895056073532586929100700632223772064294846693785378138632320496195528151124350259251085346578405507826210588586131000268055609921839337880403168874871518195097038587116150308718344497444830568622793920406537331453336153249817445002423589587211962886249323953734393953935755803972218827320810651410997002503722636077151064818322071530887590704421499828222952828633590588342963154304933875573731834338924678843737022417849238527147311222067133521981633441115991937424922157757653078040397831056591589554926040554257829308125788274680482815955849738659889938144313725789769599132698259438063468312512862179152906263350659689592590897889194859191704881857622613605161659692872156509128465291624947856903121114331700554055405737435019936805984303748490745593591145281523541344953418998341088828564447564872189516901840343593867364667272024702995999211887404994788211595889056709915043459459223507044302726412390718410335018908061353415940516781468687275636215035758413613616605461742797873829020527648748708476411795955933803519665686090773261824444390176450610990315946847165272163502295150248561608391620538293153837330784168723765437946791613596594615422409595873201233366547789206725674633190999852531214089106591665382440296975328108446743362471368622148864030879443279259759599577437616448227855954899222822437073573222259453724774130545682118040729645781449016227605874620444703902124057467412244055985961611196785760355479792915540017431096410365413594389778955394563412845789736754789818270722802108675815661170104605553565719759959726069711619248377583524645322456554671460976361889270266967000202340261970332126043084329988608548802627001913451802276881602600598421816794768519323814538007226308656355646304978331680565209458364687198676996739412670372166296355607836136144978578125387996015996825139109610030996497844604508742030702560685972243832348794603880898183803179998435136720523818436341061552794966008942040160260011043307057295224234643224676771828594259023735755560638000889187527770170573147392561840442186781992419422914244751790195920060360117868446166905255231141069281280570624961584421727804470349683791408668354376327390996977162710600428760484467039717799137960160460228911753224200479465784293958052399219220608157483365108350572978936438524949474783558817604897382421179907381284469589333880160560346780199391105734696925363239332969844182192579211169578700256770345106879325802174555794767607982849940391848324187388471840260660475691952615306214162709657197385369063402800736694534687050829749281545404275276958114612372505365271120299229608656977805720360760512247215200641194885963502043671833890758499331590570426575108651962665228360107913267040714011334812106069107793284436627756056086061981641046217181630223446776341037079709877940526002389528019162689081976878763560907850195126187133921809903075415013440832808609607320636256628130111881979698070822046878572787368505943218553002788534849971477435223455426652732061513241681385474345710360841361060851880036124984827490432437570492575484956058142110618217135491905744304765935379131424044616535077490542267169301584705444412216116098394366178779783867863040737757478017281333687896121253899079218459778976308312265376958728180828364186643530784901927648049634612610135823697912782666169062844948067355657769395021071830756126284090342094529018501785193631898343361132408702477150603981924908556136112197673597005805048476932523256421358305827319000330432951170762749398842921016244389632191801516447742751377849996232584054048961461235559105761336317101675609727370949148835212692110487405124336036528197882112012622415685107849500590668384026215022724033031344615613575358417313943675864449349599351627318934858821137917346360436640221863113221750663120070258646650680958978047149850498735718336166149309494749273068468812054468730611188072869857422427913976037970055038419343418768872769213371416565876428183093000777390660317761761515063078922412505227456547964724127461262218445633807087439642336457257050475636275503969915957883072686017963564499282378017501061861624372573671685573696268602433454738649335088303056235001415680306512295469819055044376739129329299638562446146657500059768677818761961739435652594098078923725150398178866110597306748690042088855322642969552520294691319880709045287182711248464110221999342146695319762061863808226265783652619993752831633604759932395051746277090271002949481847990113746364257448174616482349810910256879499401915373138462161910324387885988173154371890322981247087052970180043631917912632559245140051040843768413815721990366506105937436710149874406206845816226201670521051256653841637126560614460756304620968521825962693973285419332485005221840483956053945201474108702846239809981459774415965623621270295983985547115707431559291258546500991798652618915448523654134384649010930621732533762614423812471929658991082496890039510054662462243734808911121249987114421535270462213145389550480151171792098267631789751145280578092936800894395988279994361506349503601695165116256237076440730967596155785757746439631686324456941574204271664446368107025465223834275134631306233677723547296026061459919260564617057626624114499216220797211544971998999666779076389958966222193888436561948702044403383623329439249863231173223752954622120948696207341335686276251852636235304731731028295764640630959396345283819642366050810256297722990556219660807855629255679504592259148827355478888129875062562862629976283975127038464780157546372987501602448734818643049351758757847434345900558941022481278879912368297886950485649658502032884193629627485026463281743557750631151927792970955659015730150667098598613208246642514627555491010375714367074142204784387592044473833316348186306287847893030330139423984327273915228459716835030783370975921162007867209859736331449012351885031661978251836538924485410588536451901163162912698157663147575001490638793193158169273425188084877646907148139949676284882607003922455642175332719673884382800405855326869615382963263020546050693477714425474966067108386628990260218868248622828310147816886144618938452934807527206994697925720921724891265915406067284063363133244208356625289426965604860301544798263685406953126269735458287766562429501545456857263169382327417599605304525297121242275682666963463253790259050103003852440570927409931427253945625821374892563768435583448574120483909792070696589322115525326226250188387157681749950963563387034467406728293279406175787711476225517631032774501162299226723350011003622029366649333865971649533124931530775485508399957432617863663414082472645683129713184674671512140765277157665859587605486299515893345957774251327644140456256097164865025775702567389555763918256876376352278591938635595904112529225028328838782892076913703772171622218822834705813645426430907384285326211817751892878011594039575966151865638636368683920320390887543099669217954291531060784349966253272025217041216930159107055919532142991093592830425447044826833299515235797755263963759654311418395047795435259172078717540934999204133663048918743892350040074047159856262288141962621401220063633262799270347283241294176406389652270345043413654974522609387414669404107763913028837612126559647173308995786544821550244107198068426260833774548260029880682106969641639156177014868829184345180485265952864234976076843263951425040009488821773164005025304477790583034602085482671971008281870646090062363866426402526997183192633208949257113598270109290171544823942398011612750852935062539628907526932930241065827697452803087537644709448968834335564364140887673318809250524010619662577987516399323132565819122620128457411527941796791605717108360714118485522795227976204634159098694579741644642661576451507355826135031907985606886093010385808052431027362559659408785671930806809864376631247767624973232588515810812535883829230966456431070453184695448331375138104611386761257003617133710622253563844233524065089898722867035460238388952480201184868277857154126870775028376466441732029636202804157510170012596993647350014002941763053280926403892932850761829529676899836869636720105174417456793667966662754604259336476452802482820898252488885308117208380408607017620075473675534490248126456915851728252543935297108025672585375602325071525120789625379287706486464534512457101056646395478129805374055957031623017236728815416652019389766613557782220835133977662392690550019781865193087452379983547036496477336995277999309135280786247013754464564049243092710404349906900145846682465286034764770431085688065275925622106936718208242005362834736506481187150773510036578167626437681912852052108086610994713316532355216523644907884381698560556506335045796647564188880191129569438534638176651649192085030130996749169570506238328829850851301092026575375152304523110831315441298517503759961490385232424012639957386295039363907092164965265031080010748200040698633315000652011505606210975312604670680554004476319580622973668735981561212388981208876905884540540799630776055598256536515028851376129971561559036562448489449069134108451526220819578445678740271216710352048635755736142750445127816988027917030356716676481474654652813685245094997563142236806251369059962975520598278668788763384612637222927900771892223391185738164856601550757648197111031979428204129965565313165703827079947192981404624962180048698889314434312908707212291805112500495718070970869667593524399011143324564509888140676510958522773656654213025562780299228244037726874758706483286445204170995965948461379314847297747257898931035794509060475771588321409918592509963052405640726576553446826010510987001738517731243805069702753383485141250530205842973659723027044386086397324704443044658830215670550174739167281619908684565865655770816383139792841788949999913921345356178355268512101896904567668081960045169650757076826495336494165460988846493606642669121439650917659657902390764882496628591741273123519720423837121901199246071989629974046791903156135116210500735397669407537631455519953540343419376387377626606581460098928713894557009630773122658933877398905453884367090958675650727611503607831623781269000351034349192241343984889606770110590783886796616592362489693596391185601372046246178654301236027355083613162948305624774403406763966739991769735748703756729872799504843147113529967171264416626603822588622310285742611002819368837588178634932808967980253906981275502014910371798363773038736099738105922114143489732753883640557955151206636616185078315906676928212374865615016242479870960164051593416855286900276418317135765103764808471848441862651986942994575900997170525126415616646621000766693821696267082337768498385383065850589297301957367076226817577843322750756346753784720794817996857410108648430865488081108308156681665663161927452541236395990357525505988700731383768531370711670876175550760548515446433285713026556797966218312260880294788845558779816082079824266666426200412192340602269859130235582723903796882746110090740758379823251833284772150892038840502887744801799800189115963193210758792691289549236676654239315744646424186889488278618159397693525959924716190784599737832788813631679422061014315856754142363102627714544207776663677429949753165668666685935696388048441387540130217643178807321423453572526486043772015797214210889451126489836614552862254308264662614052709773955669907870808866966711098672708526908600764889580794591185766740194460441455645037457990760955740573933325912682002282764906185274340684734874403234129028461253670668179580296724073930146402908829710229738399544289961667205054751781487330978494684445908110481478113874492679209668252619721427908281071693416716692905670238093430161540518046376561415960669462345660817615051263613949405359004237791672373015009415235545319530750999684654602495713563059467267047014732053341694630045471346736637133446649052452774896655987814288227151439510822507534778297905539804721116274335258818688815785242799935673671760714344342759962454506518105022512930533436759093830728065004504277212050295532004242585084479996921601743115818452556652348407423784305296746721230861664876176908754961231572388884264999927283621579694624882647159483564690640229317932867459052319648954278561805144839236565276212304646756731991576009218936871209467749677411397195533364042715410422689887151436695614986172233560517951939049241250697394380257701491584972699996609936766743222437674095113779964428981249800281460533291326336990117314769798596179179676812462878450819398101560899651672942062846330821537976208914576776755214013683314050651173896730927211678656066655369052400540004656950032874794662984696438968771337150802150349067322320547822406510676205524506786768436451357409164431138325712177011960116599946695389390657319426748629053974339797159317419590735252363050000740264383394153228048652414439076796771365046504072321508231222244310422363877266660206444179119732408369866192876900278185575638836207240316520034980758670394197563455932861996357680678220869163981323795134505481552812355988892665487598311818546435104472909827433425790150738079528076555282503505478510873361288626079810344026468167935737381438855594595762770598385459237661933150824272973051967594145952911512345360870830196314880058693450700355437791278104497167309654366216826805782429783698797410921331875366669483655119969958410415490661110459324389425568793988590400426768771422170105090328887861423335977529068876885683681935616792758435687049760893520521540742131328504083771279585786987391968057680333007567342005825677729151517512587266698923378569426003431350668468215138597711283154281418940810571884891076433254999248128286518980333244070002372124064263820485025548713685280216201554850657121671789103190391685683244947656388675111519165497457771002984977465400400858410823768502071637505791754541399372405432823260052004553420742218398909073660491375038976866843963336335015066543333549055634898518957417979503933396936889583054040782058154757820420106102830787471888573555827577669054802903783824069428868768564128128989018176585252040302126085488071926335079419810451272680747571571160723032344138301571590200724086190900349998530438936403887378198185688686103761492339168842018587530858475070677646106130118753779820168511287979391742270610548339362599898075442971926458625775220986965441725618892473689687167889621328187018603839571160601156165718032465198173590271441192035550962902993642892477664171488276167058117358975773751425901845612997090658690688271651113667355860622427102019076226843364138595316927370091609703323530354645264253440817026771386351610030043817601548972412867287338615983131691689439540734995542879226266673179677383009082171060515100960363050895359081317548257896333294690942874627777088161176577322723838769132951613073789692690711191848662898739848693775198753609852446309655832028330454660598682611672193522149774111717714260979387118204994178871696251636420290229056920693691115073258365844161907496044837843099286152848071634712929081771149404169298974178004610740640865713560716420636617075619442009040555324184213070969469218619244323213403589236542235771846027139747903721791576212723720927243046619353021958815181263713965865513245711649350661163420419735320711876296956933012657015979781977998614671955615595575503271088526286912090083586765997651677082241988924535028532193715530937335691260536432447526773913318338696694487458144830112233692226889553280019828947806146070544453336245567949030231361238443787044266139992878026685550850062632665277448950030598450596769769578872384642809043149208835674884157938649813325492317314454525392662562999652894666798593671964284609739823864458363175871892069370270798978243056986961276181991258202665184315246302121599215445939400993717597881499494574660227890185111772980985782838975424924195433694391384198142652738588233027269969720649058376862930966764036030509631786019440726559168907424267534212002902244191317797589177054256850728231628400173261501031188363554465780154577700698334108782894449576186071884935308477781739001205691060834030825291577495045230931689153189869120852404824808703545102054148731697900818516624848497016995405993666630788858537122452404047956419334084712827499082735006336975240676728448671290816396634209121071249875468346691590435815363631744263942670270087470814955752846203978413017571327342367240967697381074230432592527501911290377655628227150878427331693193369109193672330777527943718169105124275FIB 2


----------



## Xlambda (Feb 15, 2022)

*FIB for n 700 to 950 section*
Attached screen capture, WolframAlpha _*F 950*_
FIBONACCI.xlsxAB702700874708149557528462039784130175713273423672409676973810742304325925275019112903776556282271508784273316931933691091936723307775279437181691051242757037011415307516220607347893496375416118069065605818148256560650577826558972543180576621423411353148447694229039058678638771392466818860973544865477637017047022290015665778135809933280505591831342489278227825230371392882152484247562293480397979693624657231967545970992369730708115774594140410726556528879767057033705323181998743157826776881007949411554884045973486932043459979043220105474057019403104977805679661775010051048369479508241413001384271422006516777067045995338847776878967760057386599780754044162273798717303436342131527467667767537417382798602462911629320981043418100187624016007141794997978535396537077059700662029775622125586834267607730165599046319772204235479802110570687773241594436785903580268591291095991094466469667132257420143179269400541913307087061569600087755250109334689165420751091964320859357092153891614424209815544100913185416870218273150292041697213788456985475627342728497426737907730983709707253966629073281232189337259218152410852422549133431257743959463526688432142507262909546057630000942115129632323510395218885308474281535367796192231371070841092663784880624312280617576022752004885463506914047313312090594766998655259858145123307945731597131929935370235609376644804274713127804158696532967117096648932669220874753121434349783799309012771842025717308770803694743584186951058443607791370873169134344289860258664889853333512214128134093831575609712710107581990477089371843494961073860745095013181927171220401020127542202840524770442581201221654463288475372833972822258275178139396854409145097012289057137111740713171692981193747093045716987381851409003474283934887281644896386823942810270172791353631949798188157325754089071737114745189956904860353280451471471228165330764638749121820426564555948328015408227459961388974829203184152291905146959848035701765826829418856654823116544888961391585009963113234033419715713455724624815685610592913570217258221465294982622028007378476456521480205313332496615759492380853248113004299123640072622601088434845790117167668379337167147373779324620731018111178358628177047454490648966276212682247485533217282323839662142398493985115164071928656718712380714907023506958897483000087135271771511931025572777587124040314060800759262107440475186556286467012050748019335457164628299993417793647645201971647955113106940917907855416798654676770928571871619304804897398318142151492419428936309561931124152832499149259536281236617781004290442391911778762809273900304673825487655824931362375696137676858063771971731235830470175905266191806480229695571669371599339388785616271587029255953238168918742385329572410454475871952628938594596742839217792494792353628992272071850540635367574223408343298899658631881231302723492221284765531123310492571019173209184777241351173263749772257302764082252567770580168190930030487055972171981776465837750128674535105379888327452900674322831610070381802710339748524257342127927162570923583718225644209931702676849310609797960685722384116048172272013231710120532435208287840427954695933413197704632383135514733383365024109527651533711193981227475698197541646723446675910187838037812887665241460310407237212140935670430744807574135096594352867870326513691554414255291365439899896195338574650391023831983407002010606771661694359511889901760895623747987191521724722346410668248398832840291913938982246121164628415479272780676470377640230714810372802151042195473097682176477144400636195053067370554218439027213322256172572356050423529147331359770542359841753290819727978463471420620560692163022033434423026719014457867143838237753782156680563100425636073030800140201204140827267249069149035398721464379973375373997790293619082001139869868820772992704510491546030693411867741445360645540149659674418260573237312845264404292253636643727725146741913883134546003570276113581731193755918798474870119308768422090067138349883333653133135281597444693155278753424745706158009201483444183123740507257287262374334042371217606473700098673217090966921096184862688179969761520171122432653436405872518126960510511485567753501689283118903823299360882260462768736872972738417531812025630665094028598090344029044802841696113893730574457410717938161522697424038494797764849584171205410359367401804839153141953240917001738093730728621608722357378067298310295848225149387140138035447407755302720726124291624880570614827636760673699546990268829453762602329938773861355620635216294254617317291005784040477634373949250581829128589677588166452408546692608465300231471006495797589068021708651348042831980883557356276347987165392775153044386311635547327301627392762835012441247560877677353739064728304487855954447911186026355762631376368203895658469325047589822249713011118878677925939254130773679602605890157337312633176803312646815196811459506482328742316470940264501140519651326587233637872165792963680177976395632654230596568475155025913104646905926723988917525697347324260569566147659256444372337183836067807044775428120455588430837352942996269248533996859338647301443222476480309579594033703839043901036700403591523415847357336893746369460306071641183796690318396549361246368384956728950488679530229907120699789823018825277838855130710906148069188729752148547942627127580440941537367341115431593560796532808555613387415446435640602179650541231738132603247322617636923378668235747257928207760719121572766322243359119244897932753117196435737737735180480623050682713997267399305644728609057672681648903690463318147120034560834899335765053762978571209327379021218757324111633433409969219546587524052989073873629202378240676236727812296064438627325262173289961395781363713140744476682259859167363187733770436403010345093337603395633596934533445901282189924369656277397374725044054574450812753903599500310018616794055812628615041004495545648013834334910093969311006829352394308299545947912804476027787444282323684867677495517740738764528187864207448553513320594417275114301138480876819317737580962009568206032082683028808438387299269534280887970825236783572124078887245190386011446114474173912370325933216525298289036805444482769759805440621396808218380305165743695894655736924257395390702345089651108425656165172311749028233154775588727791956661742740200156078118585997838241700113886555209028168254301650013957561147858393779549765637545454797745753377849939173053644175401474702690220272274925879064178057437413238593374507512508211320681683313829066262226605156180961413641995158307384963230067880287516527768287464502573102058271245921929725518200308131569837446674474252401541556933724865937376828221793811565439091481726811009892534737422451804608864433348354939853020659638943036385000252606689566277209230573903604792271745743847874753020088499480505836450549321022280613575332886206240289546890055256542411651121512301051307035342839687674055829650659088635323912336552193031667377467441371890168589425748139879604732767259137935004490150154316339214894264279774588500295454995850449837241939229118037905832176725984298096004642291229079590087477452219764921609514247620385441183316580160215618065483040522579504441154335031130911946576508151501144277282068805711961661827385072933419916978843422111257457487463591655090198939995760265045916083839298150622555633194838918719335418614805719412242031504001950981519221297923749867494004111057231515921621134651190847537497475811420011808454243380650487099400419458366240621116235361498223776572949836850324188608012153452125796503366729461829155831496130164935838599978073302104987507489403075102007394239140915533015484258756516863176749430200416943111991564642569736430639516155403107315724664653211696649835607187396451760221112724492952517517491521449511381584848252156602011488467821488310379786566556191516688856451447942006061924752830885523311222803138267352580566710331756138759882109079779505749752750246175702158232427216624815531303689369713999669746150957623321100005560791219897970498870444642583404279526960358852224555027105049578393590422035222880100075375139832065329639091204184047573245253615186283070772480761324247276889120593601409857669134572773113573540180727418558748261169813822519226957863294320083067497547526444963554546233392584652912637562255215768303774709585708657938688967667272339965471902161723737191396813342345444397071667252432747706631690549784237107749755753104281700875101425130030576699620876167343966108519576618410826663778797266324809512388156190010485487508314150873002718977842338149996293274768792162454144987567541687313364205637590558771058259964987195016491462666724754974060506684739390482091671071778072478574014764475743274466896945148624774733595916742900048252224775775527301303729566518418590768252561737488684561525478624909390823271444727120537301867949533399725834288898476172520044940867235720062746965286644308216727936745758756441744373716228943241784788351613873606347264401052921569405638765115745144421227846602511804506200290461209299527896098366872063104943012458117372172104589927597577147574110118941274276924708772312484931928796558391706633138714795630163497942465260978458017645431794459710247283455070392292637324126653245604543393839573776075811565017847281230706694772592288451220995401440568920922327195102446787614942154743727003576062707434699071803242562416054061013268373556777826778265114885472976175918712591957400171980971697301060763705927330237127312628960333817242417778440097208987982034080352866493531513489845871124453305905697683431072382808508725046676276030277609804681402687666469893349214926922731677696233551287528919689205393382251952714985610143060301192603316732408287178514319174071240208899161073623610519576376148990201762081574668638167194409978632850061914823546180247862736931623171822349161702967644223413167686134830222254158302967625079768923639971543882132335566176476279267811566762977356304637087759193559772793592519779731535391656620828565204601114417953254366473468878738146954662445481481944253840163848870704955755946085676576312825801332884455202494280428216917219262285550734332591178325439355245173702695027612092089858988663656487297717691660378444956933360908748884224883788828165177667642075258248956075293812474413699283657523956490998631056433186460501732803022315513905388741529563601054436111241315790492659315135874492513377129537936442277373767765335783838224452081406190245652097537945018504607206431555101900443725732039258501666659795051546246742008484101308495653050381082921058338826555202631532509389076876654330966312005961078743768702202590369741415370706953719842054649389901234149005305719866920450260684745209522544007470231631259650850759016426815642517673712637697678790935013445116921936279326741234416424326583142759687535224469376247443807485547238584642560488535894605793267485703553666936794295659289908233590567092465153770768142240316446457130298106561969614934533984681202134550595194299343152375672223860778105713346055146043691267455218864505768300627593807351915509151548188598364167717692301496665809082995174693552370272786982279470335621474705465440369148501102987162504915597716600314026373253878937215413049699955367639448145914874538595230156977277037238998302736542981557591720664221323221262823569669806574084338006722578252257702859727311771517744632859284311258604707327062313057129673010063900204812137985773771602539649608273729333045272443669491930440575269258845536287387416982075892821293279088832889375208848965918231006307588378240618667335241544692126455907644395547747729749296326356391591486211896503117051626532035049555436020282307970493016753438703076861060070903862952945110741188936354515112417979065382747927654579557657753977577315774692822439128884816664620939811970930937787742143891383156182140313775681651635867749388964655951442604293051252012238297518604652417798194848919138634101709377677425523989148795520476302876517442929022557469822791699327403438490110806792435090338944610449035559814395549403792440948592812631022631483180942776573718191759463277777541298681971234649361119541138382740993488407610533843218786594672251120568116741974812359838000215765838153696843692960831110149627283900979137625492856825861172577877666822671120030169837422417655825670016045877433325542546190033162361927360551832313756970287035775580233703100636133909423922780649915384160080402066575017620635777977710812135309126481919854195879420841100953428504385938576497662783461304792866857428856933012503599134607185679747982687025503293027719928513921802755943184348180827807781749440242112949890359643764500340810255801624771849283111666609969749752892204066023263004120717669263055598981159607796789557109271146692992984296260068611024439781779283065377302559808234506335244242492035114447521044314076143288831588023217888980890895630537107758272377416695595787649933988641204313954438516457185438704584252178278045800940151385479727047071169427657306069460999822924238730994982856299850710938749322193094917952519868297659371174842961294435213142862373781488681144556568669607837817410747788164146055049770469385190650958090575192735564634532386601510217249983683841175614862872834710603932893075360795469329933357425781763313439968842702709481784782119908418033026940277544775863279563815650366751750279885076318848871402023210775587733949243546680866974336988301928450915987734546717120191414623080832983595764417857831940158959146684008280424805571314703252312725036776355314216427148865041957106124261457053921754092140803763172326820588706810338802913780090477574805214106228592278678431392431394769534110558725642041103414088163925542791541649796156375790621892138801387965463572209008105471330553461050978666876842700849820046238056135439421862363787785507940209862363741933629736977542504466112911759105550947919604278644410414632000440025360027897499295135089622767292568657349802307299876209510138041875804841482857887868218645238100590830392169933979535386069945510145334663644175658424023166335533884539050146636195893761898029283019030784440185707343083744099725186032301990601064878978713298047336724228249728467303754960430731074627736390173123371701210467270481853888939303746915170886713248925510691956471013683730416082506194826566451060039015893379078821516692574824819080120637237734495816801020137881724836767547359634490436817387773478353893551366780475146954793710987255453869437759166250294551752483362029616958179178934814739911549047329849104541489456247532094765618115009890919060844957707299241662417657640466537667188395880304402943726467553168175248756489378318934422068632851479279056331432486373866409969741779223952064333114903499839846658466420479448144116629435896011534017904447663542835098113930981921422605934415006783930071417784098249809579379191146172397922913739818846320713408311865209669117954856549385481324405851415871098313669174484442114851938715402516874708388975774109663763273308390352206166882660979479214747760488429678014978858809993736037619832457261779470320785190180385399553250053420968070850234656251548155050063080569031039838004407877005723846176999026513247047957932386237772822196938896074344206507686880635342417357495597572373831282598469483716325233498829867886773674202659031476803986993741541537425333305468521221964320151313796794386101382166516474039396022520588129064261858814353544262965089284932113842480872166733030591489135239882901816403778486089009772534197821303387785313892186697147601779779562472515944873616792900345694123889775232539305608929382272232666806037368942924379925638047447592391725032208230692616648770914668835156383671833216601438312916273307987961010826541615252641968399479461827026816587251870442838085687415952992487531910115965989411065965059157133223898710704652576718919222549385140106117479906569826310334779979716355517010639888098974029364030659245689126449265321319084097426210528612213393597652457915404409830743835459810176308190644280659109009489768244496459209529554730677800798264637824267924145186580241586489295138549989679697496999409715857404534875324947573123520260640604223151676987972833547164114698513345033411693056712582752278178340248017994281929943743230261763205352267958875954412541723507101902506901195098209974588835496480994146847025305900315860745966290705575051044351283093755016771748475737256470180280069283081864224717136290077681328518273399124385204820718966040597691435587278383112277161967532530675374170857404743017623467220361778016172106855838975759985190398725803801112102381301657019753922131204008107032943249802439891737991109609642417687024271467241971909001000928433174016012202680530522970872221529003044406006693244742562963426804802181385463165881736890212208885336625306342374187644712456957150207333853274302654579519133876533531603807344873416945698153990191233999545175151261845669004727753362151805803293487844467538756644134340089344732339285623990084604194948259816976270961326926046761105785534532532240518889429148378684513162106221074178195667852362249470316325577806804474873307633420493534346548974681357645627998177729316651905410024310124235629580626280239662068064136047863762846094076838503353340220619353346929698031254198069687728807805768361152100959250178480889064026089984913622167813920846853669841286395196956506673041345447602596668288382652275242455523016515446441693531542597550393503668386013305808806124323445973437974371282743803870744763054162034554323749875907986559651943258608729932158510967066080433624641512133653236151986878666231288488952724842475786645570103380980720115956118353389938913083271027335376154552425133571583456127497068829146295425939723629305572732574726246290673965789878845363842331040064164321247988182615348417143388108083254830071569718737604135765141440985245996862858900395844371829572479434062128681271684515666943918276960875482517915520246056253019766319301321652047243019401297415371811809526642568340505773149544409224417452286145210537225755418998457927936234869167127524404744622421717574958550454991449450813059263725287032571775377684606128093613912970981281085212557549747764690995798573856155081074489682311579500343564088518417827537999565157319618911610940265463800324324100283766488902726366450190754288933043003374365450808138111378768143837983420059502394962979003096890107360341550422434098813120413144547123175977940811537826977613188458234690453650724152752550697073682920573936558127357567478981481222308937193354610669694603807015405539076350041834573454258697396983045914199271188275511370006539363802678264614779314564883890417798143615755904634632669881611012219869815813360966186317344448702896277566451955700452511154379889584830383851142500456447424200352907781219176335788101491971262191013911319453236505864927338403720354628845878946588168145840555582508905553998423156366060110912160115727256241274173578209729595984401360831080214812845699738148841381190553366627502236312179420224863847500470534449560011452781781594502174456823500410273859320305796679166852272710551371224774167211546005488756028346092926250374630960298563009031752767666154308445444788741372315376740807380188009185818816152907730281912555950258090883966397788288453429983113783966509949308841965332769636656895074378831628341786976820937286433941176671567238990990010790381446151875788123712819817247409904738736056360531950204272194467455305702693665155191284116520387970821525665002988000629206259302085539829969039201607330980012683779731383105758186959255976132897820818400317635020648612310790041088238592255743759132676778939157794065829229936154295301659883075008037887643872516650906325635548507651579922770721393896139633111131764256609821819647727539759384668671321991292510786723199064835370444094349078182349617906975820966662871075637244146945958056480875364837155838631592606550452777001897820070387740389506822820104804517478003328098211203238074937897894282396804722303350687224817884784313011626832275415064528203458983057313178169047270434628317252932117417089803745318151950464611582382116957727145394179496534340236732601657021418888034176671278559504305284657501059372349856252262825261815357886296126570553098601849147651358716269478999352732519072450356218248222743817889319451230635546056054009544681084712771464890161362822678707313593236053503308379376927808216125619202744438745782564531197937665192801118797972726433426749681736825823443959060385886918028898007972726971038322660157488255728921877310923577934334199073829400460321033439766140783235709580109242471611270280106442806669790799968533399471735782682471834084931783204109245261357812792550643113143463474474505815957879430929365780442416023839801381426137870270351015345468749892473106404662572291854958807261187607443990938278251162299909703718959121350621550854896544753791592123000473980036889717887227992003497989638858334847701144843486745863034796741396342334326732165725219378872580409473911645082882618806407590215510002138032351289828220511849230267577452190381964685121965216498079221498772563486619625235461902560164894842403210733983733578886437689669451922855483515543829827304294066872526995933515385667983771859593871461888074569301823335823008374964181142013951611468350966366838967700187952428098171741573270009005436898834581777269502226319938308284923581427746820959548957091808820540647123637645638490912056429826742280271291619342289393371032171626191935867257896013765222038489131073447943012757312762964980570614753683182979665220964720909188841109484886582592430623522645192366050746631849723640209334307624289094857156812898603255442597755380462037559048637735379973817456585807376755928779529832830128901035242189118784330680402974787998901859899101577275171310930117146442922250501047183028567478529160522614115176715518114257943939948469859403945029713437026561634927065833831208566256206910027973171789887861370591332483421746769641222057561966870083131584808671472123424635342059125869557774470898576295502988586205239377762486299244403317563706594834832337467291449099146757502470290836158590234343320848346916393368492084016526053835309718655151992113871219648483672951186416690553446928534675098781707516012681429879198633659835833546033547656009174730674260178697529181566826742595116557615426054050886609185420118390127275416749213278774353230725657315266848949917120880338159470002311925833196762340253836834883500839105108321488176730469533687771801170063443463474008794546134903135239255428108782427408863084498422836903676843731957402396845655555436941177518324607263075960973912837835142953438676111749621885099064823121695336799680603858003162422060018578974442467554649890970282561229777719719013440250104722425134676277643577510064752063653309627272331416583883623130352258662258177070277211177649047251691668694820435056330151463206928796639309746076921302344753822756200270380793447791816537436084319912120418250389611403593486842880778398373742569612627343313925878711765996121678537163675520623537257235746506482624088606521106601833060087680052817217172481845826405905090371208426987142472559597673455621407602242840838605560483849356913163290643288376102640370633054500266704289025089282717550375253749571429396329456306232843724421056119060558755883397964041819918429759855881381497009189031984183997981744511209124455587851446497571480822434942205232905801474866393336581278411440168208957963546507423812544613830430364319934639243508488451863267701581564872705914994925618428401585377928961448157719169157753351817448594982476552595762303773753216083363159368151253518975964921380470969170559360422703758102275833048926338551106775671530108556159138288084384125651953740735394022750476722183275322568193318986049248203185224171494491759434825529356085556003864547090946166976647263469574486682681338108571837837914871788356153090875441844842415057330303498755999421682997167934970541431437515752058262229617036553253910285070418912753156530783518006378725702514905071555094410118273719573489056715870894417146822583218458436715768677108526962269264502190006881962233646273762445402940818587514981715046333257124736087165694289889158403954689875397672999612369316548052918674358645887779786777313376284684410866341980143514522263481332161686231667647960648919965985563114757880514254149183961313863618731002125069222191211715024448388550556470499285248653564925804596723958245539208384784517582110657252041484532745834351693113629881606922682411388503933345395495969195517218438599705896696414958380595166404899846061550168839815833301572239284450484503745022852584584884628448452637395556006796227166513379345297529567571602377374067048103276010223344701179752463324627698540027602786378119924294450100725310315118550225804210255081227703268391792884984746030563294647597491328973000865072458927411174494284788762570981448671506192540218398191063030524394954985983381544524824140511650894150130951851798043494705565731448291244377385084874479015932043153498125200167378451804224940742065887166136638029551947516415884919577943526355152093495013586167922644748434961751619460446070402023847704960646959151559636170185184912050957922669075098945417316824352426315235191656017195489920901100061902260842513797613458938567648844999956954946716957257547340251361057702225382189119966621269059985088054748528501949885951587339044875793733356219760673772926586260591210358470405525665390243100575540781157408285819450131557173898143210104351541330710230926558457389046268596497514105167175853851315498174385424655477033546503865500330529644575186231075935056051553185561632735195530212705126505070395012725266856983893585908556646681600114909667630104293072340351261397264985485251048676954415855996461291983948747639790693723381229019697090309210575210065704525308429082086733365234002588098424679821459634371077975262320756551336900891993199010267191398248558538259849439295832154416464663433529767284365818089985212729059591436589376622897804486145035259938387227350386062511037821081822522674264342233224751809991132130043304539333112473856854133647171347374177540625938618284045312634351904281081146987686223576468976294682570169879434686117237507506448723535058032277859597820618684653004069436812213293632055660522522978578552162456657403324990847905852526193429854780100851809332742782821379423627425236606150313297872855011097810103093486454362430960848245632621069852515875367235345940651010538536477085885634989283708770667662541652387090338829811236198946201442126596836151883171881834318520120922197161834728851675807218049427537394442238388079163825565697353574788769715671437617067859857566138502828039175710207109123522731283590372074642947695544250499461194461342003800232539009257119457069527067420825930518470029246947142898623507244510259282481762257768229818378608589160313399157458523356236329944261195817027340641049621168102188609800261801603469854337482312287378043580438254930064247938439736693310236902617629014837950303694594144826059890486185914821698427437850280458307421179488508652931061387479098123544693604412206415023507856662872404858572614275708929138323553123140029162781665888852701459940543128512216722508358074186286023982011826595308803814543751123749704469958402028528719291646882214212468216626977711000354717145950657856147184068387801061579765856091902791470330474778493432206810867334417964586386138803710254033159084272851172303238213122889463416007817415191575818624674631650485567663227122004523272131856113206711354184719795018873568680323031934719036560719027589842776038686486262785722080628467888087394923426987917592847865444536536706838458032837142848277463278663581839150473929988003297275099155246299560874965471471793362409497529992925838457177194003186586310158943233466162697236024609573022613071573732886054435412203003385146181747992794884632680896115499720211985941048181050943101935589383904015211639434421656655364486604701997004178668641643751544152900948604476410191572140483085851943050808908288684918842989603282054121249903908003054711321078627077569096646773189167688045116239097567537140965465707045041971640448867865265964586749951721832807887114887440179024322523165625244950898525735760777808133360971317199761460468334227722118238720174108338272662643551776026151097930663100215570551217134086586886643033974116524181669325552813404465422733290771747070613577976701762005973813633877309630759056176593946633558482599562983878565718943144806339993590785164475964678627505541429813138698676963043279151935385260634152489320944063572302406363313807306655433558205159444721340676247903232264078005633069442343500128939954620940916151759620589495754227470018456066314322178870868112664406908043535521931894338297674863369013795810703751651043256097588025408081090716393238088499234726689889177022997985167965265152553967857589796680122018239378812066204573034918718691822948396995628893745382358631908843040047368198743368897241098104331700770025283041231557171208218755067462198714464329864573648113619631293751860025750795605140789966268677162566987287029495924660760642489647013020148855916737375061568504064137515306653075810241060939483954895520932111023343610904846943097162533007651451709723277579925520157875345780869307228929160873871477254086307169314271008366064679443471378487435559377531099262876963928179413137698962704672330142985740182328919915863958082694887876480226607961801830281139267536805319940005548298748727722133329147757391674784962661680026387522380512444181724744159434946862818237470938022536275394640959736184379683852949297080249643909973238407376010854827180209946140130122948398987587312494674192219450534384868623308474461101307254868037957035736788204586144612368847927649582998696070817138007668883011588877907198522674775504486994029157638572885314193329523003881887687420216807521367207926059653585970154487488829635380482138760480947639533007430606318865672119274090711776874192048566864538174987448166584748742894370040012465753095260333459645952280787787532711481713586658460444522209278628948590136890248520095796217735844119152042975166793321702272786782594012199717449876127052894646689259524247381364069170104325980574526789168956162587887652928289234953866386504175795248783436078966525629002234556698683483652159473581485658993821546877494370886391766016740665227882094855844272990275734109182570079075834860248814908443287987785639770948540524846948698004527412384669103415877522330352916419327771311516556652452315523819664276964898591483466616792280776741545103797237657098178352674405056409387037983864605788087813856806018349439123345287379977619582074806994150652456490961510281142347099013813811130934536654177133578498324948335745750865883640094807022793283228753524448413224424728679877304898818792242078311320349160804015718043036082054171733573840468952625315221391947825066947905636248691862060483006835747329499742497894355779460518674655899304658879188891886536343247826376546882880362775891315529307313854445604079804026165243298890571460172146624950618253496832928674934214552747819636468557982433331707298094414346999937693522762753423163373320897881611581410703588388158698372244756422339425601740838341223158241665627461835543467814708981303600352771923855908373895386793715213271538330595708752999229305180515911269321931108226250955151593636404835818848829497596137630935307081104630124632162577476599551651898156068247720404312895003606479134932982917016875736206906978166376643856244066400517428526354559727342456358304493975479454590616885883153674333621065775410236648042084662848933007661143980817104150291913024432550388836715205238203065555551077282341319994362147315439893310354801174814919204532789834000091348430950741978868842486502949973751284810476943433309844747077736566604997986648327691170675615004249015065545680322357243084393514111016581285858778805573155290864383605164779573534170450311032254966481388788540232462861844090389128434238541564732364078131780448061576898306103009199405081373822175980623530127985951663375242165249073319332045062588388761317543568249014325104512245165644739010888886650974923615816032372332036728746631798348554974464980414433815830147159555551238639728314374267537004167955985163523310619319071201007941412974051535952160447496668090153554881944038238898871053299552234256936263616379114162279121989336292269461030202798891177251549602052377950074180502838284027472618915944963110052264521458567296861664711387842937639919135276006538391428338908881704274475850072968635948415842908910920337891266734441444636614721324411105153291017678388554770375288195428604079468273729371335722466508709835716247340003385136587225429561420335466568918892757574028084329904899564794957071190042327227559003902474839413612501662654755343395628462735273213572222901222995413236839423600243925076006697380958727846322776506360705567958726894898928904461848503934402873535513210799980100962665118825738343919476028333826073759908634413306851290043588860418329827074881510568794935966391584716533097206067849707913093586135129379062361458938917219422532018732778435078005757051291004992346384742246394315441946327736414663977808935314025316802432641231050070294747408218536210316660723230478164795696030689599946840697337789256348948921168127103595313565197059121655703139196765746521048059031379147028015381017457261222224216531536039129305956087714517625797701347217670824543976357537086354573860269353297582671685161779895893189006935679718684304056692223140826829726498115952228367081069122264815465892365900311774793406771937257007919272154710053852320083870249061629940535356592417692922934798165240546408741389689430581964603925004082376260438871114074940307276805703427021898382506635356763809202253419644656037585018760352804360647263362245480563733151602757628906522787507894987012792350771492491928978954948265817189687251278192966118519675791295708840092626373000529473311690335304579228459712399671477874446114473157611826874747748895075805776575168244218202927718728049260887482613336605898896800646227758218765951581901000563108328532643652066296907519036772397522601168549945380167686527523637632214975359367655321097229695144912093685093113487048167850822675054012255976258579789989712954728094771874910794011976124150759076622145360755595448190897197286916346990078682261389264946714250768264226751288380085720045846524926713426099379088684606226954799801010042375922402900898209611903723540625703098309861297818423619485818814185645233812649212621423586755781360630661302219506270904139803449649332966923427979740476502770305139591662847351815503411326021385081999018993391591846712593748110384296225393260143857072724217415997157216211854905870566565681832445539516866487785867820709625331338241238864449897436370312989304785089096213635014214264451443060190290054877108839480000051413673948383714443800519309123592724494953427039811201064341234954387521525390615504949092187441218246679104731442473022013980160407007017175697317900483275246652938800903901887930273066059375325175169106376470452390900363657668844665255891583602597700068917727119769205592803828077703945374715600615171200869719963776832903000548680666594542506254178911673694019049021436701361460859375839311908590213614890396093454893596089614790161981714608343481267270994984459498958877568625819786898067406218515294450183916634507070618852423567721511086931378203082019059032324631634526918751164487077696590085342786993818551264934280046053565317206043550184998114753665091762705646329765161613668021389716164170147693467410071167533090162264017341110289876776029069043761332995987778127003798986286803700233183087273444861023894836215547031814387031452269109738124590721583214955584948511735427608231458620331610101917141786385513729985528428041668079858039079056085964630514696878168286063983393785575970081091996125958174882269112349020430581637267224491789682484288861285350110125403448997947622790479303569327212953918603892249545769151957956634059089069847297626502475005172085050270197485809153168365440986982069718484659380834817613089536334229914273205872076240935058637138876606179081410810913671244354740304117622235074197193626036492089099071593326225701717188334037111425359127138512324945743711294024460075377172985524819472680355872170395569016093752628516876254232560412670420129021724057156769422272151448461996634558399312613910908257805598835196468885124561645237887571942764178228780999223143192384311106900658078163398929516182288960330137672202273996812022103057856121011309118159224345268391367196941635392100296182191190941713822140536818771852827278777380028579399667280315212862558919992202840545314002543143451673322184586193951293505396162223527814432489813391348152387490128749560651204314129884794022744349129106749438202405646566036528344330116878577367608510319331278487323923063395123537981035948334462494041348222696506072562356190473002473827542549247906420341256327639978792400829342400405236255913911109208204164593284432218110722078548814353075752383508525647432159222836791780693812902626796298262598068420916354231019724128257839170765238883827216590902692025960439128322423308798075106899149121767025861886497500925833941653797176001267518374867018384323053984534707430160736232621101409232030115506478814149566432860329878639090406643763062807943152553023602270523307167328021274694491591328591079035324303452480150488745826641447982758987021036407973755767630753479676743616473693722146560961906879776918766301016124570307980590326013349738521794732832066618065314004160020257633916914462613376541892784617384899052837984014606579427356912202512042956129778277812841059426847078144668621169716679184144306296194233566988846567636439778179533202630680893232983856774402330045779179157485241668951358191421864039402962504290864070172271225665917805138060858126096084955915840153661342307887854769533319693063554792700686524708965732755647511499590015594136369968160025326221091891612111375434370286037595713029931342344436929864445840347691038234699358640904224495550184310935108028519585021561374762756025497128370574990385330130537442843525896824526466208535904048626678791991719596617103321644229017577069334304848727793934618111573356956039837419499030320580506100151088769370827472876330908082449089051921071261515094295863293090355025486840120602578504064073952899792091831707992537691930266613290099265647193164723799063951921047994274536778139934545076056284462023877399347057897892282845205114549049441836505479625993830533198551383664647068787039968122579578492191951304609641013574495630867168599952041892517733682063494404950314374197638964865656562384613112646770174530774223190927654203600970513098020573921857123623553576870504767671365544032196532478192292083012602178705504762244157267865599235057241532746015415452944588910975778899410732618669075136524169521588672115473772859318150019954934526053547850954156752128254169414740152584000319112056592392113431721181971907925787502443646555127694975926642807890985789490328517341786427638918105368824917093969611944633866470051352175099046803254662746970807778030570512467418241151812803251564453469249222173298139984245840201191817043311505120070007991740943253108394921961491967636871217997227633856951092177081184541384733728399010104229670726810175590319370578333788435971516707120328347565911925923351647025818143663277994206140796701788956760065602173235168734395481322614627963510980776451634866048913827564792803173886361652000890999619308487267109717363538503517779563188840065350401125792692456897683981656824729811338784512785230096376086477626756047957388767747181139165063278049921502056115813153568324694164725920155301131396669198950482614165442137188236137671485955209818515771689279259206238656347119105761075939859245540899205209303784407956483082831587944260196141437612756666554272070453632480397448211455632050122049663112979920932513717849103858791562780483921635355588425928926148960070545128015787422098183105240639088428179515470835612788217083626623741126477654177488167598836517689893128668646840476475802351893300328749691939302620628226824053299290794426172071655939299272410224571085992068450328575816976960480804802725533149151776190453995060663430878920303050548331415572222262179326431289550327963035723899314585489012644397991192654119689270956336425256275401893092838998252765372722263245495576480293668716890845206878575079040726248313269008421436968448254300074039373991611106131177579550927210592428323178729859320374241974749223602222638642806869769919611931929631004984762326429477487813346500632735249388724622100665968026307882638756427302261714787597833881950962142328993954904750542068409496673163245847494468182218866757647991153482061711223326736299329301020987512416053652109942769111303569422418297176690886416758433570365771446511516631399270140834622344702058440055266680546051340515420956395033146087671924638614249884013379868489779921025932409339311651992497178380081587430582457804202157667685901312987082726459878248410202938818893114057738668504295664200769049221585296593408924917629558278993582140106857481007532004533350551491144352668699349322672980009594433733697373351569107771580085983078003873499484893448614181649450335524513327879503126640366259209104488265842644749440338585953312139669812031496095257416017913219041271065378601099359334324972506772813815284803934026911973737753668979316860582211353326862591852389154417627385618171630936030459978153709851139238158365256215511591133251952138353576264948022446569592762209731269789369346997952516367247548982177285596019745317839652057320734081696246775476773501839489942140713497674757576396719187258198116981882907805594801464903272921764169849671522364040359788634033275109870879379351132292502314006136426698121962293171905559332103663759466390760010233936535422864435976809911584638851242717916541190796812112106617085101697649440617371630820324778731206280635822679548484114065938936183208775395073089132491585052189514643734329730939583287456038468778161388560681343019088126135211460888238983526701060851030039739764458184413976790954804780529193096761031661468608287599510115293993729643802562647370277516139724841883183429026294130595923409511446980155504210296778661676911729367534601251077518082014053224125040147296835417892085269196786256167096988165972505087624244792152179409384796468010215467919076529823006083464780245926722455425215511529385797164306636491296358572434288868069007497587075212013832712901412374265385928976436467726430908640666426913865194845300474316369941939776084826648020494682814379549027178312314855613551501755646267408381271472766616916252626360722562152913260533888341341915512540542710394892771818496338740505652535036524351111570360772495353158694294012557316276695672865904673618496355247903394482857970442771974203469609879034302660458884836041514489598140102925958625432987838306839478214313647161399855131487433991031670424980898453025427847955943941203181645431758778127328174139866270310265430389934854603284368775534225937619688296214110996487401111272727082648420388521429637122665821632413653463632425365439593413969139360966020607503813795419449423287548081987155067863749103248298227892993752185145590310041108102303247279627149008029593569025460072541281119080066428513080201910606037755501250776309766803139333242858436107750051377580922749694594353193645363047428491370308446469609309956480560844941363428847958576455066558240319701707035338994711852685519455642703137273765731372642540796377854126340204575352673825498297174102574526190607037946944860691261829189791700077994789525915888864180826963972665292590395994875393545118097820029710292493125780983306464433674224045677504787029183513903618894378726067460062540826582516030883019998345339479451392627715459664076613781079254222008988428986435413386299581069981759426059127521294837100063682440244307838501020860705596783334818513454591477682160157780771820986800795809554257056628281904415709489462253318977288853868313859074043747924877293167262377358964873660377754301452672639392657129773974933370088821807485294379820829012323300483774991585779052159497888446863336636136773087511301902761039499473645946692748517944927640153297969933865722153697790745264454730359513727511800160687494229837657373614396660308506155085417612347141813938366469267939209940269709433664132445691030144139583807176739509485899265670037371813241499227341717858743015320960168104229328390737268028964472800080151359611632306984485482115991449465238441359465114422141460853718262099767597880527469081827803231650885709937769519499545212362785889758169139380639687792608737474657958849493783121096781756476272960767645589449289680598882142424497604550656053706606928360507930121657472040037307314191601527518833375790469517114499529501544447803282326157141063860798140565135175279561812695372311151183404978544074576084779694906092198758336762454048905401589449506607204278264939097537573413980490519471907060934663660744135522705225FIB 2


----------



## Xlambda (Feb 15, 2022)

*FIB for n 1000 to 1200 section*
Attached screen capture, WolframAlpha _*F 1200*_
FIBONACCI.xlsxAB1002100043466557686937456435688527675040625802564660517371780402481729089536555417949051890403879840079255169295922593080322634775209689623239873322471161642996440906533187938298969649928516003704476137795166849228875100310017033036771142281582183525487718354977018126983635873274260490508715453711819693357974224949456261173348775044924176599108818636326545022364710601205337412127386733911119813937312559876769009190224524532340350110041002113796925398360272257523782552224175572745930353730513145086634176691092536145985470146129334641866902783673042322088625863396052888690096969577173696370562180400527049497109023054114771394568040040412172632376100510031841272931097830880793590374294077253429272001900892458876915392638456296543429190498883788292044786362714234915638546169515824161541403206166831857497446834542678661606952483961797135390846599422856574960358771006100429792421850814336033688281998163190091567313054381975903277817344053672219048890452003450816384634553905509653388594324281497846904283041758626035944611524563466839321019235741923382831047922798232606966866825310071005482051511617926448416241857411039626258600330733909004920469712704382351844831823569922886993050824175326520025449797859766560885196970738202943545195859929088936259370887605815413541849563887924611727164704130100810067799757301260698087531246773926715271742734612777287639532478861449190740353207280899573951568971697143816165593357411025815393542398011557892039046419751747236046525810799632346473701600431159069377968333723831009100712620272417439962571693665348037111534328737920116377688737175988493014258801525516598802821499479938897081365847855389623481002394367718939921474498378351038125409119519675690500609120096070038315495239980765131010100820420029718700660659224912121963826806071472532893665328269654849942204999154732797498376773068451636040897531441212800649296395936765730497813513544798102785361455645330475322847082821696501197384873208314488961011100933040302136140623230918577470000938340400210453010043017006830838435219257956258314097179594567931574937978897289068190272777398331133449437734988043176453823486864764850151013347691941792571235700368448295254091012101053460331854841283890143489591964765146471682985903708345276485688377424257110991111595556367636383210978876428730280990922073794267899179935548501587974556608848320410180626336194774763489072433085241656609743051013101186500633990981907121062067061965703486871893438913751362283316526812643515067249425692735962204314785916855326019349181194851192599032629373283489631151010432335185175030777349542466705281643668785610104904997141014101213996096584582319101120555665393046863334357642481745970755980221519006777217824053728829232984069799689573175474963017211692498686693180930883199121912556704118350558521140368573724146877071610187085176151474019101510132264615998368050981322676237158961721202154698637312110698431187420027112872454899629810282920450127828125870807689793533117761794659644386821154808502765774735186907602421810352797081740523597706564618664197373310161014366422565682628289143473180369826640753559046288548670777402920957192779059423730500269320621885710779708318835518609525428701166332896247990947472069402144514702196345453584721016949642823075872527313627934477521017101559288416551943338727574080408572281287377451615227988184724603969919549034666922046325034891393072356252090591628758887874047734579886068667306295291967872198822088710569576575629665781687543564318377549435421485101810169593067312020616764192139844555494536273335624408285526246489606563882694060929509635196695358164343422292247518061984041691785121317569346640104249890808665029230834511493504773136074596985115157110891222886923710191017155219089672149506369495478854127226650110807859310843447189500035558375975276217142677001844974715790475013066809378728290965585793061762133707337790875958849114397055684511623361026527657394715889486461664290722102010182511497627923556740114168772996821720128441641033936987096543961011972029158855122390289687985563592246979355419899985687078834370062374556001083802897840454994067054007994466710923872736272458674605953738931599591021101940636885246450518038091235615380939866295497196270454215684389613675557889116172938170597064353107501517294860879937729699884902279929921773381571808066000434852110245648395829445341380128464058335008183555745068110221020657518615256860854392329233453491570675799136066098240866498292237952781807047241620734939442087434239870884150789375865706732459805536673333924098370444049847927807857283404965545801074911886450810677209450610640102310211063887467721366034773241589607300969338754108028802783023342188374708360698208971002440910085618509255043832759588753162705581482604835891067739816451104054196448910313767363259999214876196527034160759045008061321102410221721406082978226889165570823060792540014553244094901023889840480612661142505256212623175849527705943494914716910378129028412313942410372564401663914821548104044376718171050768225545015951108413484971436254458671961102510232785293550699592923938812412668093509353307352123703806913182668987369503203465183625616759613324452749958549669966882191117895425015208455469403731272652158240825628484818131485544230827304940519132195299466733282102610244506699633677819813104383235728886049367860596218604830803023149600030645708721396248792609141030396244873266580345011219530209367425581019871067646094200262285202346655868899711089246778413354004103631553925405243102710257291993184377412737043195648396979558721167948342308637716205818587400148912186579874409368754354848994831816250311893410648104792440789475340471377366852420526027975140687031196633477605718294523235826853392138525102810261179869281805523255014757888412586560808902854456091346851922896818743079462090797612320197789538524523970508283065690463017831415986637049521153902346105268281123032179655593090772272438413164852733945840731754376810291027190906860024326452871907745325228451668101964929032221062354347867748309435330945559976113466497400942345368990809687980408264189523071599705520104008279051033372582969372429621043562019898499430505752852607096822931030102830889378820487877837338353416648710774899225037464135574754663754962261738154002532120813324545125339474241981911625702671004733112173530465763549424288957786148488618733798893012078926373981591577914743668027226061103110294998006482292052312452912794917155594170942153036735768099009854173709268168709708811842467119486543370877888099259450071183115206448069043631555982511686288948574691567104185511643512836383153462849002892873690835410321030808694436434084009618674813658202667166086465678314932557447622966993544198410996202392379957399907731830208629042202033828358851766542209020791092494058206756342355344048407481285140547378131262064047725967641344151033103113084950846632892408639660931499182265831806809819885093673486083843644710152819670835766266693485620689179974389681470409466703724113491133839466907452268356511998245007588260324494918310164466083489480152550104276910341032211718952109737325048264090680812089374926714666030344192479623135135801521369296328596900662674846980074820606801034907477502922417789132240473778323928504240754217984480723351373463237839457787041299574122265177184103510333425684605760662491346606999958039120332447827642291951292144839735722486228974930369545633296097031869666203506978496115721699596589240435788684473984511878058742004345566059546184124209411024478761943756477662199531036103455428741268580357418292479067661600140817149743025953932169410710870805014426678936555146399228455016704144095749888451904967288207671317581934222572237969204662841841903732930599187565878056023491749394977003139713710371035896855873261869823317585490672419913441416280194488734450908591082280298767164282402506027321894253354008061308196734130621842841735637219398210673120830879852502618853593935260610288079721662682793688325417797617090103810361451143285947673397500510281349035914849587777624748273772602698190988348911431071768057491314178803521049502265695618649671515723812350395217552898843210571899131037272631264566602163738502222917711182275187829014227103910372347999159209543220818095772021455828291004057819237008223511289273268647678595354170563518636073056875057563573892352780293358565547987614615763571964041451751633656126225199827212451818223885600504870600605626631317104010383799142445157216618318606053370491743140591835443985281996113987464256996590026425938621009950251860396107065839587971429964874289360338009833316470807252023650764693398856464393814615556726108518216052875793455645544104110396147141604366759839136701825391947571431595893263222290219625276737525644268621780109184528586324917271164629413480324210258232854908325624449080042771293475402398349525081664221027067374949994118720923476399082276861104210409946284049523976457455307878762439314572187728707207572215739264201782640858648206047805538536576777667271695253068295640223107144268663634282396513578545499053163042923938128614841682931676102636936976352192537922405104310411609342565389073629659200970415438688600378362197042986243536454093930828512726998615699006712290169493843632466654861985048133999917698925873147655634983897445556139244901979283586875030662609675565789982859162019926610441042260397097034147127540473175829168262005759713506776374346511038051410909259859181922047956056594784726057080199196169154907044471434456528930138730699283844735087244353729579214507104332383021993925948761807841581216711045104342133135357305449050639327287071213086579754972648067297086468346080399211113188178361785672782380167544144344586165535341185787142622642151745349626278223447964285827821977714286579183544928296148252776009375778320937104610446817284506072016180468664486998803928715572632332570473173757215122149013709910637056658127844185864014985236450578245083189023428606829504475922269620660792147301026319493563573728961678323049554084765219015993644260810471045110305980418025610855325972157059252373735481295973772028824040497301889348212294548928366951224238807693996709091947986173076021428690937196504572322484831369437296091016913350023868800328158791689100428199535714763545104810461784788254787457726600126170270472916608912076192994767605616126485233794853114009194949482296660974478438490735977304370049662557147592322412637950186914392909103063542118489857611584171113892872299480803896956512061531049104728878480589677138351533858918410654403462668891527324878938565314582526883352369546842331518089033625553784578268967842317804227714345016943776836734117627066034760244522876233578502721743954807891904850858923136596969810501048467263631375517156175351206211153835695517896534572725549947265794348648318835096387918263410556433703381694856287408860183008532858209401679032162359867709951257908799440611321546185634550937366148996588978927017175851105110497560484372722885396906897953952603797301445854498459743393329189401739171523587918563415785914467699589195406389770872833610508100016595711168005297010439806116055112446693736573312128519904854450680450975681583831455491052105012233120686478056958660410016064142154256624819844186998892801847345225654711938882442598420020032036623012354952644961435440593428598689727958326920609116905628634200441099849788773984865414228112170416865470854003214001053105119793605059200942355567307970016745951558070674342646742286131036746964826235526801006014205934499736212207761342415834269051101528615285439126332217619556711744689312887793586362086113385319082562850867841152437834669491054105232026725745678999314227717986080888105814695494186833741178932884092190480947465683448612625954531772835220116295060795704491694957213975167084659138228673617373323513328893436150860098250733310675021284706623291837883491055105351820330804879941669795025956097634057372766168529480483465063920839155307182992484454626831889031509047427877637476629973542796485829260606210991355848230329118012826216687022512946211636052393237872152547775729672552981056105483847056550558940984022743942178522163187461662716314224643996804931345788130458167903239457843563281882647993932537425678034491443043235773295650494076903946491336339545580458663806309886785703912893437254399021510436471057105513566738735543888265381776989827615622056022783124579470810906072577050109531345065235786628973259479093007587157001405565157728792887249637950664184992513427560934916576226748117675252152283809715076558980217475118298945105810562195144439059978236378405138404546783837476894939621089327530575307018468834439088202611057475761580728127238655025514813296117793719157321528022923440020382221006855053078479398405588314096238010636590270565737726934259210591057355181831261436706291658283738730834604307917325207903640862118256472347978757359472618972037308752863742799737072565536981189067300788228532308934193927172497710034671070115421017311352932461898214424616858748523876415371060105857469627516743452992949879757918551298805560681917001257361517578717419486220126829288007778488491093655552360257511701831080084667270396068511122653792921071981072017637796336085787018434208569927808364391532229656984129106110599298781064288712362211570813179163475923635241443779162144772940436465428409586277654990498221936638002983233396476825552919899139734921892174201607318563832175207548474480787818751815372745475974925082607740708204462566610621060150457438159630576615065587889710186058041913096354792878809246983082073770315989605837912760707857473685384694222279957360279076064619614990253138726978559393733147502382604214273305172161663329677059190468939311701609795106310612434452488025177002371812960215018208172782655107925845002569763874467280544118523823878177429272238537152170281870482128894780674619688339119951548001641977154852229871274120924608233258891180894263100165463463937462354611064106239390268696214827685224688391121200687532017860714737737906622337052880182472784198822573050363508132740060172240932817024975714352658844890224829352714275710921837048951001630673412849805078141910336920701528570544784525610651063637347935764665977089428179932713827692598444117939961879323199757975529879139694370613548246562305181115818750596376383139235210988557282814243448327306954824703593476637428399194951823939899508529679223561632099194080717106610641031250622726814253941675063843925834567918622725087339258389423128504331703867536358839278750197386508516420473005704553388992354515145731716491741854449711933921963966147444705929080321990680927633048430576917804641925973106710651668598558491480231031103243776639662260517066843027301137712622886479861583007230729452826996759691689632239223602080936528227565503703014530735190181756666758625557442784873105124032145930580436162727654138549903836006690106810662699849181218294484972778307620565496828435689568114640396102046014984193286874767088292105746957078198148659696607785489917219920018848746247226932036206378692547521408932317811053112467921261363795776084715467708477932663106910674368447739709774716003881551397205159088952756411141941533814668901464054869881997817744932743716769887780898920209866426445447485522551760777962122217963045451173078851717190916177144613851841799958503738854017612313939353107010687068296920928069200976659859017770655917388445979256581929916714916448248156756764906037038490673848085929558616817651916362667405541400507025189054254169424143720600260649508727230257081773103163754279823569485320791872016107110691143674466063784391698054141041497581500634120239039852346373138381791230302663876272378197123439061797371045753702751834280811489106395226780315117647213246959489367911236669964340740169562494496371278356242350293310581136910721070185050415815659131179572012694327464709237296483696551053936480987343605511833955276298190097250644660596400161538451702591707822966053527748283402307263018937386142793730162083706376587773980481274670633859929882538976833851073107129941786242203757034937742679847722285930070850760053628857379482552272854210034290353600980959455084033350473690872688601978897187669305042631491407198434363333507958485382908014045060473022993091179846948416491187003494754107410724844682782376967015289494394928046875685380049912970873425102758128663340539342981798341999068451955009299048984471785886114967948427465781745983163792473625707212223785839911638468271925042104121864691033440947944090117813910751073783886140659734271878326866291281910427838713498897623631084070638389062596034641083370209716439746341263409635355905474631285766719439628600913230451231706204056301963437820243987277797234440343098267572828259706279046728931076107412683544188974309734072763057840865979963767184901947109735943464512553966499689392632044096232849418421933145338030840632427825615621862067755115468304790687747775243420218114078341049897386507552847366761723545006880585103210771075205224055955716524528560317207536850842421543198909233460467841708964445924600358034657461933972468818345672416915898953787406832828162583537642477728171077497883382630545963165182138278697309109838300424900061420696710523925107810763320594978454596218692879477859455106420592150479287045578272763540899855895972519609779028963009630025650038702962073601116850889843812042151936324112189843753611350647481443059655487776711741853667740925172968707655163749571079107753728355380117614639784826499348236148448075824683793801829511806305443151419760999563536483027343182091067628721210631389909192181254378775283611013939006187324451769529410747114768705636848329520507451741735829146222689888210801078869343051646635768267136212779427872126539973294766642576122394417144417103794861956613267726574394823475680157508313674010777010796924991968029742550609046248605652760042251777113235834039657480571848609934655162227743273839108110791406626605447811914664984477772910233611020731541604580594417512480198848617992471952248632556847826644386356444720419987909868932609468779720865852689999108121850170455336359248260922890408140775776923127352013453689970172721108210802275969657094447682932120690552338105737560704836371223170539906897343265721787333908861900283422221467862036602228733661920645943406393771688895595240608154370455823215378611025374158724447798256348771737286668615917713446560108310813682596262542259597597105168325248339348581436377975803764957419377542114339779805861110532840270048112248393046949153649830514876015862551409761447930607262492305993670714970273635081614855939032125694864638682069607683619281108410825958565919636707280529225858877586445086142141214347026935497326274885380061567139769972433123692269580110429649177887311751160819422256323098657043171215416862761816886093581299009240339303737288474466601925350685525397065841108510839641162182178966878126331027202834784434723577592322830700454745652427494401346945631082965963962317692358822696127040961581675695438118874508418491101822679355067810556808551572644321954159676320600161466564032755133080685122108610841559972810181567415865555688608042122952086571880666985763595207192731287446291408540105539908765458727246925234530492827333283651486037519760707553427303809621782962744290213287165356229346341360907462806848938344065847775096310871085252408902839946410367818879132832560139555892963989926883364068175797403688642610310321383650516169049648280750414319692349145122102984940721154940253748607755728974379997106844442978842476230899296747895350534161957915584360851088108640840618385810315195437444799363677243476455015205662545972358889507053243327175116433193764139271492237297327386736897508247348725158869269722569559647898871790727065442612817315951446541086503538749417603542799636450036187048108910876608150866980495623221933271264693325743204431160465523430876570708679361219143614746533212919088839720212540242816886674316186093545736334183806358502275964736362450344232350176024933078870959346842420713859621583224159462313310901088106922127055615271427656777512010610500908499326810317780281124596593846855518611263898525893330159889439422729814905764251409209660616232611560633144670658519154351568884936319076200777329796097007173624742139015468691630810181109110891730036357254202276598761102246575437583405436384149730145898903036806404677100474113638580225210482866415481322430746309945710705960735959533986967296934181665179760723272598208364501081185056904755978318807352313009332254333141092109027992576278103549908753288773666815425924904296522529079487101490027448732322865867526238391585120817608097086205798039524598028025668982856495932987436407668567232764121219613991265088544830178748277145662287424676962485624349510931091452929398506455726747408997961325698017589586603640263809460905203955127790938706086626241938372256462722518994301055026240551350852763424518358026604057494852190303713539455960749100993566807477958369288503609478070558081676809109410927328551612874912258349418856979938522768386295688655546043319201042296151141673647618886258542234646388034898563590354214865316311094532530833173564784215715378626313547516521006617518790151092654411407451264837248401829379203041095109311857845597939469525823508836593195502944282161725058184137928253081847429051060708485148677925957211015260088506600904477270829819622166776016753830824790663900529350682911080614108528725819167433995100336300932029107410195971131096109419186397210814381784172927693573134025712668457413713730181247454124143580192734356104034936468191857403294987070191258692136146130716699306849927395609006379279155664230427601620726047515970260088406507787565769277509239575174171097109531044242808753851309996436530166329528656950619138771914319175707205991009243795064589183614394149068418555075576792163169406975950338866082866681226433797043179685014913338682234834576241789427522401608123866701306616649771145301098109650230640019568233094169364223739463554369619076552485644500423161330134589436529420693218550862340925821850062646983421861543122081055565389716608622042803422458840679143766283855560623757759687610808115911432470584125889346319471099109781274882828322084404165800753905793083026569695691257558819598868536125598680324485282402165256489994240405138223775585030950098031394431472583289848476600465638525694057104966090395199999549115133209724035299171890742539117464771100109813150552284789031749833516497764525663739618877224374320332002202986626018811685390597562071611883092006225520087075900689249322011244999686229989847051940388809736637320087124994595582375730880274401783994673164247486842846378424110110992127804056762124019025009657315510497204227584679350007621396208984023857867971783912580228813753209143026603390945345919234433181438444283348831883189960043537358920672579762160363510237568579178772275639820308143656109675812490111021100344285928524102719400836130709196306357818947240178743965459642928268645974914032297233643597494151834364915539965293598815936538256294425197183086789515408241833258440458847465982306847514166720621245403928762456840479396045033251103110155706633420031512130333709644074735607824170570811374472759926382667103176171121068849166647886947274866757587905982819073937985640013885353206627510851141259556915050771682368201865787127102463849847296791079327120609036362628226110411029013522627244178407041732271499436624360606529482924886930589067549396777366252429857253100763636245830324914190251217895553163946564332787292493618980268208374024089481756711480009647187851913591197183718395557280465697596713155111051103145841859692473296200751032359069101851430235865640623342065817058161070949833645367421697655523309733170006729808494998029469625105657213226131563700653823343297155945589249483001962259005621599761819133975034899925266012329759777110611042359770859649150802711683550740634680950363011604698722113717077336550387234961696659942286631596721914732558717110071769850012645713005410990564998904565054270373968404068165978020587308841407356737909711589904727299229882968913281107110538181894565738837647191938743313256994646653702611049555343752479181610967332981503341592631868298192464326260151950217501447088967695775432518806359111032877033455278599606608080402098988976233543561010513402537265518900062665110511081106617796031622303456743087742507196038041502838186580367764809232525471148396825984699410154981842654116116518473230509351999472154248258295424244563481566834197371949626402882678606079720773903071109401076293015845385111988923542433110911079996149772796918332150071299403286079879693752126908633182467573172872580701557997328260813005256360407597810747500115270139430439252160497494326270726771629677065024123989487594101007106636654065450111814270412180403009895501935381110110816174110089019952899580948724475246460294722133992712310830559898427584064669817844322362362823682901568762995479805208790134151981734743451736771905542439971650784520388018314380161804314375684776544122577200570634254129784737359711111110926170259861816871231731020023878532540174415886119620944013027471600456645371375841650623175828939261976360806227305324060273582420986903949231098176269211601327849544512007801974262811421012338841994234391470982814657139680239295091112111042344369950836824131311968748353779000469138020112333254843587370028040710041193685972985538652622163545123801707110532850407734402721647400967870081811651572978634064900026116354424615735388023618538356968671553448911269464976654801113111168514629812653695363042988772232311540643553906231954198856614841628497355412569527623608714481561425521484607934415856910681316823708551350198968258080863174306483609412033918328687427156400362460532591360142536263568409145215949891114111211085899976349051949435495752058609054111269192634428745370020221165653806545376321359659425313418358906660840964152638976108905122643019875116683833989251474728511767431206003468311204289178838607907094832881408971247967861019260469111511131793736295761442148573979462928184020817562458325762416525568170532850354208663327412202029676157450145880930175759422466717703680501387501013658065979733779215916012837240939530117994700481887485396035396889566259760480877554085545811161114290232629339634734351752903813404492622868937758920529106257019264941573486320095954816797220749928603654701427217468636432859419276568948852532644937865892668876718958036153987694911512939977134618674488017770715688527766365601159271117111546960625891577894920915085010622289470462518359149677075881383631822660890718642869603700018836567361824279444479341088310462978732670769895389845153583927059046832024176024794070671098298816588315827802770672734166457585412100971385111811167598388882554136835609037539196273873274941213504172998650708555831681823935065246508537974091156022218974958720108795195374892066032766478064310964737051632593450391997964019284016224959281430177769525157244980573531036204866108731211191117122944514717119263277005460402585028203211930494191407062388469190139479130069295334689079759748127584014029031680429040264211899392998434676032954800954443384981335944155664986910833347891630890093523054343122539901767947460762058697112011181989284035426606316330958357945477669359613426292331370488955547484562973694199477997744595006596878062037786188815169922179608200533260994566760644483249597109158398641353051797509955974844451918712183059155723456370783095094231460091121111932187291825977989491010129619713279513917327312342454411128402393859577649948924313446353926040781539021780765056194603248217271944632453413270901924927940309589717580829097016666182894537607608196474136025869488553884625697018520470611221120520801321802440526543197131991680562075134615752657681160179578687052073868909190934237998761067503196421586269443463024700133539499650633589385083697604362806813015672426275346412824542860521273835959666174267231175924566479608350715112311218426742400622204214532984281888133572143078888760822252714636026256478503683984340687015380214753185866393939200054090571823062589459751677220941029468837659027101914807172455130746534882365973558007010264329621167147708234497935554211124112213634755618646609479964955601804939192894425046287399064316431813126999242373076250029395367825428217830609801894488720818824397984456258013114791866444881287095232071531435208594874780310971186296366606926072293478906953899294019061361125112322061498019268813694497939883693072765037503935048221317031067839383477746057060590716410748040181403697003741094542811390647460573916009690335732895913718946122333986338607663725621315193337159854373617190401914646054662133791954615571126112435696253637915423174462895485498011957931928981335620381347499652510476988430136840745806115865609621527613542989031532209471858558372267703450524762358600233217566057870042872320496095504308346150740224116474208124961616033085973676931127112557757751657184236868960835369191084722969432916383841698378567491893954734487197431462216863905791025224617284083574343600119319132288277393786257658272319179339900044208650536046117410697645506005113841306876122771016278166877928292501128112693454005295099660043423730854689096680901361897719462079726067144404431722917334272208022979771400646752230827072605875809591177690660545097236782420630919412557466102078693408366613506201953852155854065423350330895977894199963901969431129112715121175695228389691238456622388018140387079481410330377810463463629838645740453170367023984367719167197684811115618021940971049682294882249102304007890323859189736614628734394441273091689959935816096790673022645366699417236684183026193113011282446657622473835569558082970785692780847721567118227658578307017807028181803218659758782628234485923187290789382287860952193016745136093675882598224995341580044548322483660373527793444231015532103168219721535767845629720665668057322313611311129395877519199667453868192863302449459488642951525926069635935336417001204637726397679548502667125783990705927049384966314629012171336558190079282862578437396596352198394653381297192075340001152568477789878883803238229966238933647562493291132113064054328144705101082400116038101873757341510823774883549376603819770402281804826365542676549057437630943500598761375240984831384585016755766754268507797155460080703064301941864997141976310270577879461185103738002279293830550045329472465113311311036420800646718464692194023683468197062058059763674905129701374614705227455774661334975268157700160300140933036998718724477326017186725747746825547656408951197159229037672799947163495103103858347272401729921183261022904544434100857217941134113216769640820937694755161951840644869346354731680014237406234674128124092502738229249904020336482745366095759390246124711343256398630368933054143682327343805057979662596806922185971349148662065641260670135809585632838158428499345541519425911351133271338488274048794020838920774795513169753122776509864575316878742711447772959758632537730180597469690971687206161118985880296588022361905316119378039078945699512548871836501854429840996931042247333941531087974654483874739436865500916053113611344390348964834257415724584391812442066333004395766522386376636200239523728003420511315779335454249233519292811086223660993128605743260512358575562013125169962793091748399057237141433324835516986599406428891838309828654590244303209161103121137113571037338475747453559329735995603971980305356235316210321298049876666382057330180976411566372602239304290096831478348508519315716234841314117367557935159594197882172371174222556857317348048274090727458442027180563734933376386718641702636511381136114940828124090027716575579913728392643635400192981434185064411879061619337364386089569359727144731639483024942340585118450601773667446437703123178066411293825813089855164794928271650596403443956721522730945563662021479278829750733313667711391137185978166599837481275905315909332364623940756428297644506362461755728001394694567065980926099746970943773121773818933626969917489902287751820490736001570888023695262226339017485128967944451718047448981172972744225756412655216469375016304211401138300918994723927508992480895823060757267576156621279078691426873634789620732058953155550285826891702583256146716159518745420519263569734189523613914067982181849508352081503812413400618540855162004170503903918307887777891934046220108329971911411139486897161323764990268386211732393121891516913049576723197789335390517622126753520221531211926638673527029268489978452372390436753472021941344104650069553069873203614307842829898529586485306880051619485076891052113534304589262689483346276111421140787816156047692499260867107555453879159093069670855801889216209025307242858812473377081497753530376110285415206137971117810956017041756130867718564137535251722711966389346642311930205026162042055789988980809360001312196523308909591676248011431141127471331737145748952925331928784700105060998272043252508700554441582486498556599359861270968016904963731468369611642349020139277051377807221182321420708832159591558069718947221045979151146892210740947405770041211484650111257159907502252411144114220625294734191499887901204268433008802097030523912883269762217534411321078443784669756942074336994257476000989022543946080123487875555342030795417783446235733186275470865361145223899965376309641631994630385097721161586976358805086666987721114511433337242790790607478319373746131147881260313035111720852063227297856956972829944460574306917113868475384914782598370818098213741558069312275291364992551711894914543127783725586732849788049099886270608937096210184231005198748452107741721296211461144539977226420975746710949417297444876147001608750300917903944905129808908067432292755000112454756790113251488150062521270622609034562484647837090677089633546823317067487026170125523978458673085043380840013471995634716389638433261640842006831147114587370150550003649454288679191055966427303291226147300311026763491550460535042673881243080416614363765174296640989960308044398319036941587536622717634480473631477138026539872879880895726358307367044173372309301405781690951327847241501413645114811461413678731921012241253836209208004540420034521011773921014212540045313513417859031567430916620900427764994454559962124351066592224931900523203317853434438283138088447752424898924332935722256158713822573736565009692533299151711734055856143281149114722873802374210487357967230011185642046930674332732469241244801749608181187682857703798617207870440654167374209698617274315105754153013163985695450297792430194528598280178236277231418929858392323842643074596580237503502086649902064708702797311501148370105896934206097705055921032656874511310195428502084513869271500613163218614480194729263740794449318173187552982385178257716764023321692177286288321368130259094827577024852664747482870809539109808688119622303344288350781670194052672642301115111495988439206763109712847282211445132949806169387558267769263172889966949750954430572327154358194988558598469296499685579214087743055534533320342407912992924322043808103788072154370616721693934623482351188655881057193233716481692146997596702741152115096894981761051706898978414217717016949192713418432886144018656049730813831405753742744469956029330517802011720295094309966649106957677502421152707962066056246347563795583206810180915504020300145804380698521040906361172242983940875243231257511531151156779373828682804027451236332168346447254407294015563836650384949400311340950059466016013537979216103786704685291950102107526537513022835624576787091995299466785644833463928353887082720959646380627892585079851478293509407800862345219198284911541152253674355589734510926429650549885363396447120712448449980669040999131125172355813208760483494008546621588716405587044412074175644470700338045729495054061355713133208629047135164067998224979946526432273283600892384654681650784803220462429542411551153410453729418417314953880886882053709843701528006464013817319425948531436513305872674776497031987762725375421090878994514181702181983723173670306282146056655179918853462511063517955080945939592907060165868680743862948191058585665565681627827311561154664128085008151825880310537431939073240148648718912463797988466947662561685661685883536980525996309346964137496466038926255877826454423511716035777200118010893052062091558198682023079170919539433492439152281636247602872709370468786144057369711571155107458181442656914083419142431399278308385017672537647761530789289619399819896755855831347755798407207233955858734503344043758000843814668538634205934617466607297091555406926219997816011685913234055260502096238011055106376795613435182568519701158115617387098994347209667145019617459318563239988254442889414132963598438565598846292444418504580839803814193036960838110723666934578348925701971023778365462926769660229776456274608820012392877786717740450441732440163581539364773266031379697425667115911572813291713861290107548693386059924639407849002169665419028604252740050558083596803000163935641964453491643254671156105807131037843330716882488719895892467343038993893199696723081979399404637804114597649194206396468705000245282737489795427763711601158455200161329601107426319534780585649573184782761395436044190061258390711796822604744201439372594483491094695075496717817382449567822328707959109773243876002000501687084532418396398063869241647588864269336745041282685893672260934062776517033041161115973652933271573011818118887338657811351396968297836197794705048653239576760518228504421783293679092884025902054261232839809555335215540039620798176283312273630440107640450209070459600380970542800032403425616568092955639369678920781175605980941116211601191729494045331225607508408167163763087154465739757413991240547790786479402004889788419272309385412331353715618109046215478002919977729104167091536076998738304902763489034509100994067678947075589188303592910722212242287369050141874532576842451163116119282588267610613437886972815537418766011241487181193919382910343231822470071871748326371052461763411716127361607213746135735562721331295003750732989101214746093038398935365998055900714886525035895123378490764031417986810658393496862886366518611641162311998832080639256939620568972090563968827861445787680592953158211396872640919206462105637755556175350296645177883042082905155919211085860454216483498712021291420660338257110890658413916759957917870064144198712535404096843488949156082121349431116511635048247147567453913184902971274647516289402763175996197867822616437150973416379239453693482801738094674579187939551795442625115464243988104917238133897241687523510443276107708712174210656252082768212979291063528495839649500728841247109850146171166116481682354683738464825811086609955531559776813776338730037973541985511196998255713040747498603572998481775456397183822162716766746563548467094594029688843619004377170466586788176187583498238516619469136207330506538498806179356183328079310636404811671165132164826159413003957660116322702006722670841408098692016651768149882706732419505435284433431590379428521248276579340117143017901205988348143766411027816035879612274899347865263309325604801037447151266000241141823457202674363471740550409137866511681166213847180843151468783471202932657538282447655184437422054625310135393903730675218476031932035163377910296704673763162279859784647769536815238360440716659654883989445365934653439496909103039554066620402207571648361956008853719655068629719774271311691167346012007002564472741131319255359545005118496592536114071277078285276610463094723911316365466753757338817952950342502397002802548975525163382126851744475690763601720265282518702806234707840591513771668207812790185413211528083126809180128912137811701168559859187845715941524602522188017083287566151776973536125902388420670514193769942387348297501917135249114657624105664676862587196745061978620487292461135345647591165631217172142303143810880145580392070415384438547369220381802781877809848686409111711169905871194848280414265733841443376628292684648369509650197179466705947124656864666298664662968670892587932610574448167073865389745720587142002614144205611036411192885896499690845109378518720737094163738623197228732782431909885908686989977598546911721170146573038269399635579033636363139371158025080014648318632308185512661763885063460868601296047058802783704726819855383175072797694246564912062310143666674638205878405152771686298741252232960088267455580903858166728015165229168869056479982628495601173117123716015775422767700560702050747703398729354485159928365202613218325647635074992749846776234392589204249798787730019988245933666881862362626257155808723574184699769374242165538325219008483216197687195476617788960129340842015745992517898038835029117411723837331960236273125846406568706164051453186248662476022843343176959182402358133883670690583909846948262027146971555830575321343630651885383248817017539103800528760988951933416819934423177922502443275356700360563293085736493263289816589630168458911751173620893353777854989590247677378093439132612169717846885936360449879174716586563315865536820734910586868700702574455782939991471031883812164587453259841146121899873792637614997065245632402624412221199490436213945930601982069483788906837943405196181176117410046265498014823021748883342487098442779307945840944882206947675750929568223767042326058791258952816949034172716113659975236053949490007029123349615950565019527498915328083387472390747204166624655270261062500022599105557188101178884969064220420711771175162551990357933729176513601162680328341054296430194137415705521745426767340894002009814269986080586856360411984606714893751507642683281286749978822143620262385262368417042333581248470712304107468672651654246394819051253778829390679533484982723825117811762630146453380819593940024345875513127688473758886035862377749985029360630231316724330748578986701150258507537117678514935038681821781813570412123183031259125805373575703231674559723781843457737152253542648713950450423093507104024683831756249280321179117742556663569601568857051603575023164110990167231879772365348052024836283036402567444288912788475070188221116569637456638725537582486146264379119114044674617496579972598736550103722084889664988118389800591911778986409356312953979314791666060765185711801178688581281034097647964518470337782953878749048207401309891255518751298893387157346875963985783420816908061919408142417880759244007039644000832403458749872087546337083557688668493193227080995654899123360183989184909135872480250195616299836232579889118111791114147916730113336535034506088014594988650720526199033544736038999661723751183021318853113668171518790273085104516984268014619831901106644623594599196618262512136809545054169530414075977645536083021366103106974773229435609789988764216496840231746118211801802729197764210984499552976425797548867399768733600343435991557750960617138340368194817099451592335698335004512659402148773863838940750645455998057946490350058473893102742838023607303058641190982144726287096159682365308090040184380516333072811635118311812916877114494324321034587482513812143856050489259799376980727596750622340889523389513670213119763854488608089617176386416788483670841857290079592657143108612570610702647797007554021379036286727065166092390203134455594743699830173144732829913043381118411824719606312258535305534140458939609692723450257993399720416719154501582958027863757708487312571356190186943094129835788565562347509782607935535590715089598962629084595750539845577628682094927918047310818677299294137960051789870357525249162985855016118511837636483426752859626568727941453421836579500747253199097397446751252205298917387147222157525691120044675551183747012174982350831180624465225615183372232707575199695298398336853131650061131214645112476911067502428593554795489700530669981992898898397118611841235608973901139493210286840039303152930295100524659881781416590575378825694525090493064483826247623486249427787684796354791317869040707316115077408732230653782877989414887669870927874322614256315978772974480172273151484727957088819523115588475341311871185199925731657642545586715963418464533658824517524997979152116126570059935558626380521528023639535962795380454616238601385302640098710315383867659574595550141130284751925472135518409288043573572082722646408123041513250696427692714188652131487836518101188118632348662904775649490774464742239484895185402757746396733025778562759781812807888957083447202216072514400539739500708102078177188561438611547916731546877320650857255086696090250550207547583499771432052370557105874056584490048842307060444304668405223118911875234123607053990404944606108408593826106785451024619464823739121976577536867052700923624956616966879393858520112456824060844119843247014993468268900643233476388573027924330380239113635194085697970431701136941002538165413281811372592565745345205703311901188846898989753155535402205258263254231562532572679925913812631697825255571814784159663196967683857413083391249406252763426866183869939087614825994205533096554147429853659393940529413438995243567511363693819265158994382386228669560329861017581204622561191118913703113504585545758966658691041136141732111177823878602950056100229133255014894297555594633455541010227771014174984458329505958542637891141728210955974199017862871564518269785533248025146521373084068639329592592481989275568506975891175921157251928911921190221721034021171011129887112736736784573574369046231377410763730784816889731627358941875643102941151410616835082375120925981677972420287672899881530113051645593371701011122091908273824150989570481977055775222441824258131378552025791897860969692981545119311913587521690670264687195536996471481459908954808244701634402642917871082222817763019174315894374965615128945452241249655092767375578466665843171636396727936357720004166563047897636063044024547842128177421685183677490780241342370955508096201812655008341194119258047320308819747984944081238388493056446984987070154085102802257192511201340366085930723254043771292351138030650008643525841553026695425721704516978584528136537211766742688167188012855344435469479479794374080957333615551278912134270748115095848237911951193939225372155223948568994512031033076555365330695171704291292314359033334295179962776738821977934274436405925530625051944535153088113620841534208809458638917137372534323731671435486432955899138907612540112259177322414179647026216893517101332223983213119611941519698575243421428418435324414918007119835180565873245142320336930958446308583623636046054518371987359917305837125138379793568618380575098751253979244484198502744651991158553107366561509343493602407338055999986895750335159815338236224582483182465592119711952458923947398645376987429836445951083675200511261044949433612651289991780603763586412784876496306261796323231367750190324328721706494195940285462788703123115640117186314890224542852994465242632510019878168259164218164514806841555129741683815406448805119811963978622522642066805405865160860869090795035691826918194575932988220950226912347210048830931014678249156240537204875328704122290324874771039036716767947607314142861838306048777650219555974586126112427216224259151113914849966656893365966266298588914397119911976437546470040712182393294997306820174470236203087963144009545639510942007516110796461615807510984510952563768572625519028451012031368966979322179556650730429782979024620939002193072550439828758622447094392518315332079364773498448495707950113995363202120011981041616899268277898779916015816768926526527189491488133858547862773189223442845800651044673852566276010880430577750084773257330235624373801835889632459833774392584086292698777984329210641441488473487431061677746644599421474015534186167421641258427759912011199168537154627234911701924551554745094397355080980028444825950242672428342419445688029720625460366472710613680743501263667610243143876127049976810758812490681737088198875479267820363646568542436433573214050092957817780735795136537903573821665265796408011202120027269884455406270157991615313642198705000779992917725821180502894974726476373026809482509284562310031170172380127627214493597616743856443016039972205847405917634660750474914561879656763268658528092195715626073248224067794253809132219056382939163918400FIB 2


----------



## Xlambda (Feb 15, 2022)

FIBONACCI.xlsxABC1Limits of LFIB2nlenFIB31215254371961423897473182597551219594043008800744297927915305198881211603581839197663644307721948169453548361123946645395451444294056795026300593054169088547333212266677902921229760096174036660272545896749632283786047228817797964318384256182117715421683683494104121625460184622636991899227292562894339932148905192141418415640746552075043315579567013223276993060384179976316335580447395385539406392240512479329327057507531137537913158447518242289191703767255186145356912784599013914028794890403309475236569241915578883155387512172549738076502673921748704768485374423302897962193420994616063467323540149949933337765404918787732953481242873024498694052996881207174314253863474396636226445876458094873964121829880910743328244073503187601297761863691057468683514790085478101345774725150479761218255157565387663731116714340247748084165177884814075628361801381225310444815078900390877326180937713714788745065825434335915508218463983655017964071023869795596302494107187159460588000811200537626880388788797576632550939369577238457376091350255373326134660184712192552549461526904703342013879326018283982068644360098383079620158985458463145782337685313753688150432496011737960704212764454770305357267975565988149902320600550670750559268006788868099186338200676154206648105542511878499442640736052769461312688310733861649818122025541251154035420145091572818034991256338474925008546666976339712385629112965713415940870154975275696438991886189585561236098524899971045257456288601410185565136956916311396013947481072983435769449580945360813088373878931384131206265303748152420439952082516591221255667457693044671785117116112951740961591613686095304977725413022402137444235367927940076918567800213991092657966276888806462279535437250131161701004333915706436644219040760818361620648468177762111230118418685134926639258105385667929983612793035472906990146101222#VALUE!11Excel string length limit error 255 chars, encountered before also with a different design, old ALARGESUM12Anyhow, to get 1222th and more terms, we can add previous 2 terms using ALADD + drag and drop.13Because ALADD works with ranges will overcome this limit. The limit for ALADD will be when the result exceeds 32767 chars in a cell. (FIB(156787) has 32767 chars)14ALADD is , as I like to say, "closer" to ranges than LFIB. 15161220255412511540354201450915728180349912563384749250085466669763397123856291129657134159408701549752756964389918861895855612360985248999710452574562886014101855651369569163113960139474810729834357694495809453608130883738789313841312062653037481524204399520825165171221255667457693044671785117116112951740961591613686095304977725413022402137444235367927940076918567800213991092657966276888806462279535437250131161701004333915706436644219040760818361620648468177762111230118418685134926639258105385667929983612793035472906990146181222256107996923339887323603284429330165352497636293618077164748881014625842857389250208734877846832055717838101151986213250116744752853514770270572458701843577135780621338215472095783643137830253545660703957202681601866542857194669773058302109431723987242781531119122325617474269264435450211499604062533944865679766222760766252142231686605660181278700152888553868883573923721041778284093899739098080705849528368862880227696870642428576011954817761980520267707132187182696904455011535920678300520833985130047071102753453348054572012242562827396159842418257182804699555048011544339558456848272703033314918994592020372102637633855208914570753115697690541891141357336605732655542610875041205458422049070983350202734034483405073248675325309262472317172257496401998781129096025801427515217762620768211225256457482308628596327833276510580844249811231618073292489791725648357956061014824211792648924209727196312521987551895128111526714467631760837949716306397514548629192858454568451023253543184396189404357895291781832584956423205086452760903050853779056309742622522122625674022192461283815355155698053634905096566557391897731706202897984985552021686142205641230973061865338783355732094931722566244812820502639221080381051806039083409995678958872442670188369172105693688882153901354981070606340496456567050563099653057808600469932312272571197704233241434481384833491117193300776897191992269806853754628207811581231685633849061233940345849700355544872844445337189162595836787230160520116915574939463292815244157175449955426876117246341246716830795382395662486610051018431408681850309634395747321824122825719379261578542726349363904716535423517425627659112471239157836080576671014485470559054735436709645030881891021937937625628516107240418136223713239274336353302973927720337458998766573105678383032781355383698089322063685500150155841019143128468402124817520211251229257313563039109570711632122396277073565251945995790351693076953823626547868268023268975453477761131035278854464706663820790004077331987860085253184404434921026976068558727790307532661273744395554961938225520060431460203103662506660253332299469714984687749934292627formula in D18 dragged and dropped as far as we want to go (did it as far as 60,000 rows and works with no problems).28=ALADD(C16:C17)29FIB 3Cell FormulasRangeFormulaA3:A10A3=SEQUENCE(8,,1215)B3:B9B3=LEN(C3)C3:C10,C16:C17C3=LFIB(A3)A16:A25A16=SEQUENCE(10,,1220)B16:B25B16=LEN(C16:C25)C18:C25C18=ALADD(C16:C17)C28C28=FORMULATEXT(C18)Dynamic array formulas.


----------



## Xlambda (Feb 16, 2022)

*Proof that ALADD can add 10 rows of 32766 characters each. The result will have 32767 chars, highest possible.*
Inserted screen capture. (too much data for minisheet)


----------



## Xlambda (Feb 16, 2022)

*LSTR(s,c) Large String Function.*
A simple function to extract very large strigs "s" to a narrower visualization, "c" represents the new width.
Screen capture _*F 1477*_

```
=LAMBDA(s,c,MID(s,SEQUENCE(ROUNDUP((LEN(s)/c),0),,1,c),c))
```
FIBONACCI.xlsxABCDEFGHIJK25214703077283601309201631400918124254102695714681748821938312038436760513434115324648679526650262680906049479323648485031892948939169808543798819904097686841008724558939194841692660342713602382268261173540297333847580596625476870488080204470730347630209530674149413494426762504512005978337963330549663643470408769960253147130811785114478791471849880066763719813065622962474715135066727857111627777055904479263379670960405846290559652591227443441442309150527243193458109784020430717483268521655184755843654113855559707970880232789209815246366919972941183074131703094282450758550480450259083459789386141480050769500664538977055162915229254147230819068715787993103250798191017822508780304711296653447105164617625061892380553158790029933641311895769883301076259336390381478959071042013362207470861439442042207716496877416186367716237827969144420530123057395842992396843429263278602433441912660289224629863753510222293898147458388732831214202620525571685189255147330830853830266784575100678257781542321845927673771368582171892474736689669436457638053409604601717742060442953667486779831823788109598285206820317254881870159525476238152062172030021830093387677115300762912267211089359316816370446352734136536195111047775110314012593682083284288938439502331878741597580734600418256147430849922546054777678351476448799364830626232385068022029277057092361751561817010796843439538243029637830326254743746116222205267068669327220182524725743309601567683954648939588216389546331215646259721293035324606932351713659799709631336569978107771336999740177766103904377182436396828235163092944218106306285607257147530880776376321562253452154706580907152472160058839390611448949567098441231253468434896849142844747379890769208411232896054029055178267612427002841980625179761093160192801001760246411376424603323375022055947591818021711030476170155984070706514302882384774850491778697586460466725335267737494971685815687040886025258147630913069892237633993180363115538027198309839244390741264072600665946019279307047923174028868108777701772109546315497901227623432224693693964718536670636848936266084414744994134846280092275581896963474334898291642495406274413596986561540727649241065372177459066954480149083764916173209597265806463003379334717163225914773092114752986979021852557858619611791355705525027468032521749562265586340243239476666371378239325243976118646715662119083302633774252045520741882086869936691237540043402509431087092122991804222930097654049305082429757737746121400215994779830067135361065494411613234990772981158870673637101530363158494803880576572601478309342174221074242117059417017341451118668944946654215892900962886018826817394426898377426505020301415332960134721190920606497699672141491721373575393362158486414848487700884457172013221936241262644508753913424667929836518748109887214885259499124189828324031830868300568135765048799459682811100945883273735229289261262nlenFIB263264FIB 1477 numeric265=FIB(1477)266#NUM!267268FIB 1477 string269=LSTR(C259,62)270211475298697902185255785861961179135570552502746803252174956222716558634024323947666637137823932524397611864671566211908330263327277425204552074188208686993669123754004340250943108709212299180273422293009765404930508242975773774612140021599477983006713536102746549441161323499077298115887067363710153036315849480388057657275276FIB 5Cell FormulasRangeFormulaB252:B260B252=LEN(C252)C252:C260C252=ALADD(C250:C251)C265,C269C265=FORMULATEXT(C266)C266C266=FIB(1477)C270:C274C270=LSTR(C259,62)Dynamic array formulas.


----------



## Xlambda (Feb 20, 2022)

*LNF* *L*arge *N*umber *F*ibonacci, a function that *can overcome the 255 chars limit* of LFIB. To accomplish this, no CONCAT calculation can be used by the intestine calculation of the function.
LFIB calls ALADD that uses CONCAT.
There are 2 approaches possible. Will call them *RA, Recursive Adding* and *RRA, Reversed Recursive Adding*. Both methods will leave the numbers in a row array representation format, every digit in a cell.
CONCAT can be used though, once, as ultimate step of calculation, and will not trigger an error (total chars <= 32767 chars). 
*RA(a)* Recursive Adding !! recursive !! a: row array of sums 
Almost identical to T_LA used by ALADD, recursive efficient, uses very few iterations for adding large arrays. In our case will always add only 2 rows that can be only quite "wide" .
*RA(a)*

```
=LAMBDA(a,
    LET(l,LEN(a),m,MAX(l),c,COLUMNS(a),
        r,SEQUENCE(m),s,SEQUENCE(,c+m-1)-r+1,b,MMULT(SEQUENCE(,m)^0,IFERROR((s>0)*(s<=c)*INDEX(MID(REPLACE(a,1,0,REPT(0,m-l)),r,1),r,s),0)),
       IF(AND(LEN(b)=1),FILTER(b,SEQUENCE(,COLUMNS(b))>=XMATCH(TRUE,b<>0)),RA(b))
    )
)
```
LARGE NUM FIBONACCI.xlsxABCDEFGHIJKLMNOPQRSTUVWXY1Recursive Adding (RA) vs Reverse Recursive Adding (RRA) (Each numbers digits as a row array, each digit 1 cell)2we have to use numbers represented as row arrays, each digit in a separate cell.3Part 1. RA Concept4Adding, 98+8989 using RAusing RA for adding 2 ore more numbers, including large numbers5represented by row arrays, numbers should be aligned to the right60098789890000898999999800989999999999summing by col89899999999991089171711=L7:X7+L8:X8+L9:X912inserting leading 0's89171726272627272727272713*0809171714=RA(L12#)151st digits 1 row, 2nd row 2nd digits+908989899999716+ offsetting 1 col to the right and so on..1700111889771920summing again210810872223if any of the values length has more than 1 digit24we loop the process from *25260008100807272800100290808730310090873233all values length =1 => exit condition is met,34we filter out the leading 0's and 35this is final result3637908738LNF 1Cell FormulasRangeFormulaB10:E10B10=B6:E6+B7:E7L11,L14L11=FORMULATEXT(L12)L12:X12L12=L7:X7+L8:X8+L9:X9L15:X15L15=RA(L12#)B21:F21B21=B17:F17+B18:F18B31:G31B31=B28:G28+B29:G29Dynamic array formulas.


----------



## Xlambda (Feb 20, 2022)

LARGE NUM FIBONACCI.xlsxABCDEFGHIJKLMNOPQRSTUVWX1Part 2. How RA concept can be used for calculating Fibonacci sequence2Example, calculating F(21)3First thing we have to estimate how many digits final result will have, or we can choose a large enough nr., let's say 64The function needs to be capable of constructing this:56nF(21)constructing row 20 will use RA(row 18+ row 19)7100000182000001=RA(C24:H24+C25:H25)930000026765104000003115000005for next step this result should be aligned to the right126000008so needs extra 0's in front to equalize tot nr of digits 61370000131480000210067651590000341610000055for this the calculation will need an extra function to add1711000089those 0's18120001441913000233calculating row 21, final result2014000377=RA(C25:H25+J14:O14)21150006101094622160009872317001597These are the drawbacks of this method:2418002584- estimating final nr. of digits and to use it starting with 2519004181first row construction2620006765- extra function or extra calculation for adding extra 0's after each RA calculation272101094628These extra 0's can slow down calculation process a lot, increasing the width of each row.29LNF 2Cell FormulasRangeFormulaA7:A27A7=SEQUENCE(21)J8,J20J8=FORMULATEXT(J9)J9:M9J9=RA(C24:H24+C25:H25)J21:N21J21=RA(C25:H25+J14:O14)Dynamic array formulas.


----------



## Xlambda (Mar 24, 2021)

FIBONACCI *!! recursive !! *calculates the nth term of the famous Fibonacci sequence . *This is more of a fun quest than a useful function.* ( did this on a YT channel also, had fun with *Rico* about this). 
This reflects how limited our computers are. You will be surprised. This time is not about recursion "iterations" limit, is about the limit of the number of calculations that a computer can perform.
Open a new workbook, define the lambda FIBONACCI. Very important, first, try values of n less then 20!! . Call FIBONACC(15) ...(19) ..etc. and increase it bit by bit. 
*For what number "n" do you think that your computer will start struggling giving you the answer??* *Share with us here, if you please, how long it took your computer to calculate FIBONACCI(35)..(38) and (40). *Eventually what type of computer you are using. Processor ,RAM etc. After all, 40 is a very small number.? Give it a try!!
*Note:* Fibonacci sequence is this one : 1,1,2,3,5,8,13,21,34,55,89,144....the value of n term is the sum of the previous 2 terms fib( n)=fib(n-1) + fib(n-2), and fib(1)=1,fib(2)=1
          Fortunately , Fibonacci has also an explicit solution (non recursive), you can define another lambda to check the results *FIB( n)=LAMBDA( n,LET(a,SQRT(5),x,((1+a)/2)^n,y,((1-a)/2)^n,1/a*(x-y)))*

```
=LAMBDA(n,IF(n<3,1,FIBBONACCI(n-1)+FIBONACCI(n-2)))
```
LAMBDA 6.0.xlsxABCDEFGH1FIBONACCIrecursiveckeck(non recursive)2n value=FIBONACCI(B3)=FIB(B3)time(can use phone's stopwatch)315610610instant41825842584instant52067656765instant6308320408320401s73592274659227465?sshare this8383908816939088169?svalues940102334155102334155?swith us ?10FIBONACCI postCell FormulasRangeFormulaC2:D2C2=FORMULATEXT(C3)C3:C9C3=FIBONACCI(B3)D3:D9D3=FIB(B3)


----------



## Xlambda (Feb 20, 2022)

*RRA(a)* *R*eversed *R*ecursive *A*dding  !! recursive !!

```
=LAMBDA(a,
    LET(l,LEN(a),m,MAX(l),c,COLUMNS(a),r,SEQUENCE(m),s,SEQUENCE(,c+m-1)-r+1,
       b,MMULT(SEQUENCE(,m)^0,IFERROR((s>0)*(s<=c)*INDEX(MID(REPLACE(a,1,0,REPT(0,m-l)),r,1),m-r+1,s),0)),
       IF(AND(LEN(b)=1),FILTER(b,SEQUENCE(,COLUMNS(b))<=XMATCH(TRUE,b<>0,,-1)),RRA(b))
    )
)
```
The only modifications made to RA (replace one r to m-r+1)
...INDEX(MID(REPLACE(a,1,0,REPT(0,m-l)),r,1),*r*,s)…to ...INDEX(MID(REPLACE(a,1,0,REPT(0,m-l)),r,1),*m-r+1*,s)
and to last part:
instead of filtering out leading 0's we have to filter out trailing 0's
… SEQUENCE(,COLUMNS(b))*>=*XMATCH(TRUE,b<>0) .. to … SEQUENCE(,COLUMNS(b))*<=*XMATCH(TRUE,b<>0*,,-1*)
LARGE NUM FIBONACCI.xlsxABCDEFGHIJKLMNOPQRSTUVW1Part 3. RRA. Reverse Recursive Adding Concept. Adding reversed numbers aligned to the left.2No leading 0's are necessary and results will always be reversed. 34same example used for RAwhy results will stay reversed55600988789898=RRA(N5+8)9reversed or flipped array311011898129898311314171798=RRA(N11:O11+N12:O12)151216inserting 0's17*17170908notice that even from early stages using RRA will keep the 18results reversed and aligned to the left.19this time will extract last digits as first rows,20scnd digits to the left as scnd row+ offset to the right, etc.see exact construction, next post2177982211002324781080252610 has 2 digits, loop the process from *270708100800282978080300010031327809003334filtering out trailing 0's35780936377809 is reversed 908738LNF 3Cell FormulasRangeFormulaN8,N14N8=FORMULATEXT(N9)N9:O9N9=RRA(N5+8)N12N12=RRA(N9)B14:E14B14=B11:E11+B12:E12N15:O15N15=RRA(N11:O11+N12:O12)B24:F24B24=B21:F21+B22:F22B32:G32B32=B29:G29+B30:G30Dynamic array formulas.


----------



## Xlambda (Feb 20, 2022)

*LNF( n )* Large Number Fibonacci calls RRA.

```
=LAMBDA(n,
    LET(f,IF({1,0},1,0),
       r,REDUCE(0,SEQUENCE( n),LAMBDA(v,i,LET(s,SEQUENCE(i),x,IFNA(INDEX(v,i-2,),0),y,INDEX(v,i-1,),z,RRA(x+y),w,IF(COLUMNS(z)=1,INDEX(z,{1,2}),z),IF(s<3,f,IF(s=i,IFERROR(w,0),v))))),
       x,INDEX(r,n,),m,COLUMNS(x),
       CONCAT(INDEX(x,SEQUENCE(,m,m,-1)))
    )
)
```
*RRA(a)*

```
=LAMBDA(a,
    LET(l,LEN(a),m,MAX(l),c,COLUMNS(a),r,SEQUENCE(m),s,SEQUENCE(,c+m-1)-r+1,
       b,MMULT(SEQUENCE(,m)^0,IFERROR((s>0)*(s<=c)*INDEX(MID(REPLACE(a,1,0,REPT(0,m-l)),r,1),m-r+1,s),0)),
       IF(AND(LEN(b)=1),FILTER(b,SEQUENCE(,COLUMNS(b))<=XMATCH(TRUE,b<>0,,-1)),RRA(b))
    )
)
```
*These are the only functions we need to calculate large Fibonacci numbers.*
The cost we have to pay is in *calculation time*. A lot of rows add up to the total number of iterations, and this is slowing down the process.
If we are patient enough, the function is capable of calculating up to _*F 156787*_ (result will have 32767 digits) without running in any other type of limitation.
This is how array construction works, followed by some large numbers calculations.
LARGE NUM FIBONACCI.xlsxABCDEFGHIJKLMN1LNF Large Number Fibonacci. The function.23This is how LNF construction using RRA will look, first part4B7: =LAMBDA(n,LET(f,IF({1,0},1,0),r,REDUCE(0,SEQUENCE(n),LAMBDA(v,i,LET(s,SEQUENCE(i),x,IFERROR(INDEX(v,i-2,),0),
                     y,INDEX(v,i-1,),z,RRA(x+y),w,IF(COLUMNS(z)=1,INDEX(z,{1,2}),z),IF(s<3,f,IF(s=i,IFERROR(w,0),v))))),r))(21)56710#N/A#N/A#N/ALNF  last part, extracting, reversing and concat n th row810#N/A#N/A#N/A… x,INDEX(r,n,),m,COLUMNS(x),CONCAT(INDEX(x,SEQUENCE(,m,m,-1)))))920#N/A#N/A#N/A1030#N/A#N/A#N/A=LET(x,INDEX(B7#,21,),m,COLUMNS(x),CONCAT(INDEX(x,SEQUENCE(,m,m,-1))))1150#N/A#N/A#N/A109461280#N/A#N/A#N/A1331#N/A#N/A#N/A=LNF(21)1412#N/A#N/A#N/A109461543#N/A#N/A#N/A1655#N/A#N/A#N/A1798#N/A#N/A#N/A18441#N/A#N/A19332#N/A#N/A20773#N/A#N/A21016#N/A#N/A22789#N/A#N/A237951#N/A244852#N/A251814#N/A265676#N/A276490128LNF 4Cell FormulasRangeFormulaB7:F27B7=LAMBDA(n,LET(f,IF({1,0},1,0),r,REDUCE(0,SEQUENCE(n),LAMBDA(v,i,LET(s,SEQUENCE(i),x,IFNA(INDEX(v,i-2,),0),y,INDEX(v,i-1,),z,RRA(x+y),w,IF(COLUMNS(z)=1,INDEX(z,{1,2}),z),IF(s<3,f,IF(s=i,IFERROR(w,0),v))))),r))(21)H10,H13H10=FORMULATEXT(H11)H11H11=LET(x,INDEX(B7#,21,),m,COLUMNS(x),CONCAT(INDEX(x,SEQUENCE(,m,m,-1))))H14H14=LNF(21)Dynamic array formulas.


----------



## Xlambda (Feb 20, 2022)

Calculation times.
Attached, screen capture from Wolfram Alpha _*F 5000*_ .
LARGE NUM FIBONACCI.xlsxABCDE1Large Number Fibonacci. Calculation times. 23calc timechar length=LNF(1000)49.69s209434665576869374564356885276750406258025646605173717804024817290895365554179490518904038798400792551692959225930803226347752096896232398733224711616429964409065331879382989696499285160037044761377951668492288755=LNF(1222)618.39s25610799692333988732360328442933016535249763629361807716474888101462584285738925020873487784683205571783810115198621325011674475285351477027057245870184357713578062133821547209578364313783025354566070395720268160186654285719466977305830210943172398724278153117=LNF(1477)832.61s3092114752986979021852557858619611791355705525027468032521749562265586340243239476666371378239325243976118646715662119083302633774252045520741882086869936691237540043402509431087092122991804222930097654049305082429757737746121400215994779830067135361065494411613234990772981158870673637101530363158494803880576579=LNF(2000)101m19.62s418422469633339230487870672560234148278257985284025068109801028013731430858437013070722412359963914151108844608753890960360764019471164359602927198331259873732625355580260699158591522949245390499872225679531698287448247299226390183371677806060701161549788671987985831146887087626459736908672288402365442229524334796448013951534956297208765265606952980649984197744872015561280266540455417171788193032402520431208251681712511=LNF(5000)1219m56.37s104538789684543883256337019163083259053120821277146462451061605972148955501390440370970108229164622106694792934528588829738134831020089549829403614301569114789383642165639441069102145056341337065586562382546567007125259299038549338139288363783475189087629707120333370529231076930085180938498018038478139967488817655546537882916442689129803846137789690215022930824756663462249230718833248032803750391303529033045058427011476352422702109346376991040067141748832984228914912731040543287532980442736768229772449877498745556919077038806370468327948113589737399931101062193081490185708153978543791953056175107610530756887837660336673554452588448862416192105534574936758978490279882343510235998446639348532564119522218595630604753646454707603309024208063825849291564528762915757591423438091423029174910889841552098544324865940797935713168416928680395453095453886981146650820668628974206393234384884652409887423958738019769938203171742089322654688793640026307977800587591296713896342142525791168727556003603113705477547246046399875880469851784086743828631251314=LAMBDA(s,c,MID(s,SEQUENCE(ROUNDUP((LEN(s)/c),0),,1,c),c))(D12,100)1538789684543883256337019163083259053120821277146462451061605972148955501390440370970108229164622106691647929345285888297381348310200895498294036143015691147893836421656394410691021450563413370655865623821754656700712525929903854933813928836378347518908762970712033337052923107693008518093849801803847813991867488817655546537882916442689129803846137789690215022930824756663462249230718833248032803750391303521990330450584270114763524227021093463769910400671417488329842289149127310405432875329804427367682297722044987749874555691907703880637046832794811358973739993110106219308149018570815397854379195305617510762110530756887837660336673554452588448862416192105534574936758978490279882343510235998446639348532564112295222185956306047536464547076033090242080638258492915645287629157575914234380914230291749108898415522309854432486594079793571316841692868039545309545388698114665082066862897420639323438488465240988742392458738019769938203171742089322654688793640026307977800587591296713896342142525791168727556003603113702554775472460463998758804698517840867438286312526LNF 5Cell FormulasRangeFormulaC4,C12,C10,C8,C6C4=LEN(D4)D3,D5,D7,D9,D11,D14D3=FORMULATEXT(D4)D4D4=LNF(1000)D6D6=LNF(1222)D8D8=LNF(1477)D10D10=LNF(2000)D12D12=LNF(5000)D15:D25D15=LAMBDA(s,c,MID(s,SEQUENCE(ROUNDUP((LEN(s)/c),0),,1,c),c))(D12,100)Dynamic array formulas.


----------



## Xlambda (Feb 21, 2022)

To prove that *LNF is recursive efficient*, let's calculate the frequency distributions of iterations calculated by RRA for every 2 rows, maximum number of iterations needed by 2 rows, total number of iterations for entire array.
For that I will use a tool function that counts the iterations. 0 iterations means that the exit condition is met after first calculation.
*I_RRA(a,[i ])*  where i argument counts total number of iterations after exiting condition is met

```
=LAMBDA(a,[i ],
     LET(l,LEN(a),m,MAX(l),c,COLUMNS(a),r,SEQUENCE(m),s,SEQUENCE(,c+m-1)-r+1,
        b,MMULT(SEQUENCE(,m)^0,IFERROR((s>0)*(s<=c)*INDEX(MID(REPLACE(a,1,0,REPT(0,m-l)),r,1),m-r+1,s),0)),
        IF(AND(LEN(b)=1),i,I_RRA(b,i+1))
    )
)
```
Also, to be much easier will have *ARLNF Array Reversed Large Number Fibonacci*, which will return entire array, ( LNF without last part of extracting last row, reversing and concat, but without the NA()'s )
*ARLNF( n)*

```
=LAMBDA(n,
    LET(f,IF({1,0},1,0),
      r,REDUCE(0,SEQUENCE(n),LAMBDA(v,i,LET(s,SEQUENCE(i),x,IFNA(INDEX(v,i-2,),0),y,INDEX(v,i-1,),z,RRA(x+y),w,IF(COLUMNS(z)=1,INDEX(z,{1,2}),z),IF(s<3,f,IF(s=i,IFERROR(w,0),v))))),
     IFNA(r,"")
    )
)
```
LARGE NUM FIBONACCI.xlsxABCDEFGHIJKLMNOPQ1ARLNF Array Reversed Large Number Fibonacci23n=ARLNF(70)411052106320743085509680107311181212943131055141198151244116133321714773181501619167892017795121184852221918142320567624216490125221177126237568227248636428255205729263931213027814691312811871332299224153330040238343196264313532903871236338754253373478820753835564722939362530394140377187514241389618809342396895423643405514332014441141085561454269241976246437344943344744337804107484507130943114946309113638150473705121792514867962570845249940247877753505209626852154514701105630255529900821592356533711926133557542721757626858555442683859315956717334158522605726169253456361589789276821956259140620227659636002955780084516461169187037405265621887359372504666324891307475566764327758902016016865565771086761716966882530098777727067358212075549447168141842064327277269499064030966711737053190709429309174LNF 6Cell FormulasRangeFormulaB3B3=FORMULATEXT(B4)A4:A73A4=SEQUENCE(70)B4:P73B4=ARLNF(70)Dynamic array formulas.


----------



## Xlambda (Feb 21, 2022)

*Iteration's frequency distribution for* _*F 1000*_
LARGE NUM FIBONACCI.xlsxABCDEFGHIJKLMNOPQRSTUVWXYZAAAB1Entire Fibbonacci array for n=1000=SEQUENCE(C1)2↓=LET(a,F4:HF4,b,F5:HF5,y,FILTER(b,b<>""),z,INDEX(a,SEQUENCE(,COLUMNS(y))),x,IF(z="",0,z),I_RRA(x+y))3max nr.n↓=ARLNF(C1)4iterations1iterations105btwn 2 rows20106=MAX(E5:E1003)3020754030850509total nr. of608010iterations703111entire array801212=SUM(E4:E1003)90431312891005514itererations1109815frequencyfrequency12044116binsdistribution1303321709014077318157515001619229116078920341170795121411804852225119018142302005676242106490125for what n we have max nr. iterations2201177126=FILTER(D4#,ISNUMBER(XMATCH(E4:E1003,A7)))230756822789924186364282505205729260393121302708146913128011871332290922415333000402383431096264313532090387123633187542533734078820753835156472293936025303941403707187514241380961880934239168954236434015514332014441014108556145420692419762464317344943344744133780410748450071309431149460309113638150470370512179251481679625708452491940247877753501520962685215451047011056302555209900821592356530371192613355754027217576268585505442683859315956071733415852260570261692534563LNF 7Cell FormulasRangeFormulaD1,E2D1=FORMULATEXT(D4)F3,A26,A12,A6F3=FORMULATEXT(F4)D4:D1003D4=SEQUENCE(C1)F4:HF1003F4=ARLNF(C1)A7A7=MAX(E5:E1003)A13A13=SUM(E4:E1003)A17:A22A17=SEQUENCE(A7+1)-1B17:B23B17=FREQUENCY(E5:E1003,A17#)A27A27=FILTER(D4#,ISNUMBER(XMATCH(E4:E1003,A7)))E5:E60E5=LET(a,F4:HF4,b,F5:HF5,y,FILTER(b,b<>""),z,INDEX(a,SEQUENCE(,COLUMNS(y))),x,IF(z="",0,z),I_RRA(x+y))Dynamic array formulas.


----------



## Xlambda (Feb 21, 2022)

*Iteration's frequency distribution for* _*F 5000
LARGE NUM FIBONACCI.xlsxABCDEFGHIJKLMNOPQRSTUVWXYZAAAB1Entire Fibbonacci array for n=5000=SEQUENCE(C1)2↓=LET(a,F4:ANJ4,b,F5:ANJ5,y,FILTER(b,b<>""),z,INDEX(a,SEQUENCE(,COLUMNS(y))),x,IF(z="",0,z),I_RRA(x+y))3max nr.n↓=ARLNF(C1)4iterations1iterations105btwn 2 rows20106=MAX(E5:E5003)3020764030850509total nr. of608010iterations703111entire array801212=SUM(E4:E5003)90431399351005514itererations1109815frequencyfrequency12044116binsdistribution130332170901407731811008150016192290016078920388917079512141011804852225101901814236120056762402106490125for what n we have max nr. iterations2201177126=FILTER(D4#,ISNUMBER(XMATCH(E4:E5003,A7)))2307568227220124186364282505205729260393121302708146913128011871332290922415333000402383431096264313532090387123633187542533734078820753835156472293936025303941403707187514241380961880934239168954236434015514332014441014108556145420692419762464317344943344744133780410748450071309431149460309113638150470370512179251481679625708452491940247877753501520962685215451047011056302555209900821592356530371192613355754027217576268585505442683859315956071733415852260570261692534563LNF 7Cell FormulasRangeFormulaD1,E2D1=FORMULATEXT(D4)F3,A26,A12,A6F3=FORMULATEXT(F4)D4:D5003D4=SEQUENCE(C1)F4:ANJ5003F4=ARLNF(C1)A7A7=MAX(E5:E5003)A13A13=SUM(E4:E5003)A17:A23A17=SEQUENCE(A7+1)-1B17:B24B17=FREQUENCY(E5:E5003,A17#)A27A27=FILTER(D4#,ISNUMBER(XMATCH(E4:E5003,A7)))E5:E60E5=LET(a,F4:ANJ4,b,F5:ANJ5,y,FILTER(b,b<>""),z,INDEX(a,SEQUENCE(,COLUMNS(y))),x,IF(z="",0,z),I_RRA(x+y))Dynamic array formulas.*_


----------



## Xlambda (Feb 21, 2022)

*LNF for n=10,000*
Attached, screen capture from Wolfram Alpha _*F 10,000*_ . Fibonacci 10000 - Wolfram|Alpha
LARGE NUM FIBONACCI.xlsxABCD1Large Number Fibonacci n=10,00023char length=LNF(10000)42090336447648764317832666216120051075433103021484606800639065647699746800814421666623681555955136337340255820653326808361593737347904838652682630408924630564318873545443695598274916066020998841839338646527313000888302692356736131351175792974378544137521305205043477016022647583189065278908551543661595829872796829875106312005754287834532155151038708182989697916131278562650331954871402142875326981879620469360978799003509623022910263681314931952756302278376284415403605844025721143349611800230912082870460889239623288354615057765832712525460935911282039252853934346209042452489294039017062338889910858410651831733604374707379085526317643257339937128719375877468974799263058370657428301616374089691784263786242128352581128205163702980893320999057079200643674262023897831114700540749984592503606335609338838319233867830561364353518921332797329081337326426526339897639227234078829281779535805709936910491754708089318410561463223382174656373212482263830921032977016480547262438423748624114530938122065649140327510866433945175121615265453613331113140424368548051067658434935238369596534280717687753283482343455573667197313927462736291082106792807847180353291311767789246590899386354593278945237776744061922403376386740040213303432974969020283281459334188268176838930720036347956231171031012919531697946076327375892535307725523759437884345040677155557790564504430166401194625809722167297586150269684431469520346149322911059706762432685159928347098912847067408620085871350162603120719031720860940812983215810772820763531866246112782455372085323653057759564300725177443150515396009051686032203491632226408852488524331580515348496224348482993809050704834824493274537326245677558790891871908036620580095947431500524025327097469953187707243768259074199396322659841474981936092852239450397071654431564213281576889080587831834049174345562705202235648464951961124602683139709750693826487066132645076650746115126775227486215986425307112984411826226610571635150692600298617049454250474913781151541399415506712562711971332527636319396069028956502882686083622410820505624307017949761711212330660733100599473668755 6=LAMBDA(s,c,MID(s,SEQUENCE(ROUNDUP((LEN(s)/c),0),,1,c),c))(D4,120)7336447648764317832666216120051075433103021484606800639065647699746800814421666623681555955136337340255820653326808361593873734790483865268263040892463056431887354544369559827491606602099884183933864652731300088830269235673613135117579297437895441375213052050434770160226475831890652789085515436615958298727968298751063120057542878345321551510387081829896979161311027856265033195487140214287532698187962046936097879900350962302291026368131493195275630227837628441540360584402572114334911611800230912082870460889239623288354615057765832712525460935911282039252853934346209042452489294039017062338889910858410126518317336043747073790855263176432573399371287193758774689747992630583706574283016163740896917842637862421283525811282051316370298089332099905707920064367426202389783111470054074998459250360633560933883831923386783056136435351892133279732908114337326426526339897639227234078829281779535805709936910491754708089318410561463223382174656373212482263830921032977016480155472624384237486241145309381220656491403275108664339451751216152654536133311131404243685480510676584349352383695965342801671768775328348234345557366719731392746273629108210679280784718035329131176778924659089938635459327894523777674406192240317376386740040213303432974969020283281459334188268176838930720036347956231171031012919531697946076327375892535307725523759184378843450406771555577905645044301664011946258097221672975861502696844314695203461493229110597067624326851599283470989121984706740862008587135016260312071903172086094081298321581077282076353186624611278245537208532365305775956430072517744315020515396009051686032203491632226408852488524331580515348496224348482993809050704834824493274537326245677558790891871908036216205800959474315005240253270974699531877072437682590741993963226598414749819360928522394503970716544315642132815768890802258783183404917434556270520223564846495196112460268313970975069382648706613264507665074611512677522748621598642530711298423411826226610571635150692600298617049454250474913781151541399415506712562711971332527636319396069028956502882686083622410248205056243070179497617112123306607331005994736687525LNF 9Cell FormulasRangeFormulaD3,D6D3=FORMULATEXT(D4)C4C4=LEN(D4)D4D4=LNF(10000)D7:D24D7=LAMBDA(s,c,MID(s,SEQUENCE(ROUNDUP((LEN(s)/c),0),,1,c),c))(D4,120)Dynamic array formulas.


----------



## Xlambda (Feb 21, 2022)

*Iteration's frequency distribution for* _*F 10,000
LARGE NUM FIBONACCI.xlsxABCDEFGHIJKLMNOPQRSTUVWXYZAAAB1Entire Fibbonacci array for n=10000=SEQUENCE(C1)2↓=LET(a,F4:CBO4,b,F5:CBO5,y,FILTER(b,b<>""),z,INDEX(a,SEQUENCE(,COLUMNS(y))),x,IF(z="",0,z),I_RRA(x+y))3max nr.n↓=ARLNF(C1)4iterations1iterations105btwn 2 rows20106=MAX(E5:E10003)3020764030850509total nr. of608010iterations703111entire array801212=SUM(E4:E10003)904313227361005514itererations1109815frequencyfrequency12044116binsdistribution1303321709014077318110171500161925416160789203306617079512143651804852225411901814236420056762402106490125for what n we have max nr. iterations2201177126=FILTER(D4#,ISNUMBER(XMATCH(E4:E10003,A7)))2307568227220124186364286299250520572987902603931213097802708146913128011871332290922415333000402383431096264313532090387123633187542533734078820753835156472293936025303941403707187514241380961880934239168954236434015514332014441014108556145420692419762464317344943344744133780410748450071309431149460309113638150470370512179251481679625708452491940247877753501520962685215451047011056302555209900821592356530371192613355754027217576268585505442683859315956071733415852260570261692534563LNF 8Cell FormulasRangeFormulaD1,E2D1=FORMULATEXT(D4)F3,A26,A12,A6F3=FORMULATEXT(F4)D4:D10003D4=SEQUENCE(C1)F4:CBO10003F4=ARLNF(C1)A7A7=MAX(E5:E10003)A13A13=SUM(E4:E10003)A17:A23A17=SEQUENCE(A7+1)-1B17:B24B17=FREQUENCY(E5:E10003,A17#)A27:A30A27=FILTER(D4#,ISNUMBER(XMATCH(E4:E10003,A7)))E5:E60E5=LET(a,F4:CBO4,b,F5:CBO5,y,FILTER(b,b<>""),z,INDEX(a,SEQUENCE(,COLUMNS(y))),x,IF(z="",0,z),I_RRA(x+y))Dynamic array formulas.*_


----------



## Xlambda (Feb 21, 2022)

Function of "n" that estimates total number of iterations "ni" for calculating LNF(n )
*ni(n )=5E-05*n^2+1.8851*n-676.31
LARGE NUM FIBONACCI.xlsxABCDEFGHIJKL1=SCAN(0,'LNF 8'!E5:E10003,LAMBDA(v,x,v+x))2iterations=XLOOKUP(D6#,A4#,B4#)3nrunning tot↓=0.00005*D6#^2+1.8851*D6#-676.31=0.00005*H6#^2+1.8851*H6#-676.31420totalfunction'sfunction's530niterationsestimationnestimation64050051727910001,259750100012891,25920003,294860150021982,26430005,429970200031683,29440007,6641080250042024,34950009,9991190300052945,429600012,43412100350064386,534700014,96913110400075677,664800017,60414120450087368,819900020,34015130500099359,9991000023,1751614055001114911,2041100026,1101715060001238812,4341200029,1451816065001364013,6891300032,2801917070001489614,9691400035,5152018075001616516,2741500038,8502119080001747217,6041600042,2852220085001877818,9601700045,8202321090002009220,3401800049,4552422095002141721,7451900053,19125230100002273623,1752000057,026262412100060,961272512200064,996282612300069,131292712400073,366302812500077,701312912600082,136323012700086,671333112800091,306343212900096,0423533230000100,8773634231000105,8123735332000110,8473836333000115,9823937334000121,2174038335000126,5524139436000131,9874240537000137,5224341538000143,1574442539000148,8934543640000154,7284644741000160,6634745742000166,6984846743000172,8334947744000179,0685048845000185,4035149946000191,83852501047000198,37353511048000205,00854521049000211,74455531050000218,57956541051000225,51457551052000232,54958561053000239,68459571054000246,91960581155000254,25461591256000261,68962601357000269,22463611358000276,85964621459000284,59565631560000292,430666416LNF 10Cell FormulasRangeFormulaB1,F3,I3B1=FORMULATEXT(B4)E2E2=FORMULATEXT(E6)A4:A10002A4=SEQUENCE(10000-1)+1B4:B10002B4=SCAN(0,'LNF 8'!E5:E10003,LAMBDA(v,x,v+x))D6:D25D6=SEQUENCE(20,,500,500)E6:E25E6=XLOOKUP(D6#,A4#,B4#)F6:F25F6=0.00005*D6#^2+1.8851*D6#-676.31H6:H65H6=SEQUENCE(60,,1000,1000)I6:I65I6=0.00005*H6#^2+1.8851*H6#-676.31Dynamic array formulas.*


----------



## jdellasala (Dec 8, 2022)

Lots of chatter here, but no mention that the LAMBDA posted has a typo. Posted is
"=LAMBDA(n,IF(n<3,1,*FIBBONACCI*(n-1)+FIBONACCI(n-2)))", but for any value 3 or more it just generates a #NAME! error.  Should be
	
	
	
	
	
	



```
=LAMBDA(n,IF(n<3,1,FIBONACCI(n-1)+FIBONACCI(n-2)))
```
Just sayin'.


----------



## Xlambda (Mar 24, 2021)

FIBONACCI *!! recursive !! *calculates the nth term of the famous Fibonacci sequence . *This is more of a fun quest than a useful function.* ( did this on a YT channel also, had fun with *Rico* about this). 
This reflects how limited our computers are. You will be surprised. This time is not about recursion "iterations" limit, is about the limit of the number of calculations that a computer can perform.
Open a new workbook, define the lambda FIBONACCI. Very important, first, try values of n less then 20!! . Call FIBONACC(15) ...(19) ..etc. and increase it bit by bit. 
*For what number "n" do you think that your computer will start struggling giving you the answer??* *Share with us here, if you please, how long it took your computer to calculate FIBONACCI(35)..(38) and (40). *Eventually what type of computer you are using. Processor ,RAM etc. After all, 40 is a very small number.? Give it a try!!
*Note:* Fibonacci sequence is this one : 1,1,2,3,5,8,13,21,34,55,89,144....the value of n term is the sum of the previous 2 terms fib( n)=fib(n-1) + fib(n-2), and fib(1)=1,fib(2)=1
          Fortunately , Fibonacci has also an explicit solution (non recursive), you can define another lambda to check the results *FIB( n)=LAMBDA( n,LET(a,SQRT(5),x,((1+a)/2)^n,y,((1-a)/2)^n,1/a*(x-y)))*

```
=LAMBDA(n,IF(n<3,1,FIBBONACCI(n-1)+FIBONACCI(n-2)))
```
LAMBDA 6.0.xlsxABCDEFGH1FIBONACCIrecursiveckeck(non recursive)2n value=FIBONACCI(B3)=FIB(B3)time(can use phone's stopwatch)315610610instant41825842584instant52067656765instant6308320408320401s73592274659227465?sshare this8383908816939088169?svalues940102334155102334155?swith us ?10FIBONACCI postCell FormulasRangeFormulaC2:D2C2=FORMULATEXT(C3)C3:C9C3=FIBONACCI(B3)D3:D9D3=FIB(B3)


----------



## Xlambda (Dec 25, 2022)

jdellasala said:


> Lots of chatter here, but no mention that the LAMBDA posted has a typo. Posted is
> "=LAMBDA(n,IF(n<3,1,*FIBBONACCI*(n-1)+FIBONACCI(n-2)))", but for any value 3 or more it just generates a #NAME! error.  Should be
> 
> 
> ...


Indeed, a good point, and the explanation is quite simple. The formula is so short that everybody typed it and they did it correctly, they did not copy mine, like you did. And when we type typos are possible. ✌️😉🙏
Anyhow, in the minisheet all the functions are fine. ✌️
Hope that Fibonacci(10000) calculated here FIBONACCI has all the digits ok. 🤣


----------

