Get reliable answers to your questions at Westonci.ca, where our knowledgeable community is always ready to help. Experience the ease of finding accurate answers to your questions from a knowledgeable community of professionals. Discover detailed answers to your questions from a wide network of experts on our comprehensive Q&A platform.
Sagot :
Hello,
In a diginacci sequence, all term is the sum off digits of the 2 terms before.
Answer: 2,3
[tex]u_{-2}=1\\u_{-1}=1\\u_0=digit(u_{-2})+digit(u_{-1})=1+1=2\\u_1=1+2=3\\u_2=2+3=5\\u_3=3+5=8\\u_4=5+8=13\\u_5=8+1+3=12\\...\\u_{18}=11\\u_{19}=8\\u_{20}=10\\u_{21}=9\\u_{22}=10\\u_{23}=10\\u_{24}=2**********\\u_{25}=3**********\\2020=24*84+4\\u_{2020}=u_{4}=13\\[/tex]
We must begin with 13 , 10
Proof:
Dim a As Long, b As Long, c As Long, nb As Integer
a = 13
b = 10
nb = 1
Print nb, a
While nb < 2021
nb = nb + 1
c = somme&(a, b)
a = b
b = c
' Print nb, a
Wend
Print nb, a
End
Function somme& (a1 As Long, b1 As Long)
Dim strA As String, strB As String, n As Long
strA = LTrim$(Str$(a1))
strB = LTrim$(Str$(b1))
n = 0
For i = 1 To Len(strA)
n = n + Val(Mid$(strA, i, 1))
Next i
For i = 1 To Len(strB)
n = n + Val(Mid$(strB, i, 1))
Next i
somme& = n
End Function
We hope our answers were helpful. Return anytime for more information and answers to any other questions you may have. We hope our answers were useful. Return anytime for more information and answers to any other questions you have. Keep exploring Westonci.ca for more insightful answers to your questions. We're here to help.