OFFSET
1,2
LINKS
MATHEMATICA
f[s_] := Block[{d = Abs[Rest@s - Most@s], k = 1}, While[ MemberQ[d, Abs[k - Last@s]] || MemberQ[s, k], k++ ]; Append[s, k]]; t = Nest[f, {1}, 130]; Table[ Position[t, n], {n, 70}] // Flatten (* Robert G. Wilson v, Jun 09 2006 *)
f[s_] := Block[{k = 1, d = Abs[Most@s - Rest@s], l = Last@s}, While[MemberQ[s, k] || MemberQ[d, Abs[l - k]], k++ ]; Append[s, k]]; t = Nest[f, {1}, 125]; Table[Position[t, n], {n, 71}] // Flatten (* Robert G. Wilson v, Jun 13 2006 *)
PROG
(Haskell)
import Data.List (elemIndex); import Data.Maybe (fromJust)
a081146 = (+ 1) . fromJust . (`elemIndex` a081145_list)
-- Reinhard Zumkeller, Jul 02 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
Don Reble, Mar 08 2003
STATUS
approved