OFFSET
1,2
LINKS
Max A. Alekseyev and N. J. A. Sloane, On Kaprekar's Junction Numbers, arXiv:2112.14365, 2021; Journal of Combinatorics and Number Theory 12:3 (2022), 115-155.
MAPLE
f:=proc(n) option remember; local B, M;
if n<=1 then RETURN([0, 0]);
else
B:=(f(ceil(n/2))[2] + f(floor(n/2))[2] + 2)/2;
M:=3^B+f(floor(n/2))[2]+1; RETURN([B, M]); fi;
end proc;
[seq(f(n)[2], n=1..7)];
CROSSREFS
Cf. A230639.
Related base-3 sequences: A053735, A134451, A230641, A230642, A230643, A230853, A230854, A230855, A230856, A230639, A230640, A010063 (trajectory of 1)
KEYWORD
nonn,base
AUTHOR
N. J. A. Sloane, Oct 31 2013
STATUS
approved