OFFSET
1,2
LINKS
David Consiglio, Jr., Table of n, a(n) for n = 1..1000
EXAMPLE
a(3)-a(2) = 5 because 1=a(1), 2=(a(2)-a(1), 3=a(2), 4=a(1)+a(2)= maximum of the auxiliary set
PROG
(Python)
keep = [1, 3]
for aa in range(999):
....flag = False
....temp = set()
....for x in keep:
........for y in keep:
............if x != y:
................temp.add(x+y)
................temp.add(abs(x-y))
............temp.add(x)
............temp.add(y)
....now = sorted(list(temp))
....for x in range(1, len(now)):
........if now[x] - now[x-1] != 1:
............keep.append(keep[-1]+now[x-1]+1)
............flag = True
............break
....if not flag:
........keep.append(keep[-1]+max(now)+1)
with open("A126430b.txt", "w") as g:
....for x, y in enumerate(keep):
........g.write(str(x+1)+" "+str(y)+"\n")
# David Consiglio, Jr., Oct 09 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
Philippe LALLOUET (philip.lallouet(AT)wanadoo.fr), Mar 11 2007
EXTENSIONS
More terms from David Consiglio, Jr., Oct 09 2015
STATUS
approved