A081692 Define two sequences by A_n = mex{A_i,B_i : 0 <= i < n}, B_n = B_{n-1} + (A_n-A_{n-1})(A_n-A_{n-1}+1), where the mex of a set is the smallest nonnegative integer not in the set. Sequence gives A_n. B_n is in A081693.
0, 1, 3, 4, 5, 6, 7, 9, 11, 13, 15, 17, 18, 19, 20, 21, 23, 24, 25, 26, 27, 29, 30, 31, 32, 33, 35, 36, 37, 38, 39, 41, 42, 43, 44, 45, 47, 49, 51, 53, 55, 56, 57, 58, 59, 61, 63, 65, 67, 69, 70, 71, 72, 73, 75, 77, 79, 81, 83, 84, 85, 86, 87, 89, 91, 93, 95, 97, 98, 99, 100
Offset: 0
Keywords
Links
- A. S. Fraenkel, Home Page
- A. S. Fraenkel, New games related to old and new sequences, INTEGERS, Electronic J. of Combinatorial Number Theory, Vol. 4, Paper G6, 2004.
Programs
-
Mathematica
mex[{}]=0; mex[s_] := Complement[Range[0, 1+Max@@s], s][[1]]; A[0]=B[0]=0; A[n_] := A[n]=mex[Flatten[Table[{A[i], B[i]}, {i, 0, n-1}]]]; B[n_] := B[n]=B[n-1]+(A[n]-A[n-1])*(A[n]-A[n-1]+1); a := A
Formula
Let a(n) = this sequence, b(n) = A081691. Then a(n) = mex{ a(i), b(i) : 0 <= i < n}, b(0) = 0, b(n) = 2(b(n-1) - a(n-1)) + a(n) + 1.
Extensions
More terms from Vladeta Jovovic, Apr 04 2003
Comments