A078759 Height of n-th term in A064389 (variation (4) of Recamán's sequence).
1, 2, 3, 2, 3, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 6, 7, 6, 7, 6, 5, 6, 5, 6, 7, 8, 7, 8, 7, 6, 5, 6, 5, 6, 7, 8, 7, 6, 7, 8, 9, 8, 7, 6, 7, 6, 7, 6, 7, 8, 9, 8, 9, 8, 7, 6, 7, 8, 9, 8, 9, 8, 9, 8, 9, 8, 7, 8, 9, 10, 9, 10, 9, 8, 7, 8, 7, 8, 9, 10, 9, 10, 9, 10, 9, 8, 9, 10, 11, 10, 11, 10, 9, 8, 9, 8, 9, 10
Offset: 1
Keywords
Links
- Nick Hobson, Table of n, a(n) for n=1..10000
- Nick Hobson, Python program for this sequence
Formula
The height of a term in A064389 = number of addition steps - number of subtraction steps to produce it.