OFFSET
0,3
COMMENTS
Here p(n) = n + a(d(n)) - d(n) for n > 0 where d(n) = c(b(n)), b(n) = f(g(n) + 2) - n - 1 for n > 0 with b(0) = 0, c(n) = f(g(n) + 3) - n - 1 for n > 0 with c(0) = 0, f(n) = A000045(n) and where g(n) = A072649(n). To compute p(n) we need to know a(d(n)) and to compute a(n) we need to know p(e(n)) where e(n) = n - f(g(n) + 1) for n > 0 with e(0) = 0 in the sense that we can rewrite a(n) = n + [e(n) > 0]*(a(h(n)) - h(n) ...) (here h(n) = d(e(n))) as a(n) = n - e(n) + [e(n) > 0]*(p(e(n)) ...).
LINKS
FORMULA
a(n) = n + [e(n) > 0]*(a(h(n)) - h(n) - f(s(n)) + [s(n) mod 2 = g(n) mod 2]*f(g(n) - 2)) for n > 0 with a(0) = 0 where s(n) = g(e(n) - 1) (here we also consider that g(0) = 0), h(n) = d(e(n)), e(n) = n - f(g(n) + 1) for n > 0 with e(0) = 0, d(n) = c(b(n)), b(n) = f(g(n) + 2) - n - 1 for n > 0 with b(0) = 0, c(n) = f(g(n) + 3) - n - 1 for n > 0 with c(0) = 0, f(n) = A000045(n) and where g(n) = A072649(n).
PROG
(PARI) g(n)=local(m); if(n<1, 0, m=0; until(fibonacci(m)>n, m++); m-2) \\ from A072649
d(n) = { while(n>0, my(A=g(n), B=fibonacci(A)); n-=B; if(B>n, break)); n; }
a(n) = if(n>0, my(A=g(n), B=fibonacci(A+1), C=n-B, D=d(C), E=g(C-1)); n + if(C>0, a(D) - D - fibonacci(E) + if(E%2==A%2, fibonacci(A-2))))
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Mikhail Kurkov, Mar 13 2023 [verification needed]
STATUS
approved