A325599 Difference sequence of A325597.
1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 1, 2, 1, 1, 1, 2, 1, 1, 2, 1, 1, 1, 2, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 1, 2, 1, 2, 1, 1, 1, 2, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 1, 2, 1, 2, 1, 1, 1, 2, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 1, 2, 1, 2, 1, 1, 1, 2
Offset: 1
Links
- Clark Kimberling, Table of n, a(n) for n = 1..10000
Crossrefs
Cf. A325597.
Programs
-
Mathematica
mex[list_, start_] := (NestWhile[# + 1 &, start, MemberQ[list, #] &]); a = {1}; Do[AppendTo[a, mex[Rest[2 a] + Most[a], Last[a] + 1]], {60}]; a (* A325597 *) c = Complement[Range[Last[a]], a] (* A325598 *) da = Differences[a] (* A325599 *) Flatten[Position[da, 1]] (* A325600 *) Flatten[Position[da, 2]] (* A325601 *) (* Peter J. C. Moses, May 07 2019 *)
Comments