OFFSET
1,4
COMMENTS
A variation of the Hofstadter-Conway $10,000 sequence (A004001).
Similar with Newman generalization on A004001 (see A005350 and Kleitman's solution in Links section of A005350), a_i(n) is unbounded and slow sequence for all i >= 1 where a_i(n) = a_i(a_i(n-2)) + a_i(n-a_i(n-1)) with i + 1 initial conditions a_i(1) = a_i(2) = ... = a_i(i+1) = 1. In particular, a_1(n) = ceiling(n/2).
LINKS
Altug Alkan, Proof of slowness
FORMULA
a(n+1) - a(n) = 0 or 1 for all n >= 1 and a(n) hits every positive integer.
MAPLE
a:=proc(n) option remember: if n<4 then 1 else procname(procname(n-2))+procname(n-procname(n-1)) fi; end: seq(a(n), n=1..100); # Muniru A Asiru, Jun 26 2018
PROG
(PARI) a=vector(99); for(n=1, 3, a[n] = 1); for(n=4, #a, a[n] = a[a[n-2]] + a[n-a[n-1]]); a
(GAP) a:=[1, 1, 1];; for n in [4..100] do a[n]:=a[a[n-2]]+a[n-a[n-1]]; od; a; # Muniru A Asiru, Jun 26 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Altug Alkan, Jun 20 2018
STATUS
approved