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”).

A227145
Numbers satisfying an infinite nested recurrence relation.
2
0, 1, 1, 2, 2, 2, 3, 3, 4, 4, 4, 4, 5, 5, 6, 6, 7, 7, 7, 8, 8, 9, 9, 9, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 13, 14, 14, 15, 15, 15, 16, 16, 17, 17, 17, 17, 18, 18, 19, 19, 20, 20, 20, 21, 21, 22, 22, 22, 22, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 27
OFFSET
1,4
COMMENTS
Conjecture: a(F_n) = F_{n-2} for n>1, where F_n is the n-th Fibonacci number.
Conjecture: a(n) ~ n*(3-sqrt(5))/2. -Jeffrey Shallit, Oct 12 2022
LINKS
Marcel Celaya and Frank Ruskey, Morphic words and nested recurrence relations, arxiv 1307.0153 (Jun 29 2013), [math.CO] (see page 11).
FORMULA
a(n) = n - 1 - a(n-1) - a(a(n-2)) - a(a(a(n-3))) - a(a(a(a(n-4)))) - ... with a(n) = 0 if n <= 1.
MAPLE
a:= proc(n) option remember; local i, r, s;
if n<2 then 0 else r, s:= n, 1;
for i while s>0 do r, s:= r-s, (a@@i)(n-i) od: r
fi
end:
seq(a(n), n=1..100); # Alois P. Heinz, Jul 04 2013
MATHEMATICA
a[n_] := a[n]= Which[n <= 1, 0, True, n - 1 -Sum[Nest[a, n - i, i], {i, 1, n}]]; Table[a[i], {i, 0, 30}] (* José María Grau Ribas, Jul 10 2013 *)
CROSSREFS
Cf. A060144.
Sequence in context: A278078 A094708 A302931 * A039730 A257807 A152595
KEYWORD
nonn
AUTHOR
Frank Ruskey, Jul 04 2013
STATUS
approved