OFFSET
0,3
COMMENTS
The sequence a(n) is a permutation of the nonnegative integers.
The corresponding Fibonacci numbers are 1, 8, 21, 55, 89, 144, 233, 377, 377, 610, 610, 987, 987, 1597, 1597, 2584, 2584, 4181, 6765, 10946, 10946, 17711, 28657, 28657, 28657, 28657, 28657,...
EXAMPLE
Let F(n) the n-th Fibonacci number.
a(0)= 0 added to the next single term 1 is equal to F(1)=F(2)=1;
a(1)= 1 added to the next two terms (2,5) is equal to F(6)=8;
a(2)= 2 added to the next three terms (5,3,11) is equal to F(7)=21;
a(3)= 5 added to the next four terms (3,11,4,32) is equal to F(10)=55;
a(4)= 3 added to the next five terms (11,4,32,6,33) is equal to F(11)=89.
MAPLE
nn:=300:T:=array(1..nn):T[1]:=0:T[1]:=1:kk:=2:lst:={0, 1}:
for n from 2 to nn do:
ii:=0:
for k from 1 to 12000 while(ii=0)do:
if {k} intersect lst = {}
then
ii:=1:lst:=lst union {k}:kk:=kk+1:T[kk]:=k:
else
fi:
od:
jj:=0:n0:=nops(lst):s:=s:=sum(āT[i]ā, āiā=1..n0):
for p from 1 to 12000 while(jj=0) do:
z1:=sqrt(5*(s+p)^2+4):z2:=sqrt(5*(s+p)^2-4):
if (z1=floor(z1) or z2=floor(z2)) and {p} intersect lst={}
then
jj:=1:lst:=lst union {p}:kk:=kk+1:T[kk]:=p:
else
fi:
od:
od:
print(T):
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Lagneau, Aug 05 2016
STATUS
approved