A253718 Number h such that (h,0) is n steps from (0,0), where steps are as follows: (x,y)->(x-r, y) if r > 0, and (x,y)->(y, r/3) otherwise, where r = x mod 3.
0, 1, 1, 3, 4, 4, 3, 4, 4, 5, 6, 6, 6, 7, 7, 6, 7, 7, 5, 6, 6, 6, 7, 7, 6, 7, 7, 7, 8, 8, 8, 9, 9, 8, 9, 9, 8, 9, 9, 9, 10, 10, 9, 10, 10, 8, 9, 9, 9, 10, 10, 9, 10, 10, 7, 8, 8, 8, 9, 9, 8, 9, 9, 8, 9, 9, 9, 10, 10, 9, 10, 10, 8, 9, 9, 9, 10, 10, 9, 10, 10
Offset: 0
Links
- Clark Kimberling, Table of n, a(n) for n = 0..1000
Crossrefs
Cf. A253281.
Programs
-
Mathematica
f[{x_, y_}] := If[IntegerQ[x/3], {y, x/3}, {x - Mod[x, 3], y}]; g[{x_, y_}] := Drop[FixedPointList[f, {x, y}], -1]; Table[-1 + Length[g[{n, 0}]], {n, 0, 200}] (* A253718 *)
Comments