OFFSET

1,5

COMMENTS

Almost identical to A189641.

LINKS

Kevin Ryde, Iterations of the Terdragon Curve, see index "TurnsR", with a(n) = TurnsR(n).

FORMULA

a(n) = floor((n+1)/3) + a(floor(n/3)), where a(0)=0.

MATHEMATICA

PROG

(PARI) a(n) = (n - vecsum(digits(n, 3)%2))/2; \\ Kevin Ryde, Apr 23 2021

CROSSREFS

KEYWORD

nonn

AUTHOR

Clark Kimberling, Apr 25 2011

STATUS

approved