login
A378895
a(n) is n times the number of missing distinct digits, k, of the terms of the sequence so far, counted from start and thereafter from every term that immediately follows any term with a value of 0.
0
10, 16, 21, 24, 25, 24, 28, 24, 27, 20, 22, 24, 26, 28, 30, 16, 17, 18, 19, 0, 210, 154, 115, 120, 125, 130, 108, 84, 87, 60, 31, 32, 33, 34, 35, 36, 37, 38, 39, 0, 410, 294, 215, 176, 90, 92, 94, 96, 98, 50, 51, 52, 53, 0, 550, 448, 342, 232, 236, 180, 122
OFFSET
1,1
COMMENTS
By definition, no two terms with the value of 0 can be next to each other, because all terms immediately following a term of 0 value invariably equal to 10*n.
Beyond sufficiently large n's, 0 value terms will become increasingly frequent, and with expected probability, they will tend to occur at some runs as every second term. Yet, this is not a certainty since large n's exist with a single or just a few distinct digits. More to the point, the products of n's and the number of missing distinct digits of the terms in the relevant sections of the sequence may not necessarily always yield immediately new distinct digits for the count.
EXAMPLE
a(1) = 10 because k = 10 distinct digits, namely 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9, are missing from the terms of the sequence before n = 1, and this number multiplied by n = 1 is 10.
a(2) = 16 because k = 8 distinct digits are missing from the terms so far in the sequence as a(1) containing two distinct digits, 0 and 1, out of the possible ten; so 8 multiplied by n = 2 results in 16.
a(54) = 0 because the terms a(41)...a(53) contain all the ten distinct digits, the digit 3 in a(53) = 53 completing finally the set, and so the number of missing distinct digits k is 0, and 0 times 54 being 0 as a result.
a(55) = 550 since new count of the missing distinct digits of terms starts following a(54) = 0, and that count is k = 10, and therefore 55 times 10 is 550.
MATHEMATICA
seq[len_] := Module[{s = {}, i}, While[Length[s] < len, i = Position[s, 0]; i = If[i == {}, 0, i[[-1, 1]]] + 1; AppendTo[s, (Length[s] + 1) * Count[Range[0, 9], _?(FreeQ[Union @@ IntegerDigits[s[[i ;; -1]]], #] &)]]]; s]; seq[100] (* Amiram Eldar, Dec 10 2024 *)
CROSSREFS
Sequence in context: A129848 A004261 A083118 * A238204 A242057 A245024
KEYWORD
nonn,base
AUTHOR
Tamas Sandor Nagy, Dec 10 2024
STATUS
approved