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 A297997 #8 Nov 06 2018 12:45:55 %S A297997 3,4,5,6,8,10,12,13,14,16,17,19,20,23,25,26,27,30,31,32,35,36,37,38, %T A297997 39,41,44,46,47,48,49,50,52,54,55,56,57,58,60,62,64,66,67,68,70,71,72, %U A297997 73,75,78,80,82,84,85,86,88,89,92,94,96,98,99,100,102,103 %N A297997 Solution (b(n)) of the near-complementary equation a(n) = a(1)*b(n-1) - a(0)*b(n-2) + n, where a(0) = 1, a(1) = 2, b(0) = 3, b(1) = 4, and (b(n)) is the increasing sequence of positive integers not in (a(n)). See Comments. %C A297997 The sequence (a(n)) generated by the equation a(n) = a(1)*b(n-1) - a(0)*b(n-2) + n, with initial values as shown, includes duplicates; e.g. a(18) = a(19) = 51. If the duplicates are removed from (a(n)), the resulting sequence and (b(n)) are complementary. Conjectures: %C A297997 (1) 1 <= b(k) - b(k-1) <= 3 for k>=1; %C A297997 (2) if d is in {1,2,3}, then b(k) = b(k-1) + d for infinitely many k. %C A297997 *** %C A297997 See A297830 for a guide to related sequences. %H A297997 Clark Kimberling, <a href="/A297997/b297997.txt">Table of n, a(n) for n = 0..10000</a> %e A297997 a(0) = 1, a(1) = 2, b(0) = 3, b(1) = 4, so that a(2) = 7. %e A297997 Complement: (b(n)) = (3, 4, 5, 6, 8,10,12,13,14,16, ...) %t A297997 mex[list_, start_] := (NestWhile[# + 1 &, start, MemberQ[list, #] &]); %t A297997 tbl = {}; a[0] = 1; a[1] = 2; b[0] = 3; b[1] = 4; %t A297997 a[n_] := a[n] = a[1]*b[n - 1] - a[0]*b[n - 2] + n; %t A297997 b[n_] := b[n] = mex[tbl = Join[{a[n], a[n - 1], b[n - 1]}, tbl], b[n - 1]]; %t A297997 Table[a[n], {n, 0, 300}] (* A297826 *) %t A297997 Table[b[n], {n, 0, 300}] (* A297997 *) %t A297997 (* _Peter J. C. Moses_, Jan 03 2017 *) %Y A297997 Cf. A297997, A297830. %K A297997 nonn,easy %O A297997 0,1 %A A297997 _Clark Kimberling_, Feb 04 2018