OFFSET
0,3
COMMENTS
This sequence is a variant of A243658 where the additions are carried in the opposite order; as (i, j) -> noz(i + j) is not associative in general we obtain another sequence.
This sequence is conjectured to be bounded. This could be explained by the fact that the zeros appearing in the last steps of the calculation (when adding small values) erode the number of digits of the intermediate sums.
The distinct values among the first 1000000 terms are: 0, 1, 3, 6, 9, 12, 15, 18, 19, 24, 27, 28, 37, 39, 42, 54, 57, 64, 69, 72, 82, 84, 87, 99, 177, 289.
LINKS
Rémy Sigrist, Table of n, a(n) for n = 0..10000 (corrected by Paolo Xausa, Apr 17 2024)
EXAMPLE
For n = 16:
- noz(15 + 16) = noz(31) = 31,
- noz(14 + 31) = noz(45) = 45,
- noz(13 + 45) = noz(58) = 58,
- noz(12 + 58) = noz(70) = 7,
- noz(11 + 7) = noz(18) = 18,
- noz(10 + 18) = noz(28) = 28,
- noz(9 + 28) = noz(37) = 37,
- noz(8 + 37) = noz(45) = 45,
- noz(7 + 45) = noz(52) = 52,
- noz(6 + 52) = noz(58) = 58,
- noz(5 + 58) = noz(63) = 63,
- noz(4 + 63) = noz(67) = 67,
- noz(3 + 67) = noz(70) = 7,
- noz(2 + 7) = noz(9) = 9,
- noz(1 + 9) = noz(10) = 1,
- hence a(16) = 1.
MATHEMATICA
noz[n_] := FromDigits[DeleteCases[IntegerDigits[n], 0]];
A321480[n_] := Block[{k = n}, Nest[noz[--k + #] &, n, Max[0, n-1]]];
Array[A321480, 100, 0] (* Paolo Xausa, Apr 17 2024 *)
PROG
(PARI) a(n, base=10) = { my (t=n); forstep (k=n-1, 1, -1, t = fromdigits(select(sign, digits(t+k, base)), base)); t } \\ corrected by Rémy Sigrist, Apr 17 2024
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Nov 11 2018
EXTENSIONS
a(10), a(20), a(30), a(40), a(50) and a(60) corrected by Paolo Xausa, Apr 17 2024
STATUS
approved