OFFSET
1,1
LINKS
Tomas Tkac, Table of n, a(n) for n = 1..306 [recomputed and restored by Georg Fischer, Oct 14 2019]
Brady Haran and N. J. A. Sloane, Amazing Graphs, Numberphile Video.
EXAMPLE
PROG
(VBA for Excel)
Sub sequence()
'
For x = 1 To 1002 ' can be made smaller to lessen the processing time
Cells(x, 1) = x - 1 ' generate n for A133058
Cells(1, x) = x - 1 ' generate starting numbers for A133058
Next x
'
For r = 2 To 1002
For c = 2 To 1002
grcd = WorksheetFunction.Gcd(Cells(r - 1, c), Cells(r, 1))
If grcd = 1 Then
Cells(r, c) = Cells(r - 1, c) + Cells(r, 1) + 1
Else
Cells(r, c) = Cells(r - 1, c) / grcd
' populate an array of the A133058 sequence with a(0)=0, 1, 2, 3, ...
End If
Next c
Next r
'
For y = 2 To 1002
If Cells(638, y) = 11 Then
Cells(1005, p + 1) = Cells(1, y)
p = p + 1 ' filter numbers that join the longest sequence
End If
Next y
'
End Sub
CROSSREFS
KEYWORD
nonn
AUTHOR
Tomas Tkac, Aug 10 2019
EXTENSIONS
Entry revised by Editors of the OEIS, Oct 01 2019
STATUS
approved