Hello,
In a diginacci sequence, all term is the sum off digits of the 2 terms before.
Answer: 2,3
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