OFFSET
1,2
COMMENTS
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.
FORMULA
Define i by 2^(i-1) < n <= 2^i. Then it appears that
a(n) = 2^2^2^...^2^x
a tower of height i+3, containing i+2 2's, where x is in the range 0 < x <= 1.
For example, if n=7, i=3, and
a(7) = 2^4233+130 = 2^2^2^2^2^.88303276...
Note also that i+2 = A230864(a(n)).
EXAMPLE
The terms are a(1) = 0, a(2) = 2^2+0+1, a(3) = 2^7+0+1, a(4) = 2^12+5+1, a(5) = 2^136+5+1, a(6) = 2^160+129+1, a(7) = 2^4233+129+1, a(8) = 2^8206+4102+1, a(9) = 2^k+4102+1 with k=2^136+4110, ... .
The length (in bits) of the n-th term is A230302(n)+1.
MAPLE
f:=proc(n) option remember; local B, M;
if n<=1 then RETURN([0, 0]);
else
if (n mod 2) = 0 then B:=2*f(n/2)[2]+2;
else B:=f((n+1)/2)[2]+f((n-1)/2)[2]+2; fi;
M:=2^B+f(floor(n/2))[2]+1; RETURN([B, M]); fi;
end proc;
[seq(f(n)[2], n=1..6)];
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Oct 24 2013; Mar 26 2014
EXTENSIONS
a(1)-a(8) were found by Donovan Johnson, Oct 22 2013.
STATUS
approved