login
A333384
Use the Möbius (or Moebius) function mu(n) (A008683) to define a walk on a square lattice. A value of 1 is a move to the right, a value of -1 is a move to the left, and a value of 0 is a move either up or down depending on whether the previous nonzero value was +1 or -1. Sequence lists moves which reach a point that is further from the origin than any earlier move.
0
0, 1, 4, 5, 8, 9, 12, 13, 20, 24, 25, 48, 49, 50, 73, 84, 100, 103, 104, 105, 108, 109, 110, 200, 243, 244, 245, 246, 273, 620, 621, 646, 647, 648, 653, 654, 661, 664, 665, 666, 2655, 2656, 2803, 2804, 2837, 3212, 3213, 3214, 3215, 3216, 3227, 3228, 3231, 3232, 3233, 3234, 3235
OFFSET
1,3
EXAMPLE
a(6) is 9. a(5) has a position on the Cartesian plane {-2, -2} and Möbius mu(9) is 0 and the previous nonzero was -1, resulted in a position of {-2, -3}; a distance further from the origin than a(5).
MATHEMATICA
k = 1; flg = mxd = ns = ew = 0; lst = {0}; While[k < 1001, mu = MoebiusMu@ k; If[ Abs[mu] > 0, flg = mu; ns = ns + mu, ew = ew + flg]; d = ns^2 + ew^2; If[mxd < d, mxd = d; AppendTo[lst, k]]; k++]; lst
CROSSREFS
Sequence in context: A338062 A126001 A321333 * A334992 A269984 A188085
KEYWORD
easy,nonn
AUTHOR
Hayden H. Rigdon and Robert G. Wilson v, Mar 18 2020
STATUS
approved