login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A320063
A sequence which changes by one or zero: a(n) = a(n-1-a(a(n-1))) + a(a(a(n-1))) for n > 1, a(n) = n for n < 2.
2
0, 1, 1, 2, 2, 3, 3, 3, 4, 4, 4, 5, 6, 6, 6, 7, 8, 8, 8, 8, 9, 10, 10, 10, 10, 11, 12, 12, 13, 13, 13, 13, 14, 15, 15, 15, 16, 17, 17, 17, 17, 18, 19, 19, 19, 20, 20, 21, 21, 21, 21, 21, 22, 23, 23, 23, 24, 24, 25, 26, 27, 27, 27, 27, 27, 28, 28, 29, 29, 29
OFFSET
0,4
COMMENTS
This is similar to a problem that I had in the Monthly 35 years ago. The solution then was by Daniel Kleitman.
LINKS
Abraham Isgur, Mustazee Rahman, On variants of Conway and Conolly's Meta-Fibonacci recursions, arXiv:1407.0425 [math.CO], 2014.
T. Kubo and R. Vakil, On Conway's recursive sequence, Discr. Math. 152 (1996), 225-252.
David Newman and Daniel J. Kleitman, Solution to Problem E3274, Amer. Math. Monthly, 98 (1991), 958-959.
MAPLE
a:= proc(n) option remember; `if`(n<2, n,
a(n-1-a(a(n-1)))+a(a(a(n-1))))
end:
seq(a(n), n=0..100); # Alois P. Heinz, Oct 08 2018
MATHEMATICA
f[0] = 0;
f[1] = 1;
f[n_] := f[n] = +f[n - 1 - f[f[n - 1]]] + f[f[f[n - 1]]];
Table[f[i], {i, 1, 30}]
CROSSREFS
Cf. A093878.
Sequence in context: A057364 A060144 A107347 * A189717 A219519 A330393
KEYWORD
nonn
AUTHOR
David S. Newman, Oct 04 2018
STATUS
approved