Explore Westonci.ca, the premier Q&A site that helps you find precise answers to your questions, no matter the topic. Join our platform to connect with experts ready to provide precise answers to your questions in various areas. Our platform offers a seamless experience for finding reliable answers from a network of knowledgeable professionals.
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
Thank you for your visit. We're dedicated to helping you find the information you need, whenever you need it. Thank you for visiting. Our goal is to provide the most accurate answers for all your informational needs. Come back soon. We're glad you chose Westonci.ca. Revisit us for updated answers from our knowledgeable team.