A294552 Solution of the complementary equation a(n) = a(n-1) + a(n-2) + b(n-1) + b(n-2) + n, where a(0) = 1, a(1) = 2, b(0) = 3, and (a(n)) and (b(n)) are increasing complementary sequences.
1, 2, 12, 26, 53, 97, 171, 292, 490, 812, 1336, 2186, 3563, 5793, 9403, 15246, 24702, 40004, 64765, 104831, 169661, 274560, 444292, 718927, 1163298, 1882307, 3045690, 4928085, 7973866, 12902045, 20876008, 33778153, 54654264, 88432523, 143086896, 231519531
Offset: 0
Examples
a(0) = 1, a(1) = 2, b(0) = 3, so that b(1) = 4 (least "new number"); a(2) = a(1) + a(0) + b(1) + b(0) + 2 = 12. Complement: (b(n)) = (3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 14, 15, ...).
Links
- Clark Kimberling, Complementary equations, J. Int. Seq. 19 (2007), 1-13.
Programs
-
Mathematica
a[0] = 1; a[1] = 2; b[0] = 3; b[1] = 4; a[n_] := a[n] = a[n - 1] + a[n - 2] + b[n - 1] + b[n - 2] + n; j = 1; While[j < 5, k = a[j] - j - 1; While[k < a[j + 1] - j + 1, b[k] = j + k + 2; k++]; j++]; u = Table[a[n], {n, 0, k}] (* A294552 *) Table[b[n], {n, 0, 20}] (* complement *)
Extensions
Edited by Clark Kimberling, Dec 21 2017
Comments