OFFSET
1,2
COMMENTS
Do there exist arbitrarily large gaps between successive terms?
EXAMPLE
7 is a term because the concatenation of 7, 14, 21, 28 is 7142128 which has 7 digits.
21 is not a term because the concatenation of 21, 42, ..., 168 has 20 digits but concatenating this with 168+21 = 189 gives a number with 23 digits.
MATHEMATICA
SelfIncrementingQ[n_] := Module[{len=Length@IntegerDigits[n], num, c=1, numDigits=0},
numDigits = len*Ceiling[(10^len - n)/n];
If[numDigits >= n, Return[Mod[n, len] == 0]];
num = Ceiling[10^len/n]*n;
While[numDigits < n + 1,
If[(len + c)*Ceiling[(10^(len + c) - num)/n] >= n - numDigits,
Return[Mod[n - numDigits, len + c] == 0],
numDigits += (len + c)*Ceiling[(10^(len + c) - num)/n]
];
num += Ceiling[(10^(len + c) - num)/n]*n;
c++;
]
]
Select[Range[191], SelfIncrementingQ]
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Nicholas M. R. Frieler, Aug 19 2024
STATUS
approved