cp's OEIS Frontend

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.

A297826 Solution (a(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.

This page as a plain text file.
%I A297826 #5 Feb 04 2018 17:28:15
%S A297826 1,2,7,9,11,15,18,21,22,24,28,29,33,34,40,42,43,45,51,51,53,59,59,61,
%T A297826 63,65,69,74,76,77,79,81,83,87,90,91,93,95,97,101,104,107,110,111,113,
%U A297826 117,118,120,122,126,131,133,136,139,140,142,146,147,153,155
%N A297826 Solution (a(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 A297826 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 A297826 (1) 0 <= a(k) - a(k-1) <= 6 for k>=1;
%C A297826 (2) if d is in {0,1,2,3,4,5,6}, then a(k) = a(k-1) + d for infinitely many k.
%C A297826 ***
%C A297826 See A297830 for a guide to related sequences.
%H A297826 Clark Kimberling, <a href="/A297826/b297826.txt">Table of n, a(n) for n = 0..10000</a>
%e A297826 a(0) = 1, a(1) = 2, b(0) = 3, b(1) = 4, so that a(2) = 7.
%e A297826 Complement: (b(n)) = (3, 4, 5, 6, 8,10,12,13,14,16, ...)
%t A297826 mex[list_, start_] := (NestWhile[# + 1 &, start, MemberQ[list, #] &]);
%t A297826 tbl = {}; a[0] = 1; a[1] = 2; b[0] = 3; b[1] = 4;
%t A297826 a[n_] := a[n] = a[1]*b[n - 1] - a[0]*b[n - 2] + n;
%t A297826 b[n_] := b[n] = mex[tbl = Join[{a[n], a[n - 1], b[n - 1]}, tbl], b[n - 1]];
%t A297826 Table[a[n], {n, 0, 300}]  (* A297826 *)
%t A297826 Table[b[n], {n, 0, 300}]  (* A297997 *)
%t A297826 (* _Peter J. C. Moses_, Jan 03 2017 *)
%Y A297826 Cf. A297997, A297830.
%K A297826 nonn,easy
%O A297826 0,2
%A A297826 _Clark Kimberling_, Feb 04 2018