OFFSET
0,1
COMMENTS
This is essentially the same sequence as A359143 (so this too is a finite sequence), the difference being that it includes the terms before any digits are cancelled. Let S be the digit string of a(n), replacing a minus sign if present by 0.
Let T = S concatenated with the digit-sum of S.
LINKS
Michael De Vlieger, Table of n, a(n) for n = 0..10000
Michael De Vlieger, Scatterplot of log_10(abs(a(n))), n = 1..10^3, showing negative terms in red.
Michael De Vlieger, Scatterplot of log_10(abs(a(n))), n = 1..10^4, showing negative terms in red.
Michael De Vlieger, Scatterplot of log_10(abs(a(n))), showing all terms, with negative terms in red.
EXAMPLE
The digit strings for the initial terms are:
11,
112,
1124,
11248,
1124816,
2486,
248620,
4860,
486018,
48601827,
4860182736,
486018273645,
8601827365,
860182736546,
86018273654656,
8601827365465667,
860182736546566780,
601273654656670,
60127365465667064,
01273545704,
0127354570438,
012735457043849,
01273545704384962,
0127354570438496270,
1273545743849627,
127354574384962777,
12735457438496277791,
273545743849627779, ...
The sequence itself is obtained by replacing the leading zeros by minus signs.
For example, after the term 601273654656670, we first append its digit-sum 64, getting 60127365465667064. Since the leading digit 6 is present in 64, we cancel all the 6's, getting 01273545704. The corresponding term in the sequence is -1273545704.
MATHEMATICA
a[1] = {1, 1}; nn = 28;
Do[Which[ListQ[m], k = m; Clear[m],
FreeQ[#3, #2], Set[k, #1~Join~#3],
True, Set[k, #1~Join~#3];
Set[m, DeleteCases[#1~Join~#3, #2]]] & @@
{#, First[#], IntegerDigits@ Total[#]} &[a[n - 1]];
Set[a[n], k], {n, 2, nn}];
Array[(1 - 2 Boole[First[#] == 0])*FromDigits@ # &@ a[#] &, nn] (* Michael De Vlieger, Mar 16 2023 *)
CROSSREFS
KEYWORD
sign,base,fini
AUTHOR
N. J. A. Sloane, Mar 16 2023
EXTENSIONS
More than the usual number of terms are shown in order to clarify the differences from A359143.
STATUS
approved