login

Revision History for A095115

(Bold, blue-underlined text is an addition; faded, red-underlined text is a deletion.)

Showing entries 1-10 | older changes
a(1)=1. Given a(1),...,a(n-1), to find a(n), let S = {a(1), ..., a(n-1), |a(2)-a(1)|, ..., |a(n-1)-a(n-2)|}. Let d be the smallest positive integer not in S. Then a(n) is the smallest one of a(n-1)-d and a(n-1)+d which is a positive integer not in S union {d}.
(history; published version)
#11 by N. J. A. Sloane at Wed May 13 12:38:48 EDT 2015
STATUS

editing

approved

#10 by N. J. A. Sloane at Wed May 13 12:38:46 EDT 2015
CROSSREFS

Cf. A005228.

STATUS

approved

editing

#9 by N. J. A. Sloane at Wed May 13 12:38:30 EDT 2015
STATUS

editing

approved

#8 by N. J. A. Sloane at Wed May 13 12:38:28 EDT 2015
NAME

a(1)=1. Given a(1),...,a(n-1), to find a(n), let S = {a(1), ..., a(n-1), |a(2)-a(1)|, ..., |a(n-1)-a(n-2)|}. Let d be the smallest positive integer not in S. Then a(n) is the smallest one of a(n-1)-d and a(n-1)+d which is a positive integer not in S union {d}.

STATUS

approved

editing

#7 by N. J. A. Sloane at Tue Jun 24 01:08:37 EDT 2014
AUTHOR

_Dean Hickerson (dean.hickerson(AT)yahoo.com), _, following a suggestion of Leroy Quet, May 28 2004

Discussion
Tue Jun 24
01:08
OEIS Server: https://oeis.org/edit/global/2238
#6 by Charles R Greathouse IV at Wed Apr 09 10:14:37 EDT 2014
AUTHOR

Dean Hickerson (dean.hickerson(AT)yahoo.com), following a suggestion of Leroy Quet , May 28 2004

Discussion
Wed Apr 09
10:14
OEIS Server: https://oeis.org/edit/global/2149
#5 by N. J. A. Sloane at Wed Feb 05 20:18:03 EST 2014
AUTHOR

Dean Hickerson (dean.hickerson(AT)yahoo.com), following a suggestion of _Leroy Quet _ May 28 2004

Discussion
Wed Feb 05
20:18
OEIS Server: https://oeis.org/edit/global/2118
#4 by N. J. A. Sloane at Sat Oct 02 03:00:00 EDT 2010
LINKS

Leroy Quet, <a href="http://www.prism-of-spirals.net/">Home Page</a> (listed in lieu of email address)

KEYWORD

nonn,fini,full,new

#3 by N. J. A. Sloane at Fri Jan 09 03:00:00 EST 2009
LINKS

Leroy Quet, <a href="http://www.prism-of-spirals.net/">Home Page</a> (listed in lieu of email address)

KEYWORD

nonn,fini,full,new

AUTHOR

Dean Hickerson (dean.hickerson(AT)math.ucdavisyahoo.educom), following a suggestion of Leroy Quet (qq-quet(AT)mindspring.com), May 28 2004

#2 by N. J. A. Sloane at Fri Feb 24 03:00:00 EST 2006
MATHEMATICA

mex1[s_]:=Module[{n}, For[n=1, MemberQ[s, n], n++, Null]; n]; a[1]=1; a[n_]:=a[n]=Module[{as, d}, as=a/@Range[n-1]; as=Union[as, Abs[Drop[as, 1]-Drop[as, -1]]]; AppendTo[as, d=mex1[as]]; If[a[n-1]-d>0&&!MemberQ[as, a[n-1]-d], a[n-1]-d, If[ !MemberQ[as, a[n-1]+d], a[n-1]+d], False]]

KEYWORD

nonn,fini,full,new