This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A117821 #6 Sep 03 2017 11:26:28 %S A117821 1,1,4,2,10,7,11,25,28,44,62,95,145,227,358,570,912,1465,2359,3805, %T A117821 6144,9928,16050,25955,41981,67911,109866,177750,287588,465309,752867, %U A117821 1218145,1970980,3189092,5160038,8349095,13509097,21858155,35367214 %N A117821 a(0) = a(1) = 1; for n >= 2, a(n) = a(n-1) + a(n-2) - n if that number is positive and not already in the sequence, otherwise a(n) = a(n-1) + a(n-2) + n. %p A117821 a[0]:=1: a[1]:=1: A:={1}: for n from 2 to 40 do if a[n-1]+a[n-2]-n>0 and member(a[n-1]+a[n-2]-n,A)=false then a[n]:=a[n-1]+a[n-2]-n: A:=A union {a[n-1]+a[n-2]-n} else a[n]:=a[n-1]+a[n-2]+n: A:=A union {a[n-1]+a[n-2]+n} fi: od: seq(a[n],n=0..40); # _Emeric Deutsch_, Apr 30 2006 %Y A117821 Cf. A005132, A079053, A117822, A117823, A117824. %K A117821 nonn,easy %O A117821 0,3 %A A117821 _N. J. A. Sloane_, Apr 30 2006 %E A117821 More terms from _Benoit Cloitre_ and _Emeric Deutsch_, Apr 30 2006