login
The orbit of n under iterations of x -> c(x)*(10^L(x-c(x))-1) + x, where c(x) = floor(x^(1/3))^3, L(x) = floor(log_10(max(x,1))+1), enters a pseudo-loop x(k) = a^3 * 10^((k-k0)*L(b)) + b beyond some k0. This sequence lists the a-values.
2

%I #12 Apr 08 2024 18:55:26

%S 18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,883,883,883,883,

%T 883,883,883,883,883,581,581,581,581,581,581,581,581,581,581,13,13,13,

%U 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,8,8,8,8

%N The orbit of n under iterations of x -> c(x)*(10^L(x-c(x))-1) + x, where c(x) = floor(x^(1/3))^3, L(x) = floor(log_10(max(x,1))+1), enters a pseudo-loop x(k) = a^3 * 10^((k-k0)*L(b)) + b beyond some k0. This sequence lists the a-values.

%C The iterated function can also be defined as x -> concatenate(c(x), A055400(x)), where c = A048762 gives the largest perfect cube <= x and x-c(x) = A055400(x) is the "cube excess" of x. L = A055642 gives the number of decimal digits.

%C The corresponding b-values are listed in A369861.

%H Eric Angelini, <a href="https://cinquantesignes.blogspot.com/2024/04/pseudo-loops-with-cubes.html">Pseudo-loops with cubes</a>, and post to math-fun discussion list; April 1, 2024

%e Starting with 1, we get 1 -> 10 -> 82 (since 8 is the largest cube <= 10, at distance 2) -> 6418 (since the cube 64 is at distance 18) -> 5832586 (since 5832 = 18^3 is at distance 586) -> 5832000586 (since 180^3 is again at distance 586) -> ...: Each time 3 '0's will be inserted in front of the remainder which remains always the same, as does the cube root a(1) = 18, up to factors of 10.

%e Starting with 2, we get 2 -> 11 (since the largest cube <= 2 is 1, at distance 1) -> 83 (since largest cube <= 11 is 8, at distance 2) -> 6419 (since the cube 64 is at distance 19) -> 5832587 (since 5832 = 18^3 is at distance 587). We see that in this sequence each term is just one more than that of the preceding sequence, so the cube root remains the same, a(2) = a(1) = 18.

%e For n = 18, we get 18 -> 810 (since the largest cube <= 18 is 8, at distance 10) -> 72981 (since the cube 729 is at distance 81) -> 689214060 (since 68921 = 41^3 is at distance 4060) -> 688465387748673 (since 688465387 = 883^3 is at distance 748673), from where on the cube root a(18) = 883 gets an additional factor 10 at each step, but the cube excess A055400 remains the same, A369861(18) = 748673.

%e See A369861 for more examples.

%o (PARI) A369860(n)={until(, my(c=sqrtnint(n, 3), v=valuation(c, 10), L=logint(max(n-c^3, 1), 10)+1); L==v*3 && return(c/10^v); n += c^3*(10^L-1))}

%o (Python)

%o import sympy # for integer_nthroot (A048766), multiplicity (A122840)

%o def A369860(n: int):

%o while True:

%o C = sympy.integer_nthroot(n, 3)[0]; L = A055642(n-C**3)

%o if sympy.multiplicity(10, C)*3 == L: return C//10**(L//3)

%o n += C**3 * (10**L - 1)

%Y Cf. A000578 (cubes), A048766 (cube root), A048762 (largest cube <= n), A055400 (cube excess), A055642 (length of n in base 10), A122840 (10-valuation of n).

%Y Cf. A369861 (b-values).

%K nonn,base

%O 1,1

%A _M. F. Hasler_, Apr 05 2024