Help:=proc(): print(`IsLosing(k), LosingList(N)`): end: #IsLosing(k): In the Alice-Bob game #where a legal move consists of either #removing 1 penny or trunc(k/2) pennies #is the position losing? IsLosing:=proc(k) option remember: if k=0 then RETURN(true): fi: if not IsLosing(k-1) and not IsLosing(trunc((k+1)/2)) then RETURN(true): else RETURN(false): fi: end: #LosingList(N): all the losing positions up to N pennies LosingList:=proc(N) local L,i: L:=[]: for i from 0 to N do if IsLosing(i) then L:=[op(L),i]: fi: od: L: end: