# [seqfan] Re: difference of Fibonacci's

Richard J. Mathar mathar at mpia-hd.mpg.de
Thu Aug 10 16:54:17 CEST 2017

```On behalf of http://list.seqfan.eu/pipermail/seqfan/2017-August/017856.html

31 = 34-3 is also in the sequence.

1, "=", -1, "-", 0
1,                              2, "=", -1, "-", 1
2,                              3, "=", -3, "-", 0
3,                              4, "=", -3, "-", 1
4,                              5, "=", -3, "-", 2
5,                              6, "=", -3, "-", 3
6,                               7, "=", 1, "-", 8
7,                              8, "=", -8, "-", 0
8,                              9, "=", -8, "-", 1
9,                              10, "=", -8, "-", 2
10,                              11, "=", -8, "-", 3
11,                              12, "=", 1, "-", 13
12,                              13, "=", -8, "-", 5
13,                             14, "=", -1, "-", 13
14,                              16, "=", -8, "-", 8
16,                              18, "=", 3, "-", 21
18,                              19, "=", 2, "-", 21
19,                              20, "=", 1, "-", 21
20,                             21, "=", -21, "-", 0
21,                             22, "=", -21, "-", 1
22,                             23, "=", -21, "-", 2
23,                             24, "=", -21, "-", 3
24,                             26, "=", -21, "-", 5
26,                             29, "=", -21, "-", 8
29,                              31, "=", 3, "-", 34
31,                              32, "=", 2, "-", 34
32,

RJM

isdiffF := proc(n)
for Fi from 0 do
for Fj from Fi-1 by -1 do
if combinat[fibonacci](Fi)-combinat[fibonacci](Fj) = n then
print(n,"=",combinat[fibonacci](Fj),"-",combinat[fibonacci](Fi)) ;
return true;
elif combinat[fibonacci](Fi)-combinat[fibonacci](Fj) > n then
break;
end if;
end do:
if combinat[fibonacci](Fi) -combinat[fibonacci](Fi-1) > n then
return false;
end if;
end do:
end proc:
for n from 1 to 32 do
if isdiffF(n) then
printf("%d,",n)
end if;
end do:
```