login
A392158
For each starting value n, the number of distinct terms in the sequence obtained by repeatedly doubling and then deleting repeated digits (keeping the first occurrence) until a term repeats.
1
30, 29, 35, 28, 31, 34, 37, 27, 40, 30, 30, 33, 13, 36, 36, 26, 36, 39, 39, 29, 42, 29, 35, 32, 32, 12, 32, 35, 28, 35, 38, 25, 35, 35, 38, 38, 37, 38, 48, 28, 12, 41, 38, 28, 41, 34, 41, 31, 51, 31, 21, 11, 44, 31, 31, 34, 37, 27, 40, 34, 34, 37, 34, 24, 10, 47, 44, 34
OFFSET
1,1
COMMENTS
It will be very interesting to find the numbers that the sequence does not end in 104, for example 41 and 82, and also if there are other numbers that are the end of the sequences besides 104 and 164 (see examples).
From Michael S. Branicky, Jan 01 2026: (Start)
Computing A392158(k) for all 8877691 terms in A010784, the maximum is 68, achieved by:
380947615, 2840136957, 3129508674, 3145086729, 3401286957, 3419875206, 3809472615, 3809476215
So, the maximum term here <= 69. Indeed, a(1904738075) = a(380947615*10/2) = 69.
Below are all ending terms, along with the first, last, and number of terms in A010784 that lead to it:
End First Last Number
65 65 6890134752 1730
104 1 9876542130 7711661
130 130 9874521630 125045
164 41 9876543210 602389
208 208 208 1
260 260 260 1
328 328 328 1
416 416 9876245310 95141
520 321 9874621053 341720
832 832 832 1
The above all arise since the single step map x -> A137564(2*x) here has a closed orbit:
65 -> 130 -> 260 -> 520 -> 104 -> 208 -> 416 -> 832 -> 164 -> 328 -> 65.
(End)
EXAMPLE
a(1) = 30 because the sequence is 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 653, 1306, 261, 52, 104, 208, 416, 832, 164, 328, 65, 130, 260, 520 and then repeats 104.
a(3) = 29 because the sequence is 3, 6, 12, 24, 48, 96, 192, 384, 768, 1536, 3072, 614, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 653, 1306, 261, 52, 104, 208, 416, 832, 164, 328, 65, 130, 260, 520 and then repeats 104.
a(41) = 12 because the sequence is 41, 82, 164, 328, 65, 130, 260, 520, 104, 208, 416, 832 and then repeats 164.
MATHEMATICA
a[n_] := -1 + Length@ NestWhileList[FromDigits[DeleteDuplicates[IntegerDigits[2*#]]] &, n, UnsameQ, All]; Array[a, 100] (* Amiram Eldar, Jan 01 2026 *)
PROG
(Python)
def f(n): # A137564
seen, out, s = set(), "", str(n)
for d in s:
if d not in seen: out += d; seen.add(d)
return int(out)
def a(n):
seen = set()
while n not in seen:
seen.add(n)
n = f(2*n)
return len(seen)
print([a(n) for n in range(1, 69)]) # Michael S. Branicky, Jan 01 2026
CROSSREFS
Sequence in context: A056998 A057348 A057350 * A244948 A282130 A125564
KEYWORD
nonn,base
AUTHOR
Rodolfo Kurchan, Jan 01 2026
STATUS
approved