The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A257944 Lexicographically earliest sequence of positive integers such that the terms and their absolute first differences are all distinct and no term is the sum of two distinct terms. 5
 1, 3, 7, 12, 18, 26, 16, 31, 20, 37, 50, 22, 41, 64, 35, 56, 83, 39, 69, 45, 54, 79, 111, 58, 92, 130, 60, 96, 136, 73, 115, 163, 75, 121, 168, 77, 134, 193, 98, 149, 182, 102, 157, 206, 117, 178, 244, 138, 210, 277, 140, 214, 282, 153, 229, 307, 155, 220, 263 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 COMMENTS The sequence of absolute first differences begins: 2, 4, 5, 6, 8, 10, 15, 11, 17, 13, 28, 19, 23, 29, 21, 27, 44, 30, 24, 9, 25, 32, 53, ... . LINKS Alois P. Heinz, Table of n, a(n) for n = 1..10000 E. Angelini et al., 0-additive and first differences and follow-up messages on the SeqFan list, May 13 2015 MAPLE s:= proc() false end: b:= proc() false end: a:= proc(n) option remember; local i, k, ok;       if n=1 then b(1):= true; 1     else for k do if b(k) or s(k) or (t-> b(t) or t=k)(            abs(a(n-1)-k)) then next fi; ok:=true;            for i to n-1 while ok do if b(k+a(i))              then ok:=false fi od; if ok then break fi          od;          for i to n-1 do s(a(i)+k):= true od;          b(k), b(abs(a(n-1)-k)):= true\$2; k       fi     end: seq(a(n), n=1..101); MATHEMATICA s[_] = False; b[_] = False; a[n_] := a[n] = Module[{i, k, ok}, If[n == 1, b[1] = True; 1,      For[k = 1, True, k++, If[b[k] || s[k] || Function[t, b[t] ||      t == k][Abs[a[n-1] - k]], Continue[]]; ok = True;              For[i = 1, i <= n-1 && ok, i++, If[b[k + a[i]],              ok = False]]; If[ok, Break[]]];           For[i = 1, i <= n-1, i++, s[a[i] + k] = True];           {b[k], b[Abs[a[n-1] - k]]} = {True, True}; k]]; Table[a[n], {n, 1, 101}] (* Jean-François Alcover, Jul 16 2021, after Alois P. Heinz *) CROSSREFS Cf. A005228, A030124, A095115, A140778, A257941. Sequence in context: A066379 A024517 A257941 * A005228 A000969 A194117 Adjacent sequences:  A257941 A257942 A257943 * A257945 A257946 A257947 KEYWORD nonn AUTHOR Eric Angelini and Alois P. Heinz, May 13 2015 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified September 22 19:36 EDT 2021. Contains 347608 sequences. (Running on oeis4.)