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 A022940 #22 Oct 09 2018 06:25:35 %S A022940 1,3,5,9,15,22,30,40,51,63,76,90,106,123,141,160,180,201,224,248,273, %T A022940 299,326,354,383,414,446,479,513,548,584,621,659,698,739,781,824,868, %U A022940 913,959,1006,1054,1103,1153,1205,1258,1312,1367,1423,1480 %N A022940 a(n) = a(n-1) + b(n-2) for n >= 3, a( ) increasing, given a(1) = 1, a(2) = 3; where b( ) is complement of a( ). %C A022940 From _Clark Kimberling_, Oct 30 2017: (Start) %C A022940 The complementary sequences a() and b() are uniquely determined by the titular equation and initial values. The initial values of each sequence in the following guide are a(0) = 1, a(2) = 3, b(0) = 2, b(1) = 4: %C A022940 here: a(n) = a(n-1) + b(n-2) [with a different offset] %C A022940 A294397: a(n) = a(n-1) + b(n-2) + 1; %C A022940 A294398: a(n) = a(n-1) + b(n-2) + 2; %C A022940 A294399: a(n) = a(n-1) + b(n-2) + 3; %C A022940 A294400: a(n) = a(n-1) + b(n-2) + n; %C A022940 A294401: a(n) = a(n-1) + b(n-2) + 2*n. %C A022940 (End) %H A022940 Ivan Neretin, <a href="/A022940/b022940.txt">Table of n, a(n) for n = 1..10000</a> %H A022940 Clark Kimberling, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL10/Kimberling/kimberling26.html">Complementary equations</a>, J. Int. Seq. 19 (2007), 1-13. %e A022940 a(1) = 1, a(2) = 3, b(1) = 2, b(2) = 4, so that a(3) = a(2) + a(1) + b(2) = 5. %e A022940 Complement: {b(n)} = {2, 4, 6, 7, 8, 10, 11, 12, 13, 14, 16, ...} %t A022940 Fold[Append[#1, #1[[-1]] + Complement[Range[Max@#1 + 1], #1][[#2]]] &, {1, 3}, Range[50]] (* _Ivan Neretin_, Apr 04 2016 *) %Y A022940 Cf. A005228 and references therein. %Y A022940 Cf. A293076, A293765, A294381. %K A022940 nonn,easy %O A022940 1,2 %A A022940 _Clark Kimberling_