Brokenfingers wrote:I wish to have my PC calculate numerous ammounts of numbers, and eventually refine the sum numbers to but a single integer, by means of cascading calculations.
This vague statement refers to the calculation of the
Digital Root, used in Western numerology, but without much importance in proper mathematics.
Brokenfingers has two major problems with the quest:
• The showstopper is: "i cant be bothered to learn". Apparently correct English isn't of interest either.
• Another important one is the OP's blissful ignorance of the precision limits in spreadsheets.
The latter can be circumvented, as shown in
[Solved] Problem creating the Fibonacci series which performs calculations with 28 digits of precision, but not by someone who wants to remain uneducated.
If the goal is to calculate the digital roots of the
Fibonacci numbers, they form a repeating pattern of 24 numbers beginning with these roots for F₁, F₂, F₃, …:
1, 1, 2, 3, 5, 8, 4, 3, 7, 1, 8, 9,
8, 8, 7, 6, 4, 1, 5, 6, 2, 8, 1, 9.
The pattern then repeats for F₂₅, F₂₆, F₂₇, …, F₄₉, F₅₀, F₅₁, …. If the term of the pattern is not 9, it and the term 12 below it sum to 9.
John_Ha wrote:=IF(MOD(n;9)=0;9;MOD(n;9))
karolus wrote:=IF(MOD(n;9);MOD(n;9);9)
Another simple formula is
=MOD(n-1;9)+1.
Lupp wrote:Sheet1.A80:A82 of your recent example don't contain [the correct] integers.
Cell A75 is supposed to be F₇₄ (which should be F₇₂+F₇₃ = 498454011879264+806515533049393) but the sum exceeds 15 significant digits and it is clear the value 1304969544928660 is not the next Fibonacci number since it should end in 7 but ends in 0. All successive values in column A are also incorrect. However since
=MOD(74;24) is 2, the digital root of F₇₄ is the same as that of F₂ which is 1, given above.
Lupp wrote:The results should be interpreted as representants of the respective residue classes.
Agreed. The residue class method is best as long as the values are integers with no more than 15 digits. If (and only if) they are integers stored as text, I use this formula:
=SUMPRODUCT({1;2;3;4;5;6;7;8;9}*(LEN(n)-LEN(SUBSTITUTE(n;{1;2;3;4;5;6;7;8;9};""))))
This attachment shows calculation (without macros) of the digital sum and the iterated sum for values of lengths 1 through 20 and then for a value with 135 digits. This set of values is taken from the decimal expansion of π, not from the Fibonacci series.
Mr. Programmer
AOO 4.1.7 Build 9800, MacOS 13.7.8, iMac Intel. The locale for any menus or Calc formulas in my posts is English (USA).