OFFSET

1,6

COMMENTS

See A189640.

FORMULA

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

MATHEMATICA

(See A189640.)

PROG

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

CROSSREFS

KEYWORD

nonn

AUTHOR

Clark Kimberling, Apr 24 2011

STATUS

approved