3

This is from a closed question: What is the $n$th digit of this sequence?: What's the $n$th digit of the sequence where all natural numbers are repeated the time equal to itself:

$$122333\cdots1010101010101010101011\cdots$$


My results so far: First we compute how many digits are there from $10^{k-1}$ to $10^k-1, \forall k=1, 2, \ldots$

$$ a_k = k(10^{k-1} + \cdots + (10^k-1))=k\frac{10^{k-1}+10^k-1}{2} \cdot (9\cdot 10^{k-1}) $$

Then we compute the partial sum (define $S_0=0$) $$ S_m=\sum_{k=1}^m a_k = \sum_{k=0}^m \frac{9k}{2} \left(10^{2k-1}+10^{2k-2}-10^{k-1} \right)\\ =\frac{1}{198}(10^m-1)(99m \cdot 10^m - 10^m+10)$$ $$=5(10^m-1)\left(m\cdot 10^{m-1}-\frac{10^{m-1}-1}{10^2-1}\right)\tag 1 $$

I admit I cheated with WA.

For any $n \in \mathbb N$ we need to find $m$ such that $S_{m-1} < n \le S_m$, then we'd know the digit we are looking for is $$\text{the } \left(m- ((S_{m-1}-n) \pmod m ) \right)^{th} \text{ digit of the (} m \text{-digit number) }10^{m-1}-1 + \lceil \frac{n-S_{m-1}}{m}\rceil \tag 2$$

My questions:

a) Any single formula to get the digit in terms of $n$? I doubt there is one because getting $m$ out of $S_m$ from $(1)$ looks difficult but who knows.

b) If a) is not possible, any better alternative to $(2)$ given $m$?

Neat Math
  • 4,790
  • 1
    I think the digit D in the string 1223334444555556666667777777... 1010101010101010101011=SUM(N + (N - 1)) - N + 1

    My math is off there I think but this program holds up for single digit and 10, 11

    https://dotnetfiddle.net/rdtKBE

    The justification is that there will always be D - 1 digits before any digital until D approaches 0.

    – Jay Dec 16 '20 at 04:40

2 Answers2

1

COMMENT.- No problem with the nine digits, I mean with the number $$N=122333444455555\cdots999999999$$ because its position is clearly given $$2\text { in the } 2^a\text{and }3^a\\3\text { in the } 4^a\text{and }6^a\\4\text { in the } 7^a\text{and }10^a\\5\text { in the }11^a\text{and }15^a$$ The pattern is manifest and thus $6$ is between $15 + 1 = 16$ and $15 + 6 = 21$ positions and following this model we have that $8$ is between positions $29$ and $36$ and $9$ is between positions $37$ and $45$.

But starting with $10$, which will be between positions $45 + 1 = 46$ and $45 + 10 = 55$, there is no longer a fixed digit but there is an interleaving of $1$ and $0$ and the matter will be further complicated with other numbers.

Piquito
  • 29,594
  • Can you please clarify for one such as myself the statement "The pattern is manifest". Thanks you in advnace. I can see the Distcrete you are describing I think N | % N = n % i or something like that series\ – Jay Jan 14 '21 at 12:20
  • 2
    @Jay.- With pleasure. Each successive number appears as follow: $$2\text{ in } 2^a\text{ and}\space 3^a \text {position}\3\text{ in } (3+1)^a\text{ and}\space (3+3)^a \text {position}\4\text{ in } (6+1)^a\text{ and}\space (6+4)^a \text {position}\5\text{ in } (10+1)^a\text{ and}\space (10+5)^a \text {position}$$ and so on, if $N$ appears between the positions $A^a$ and $B^a$ then $N+1$ must appears between the positions $(B+1)^a$ and $(B+N+1)^a$. – Piquito Jan 15 '21 at 21:42
  • Thank you much! – Jay Jan 16 '21 at 05:45
  • You are welcome. – Piquito Jan 17 '21 at 15:18
0

Something tells me [viscerally] the digit D in the string 1223334444555556666667777777... 10101010101010101010 is given by itself modulo some index of the glyph in the pattern of the digit D.

Given that of string which represents the digit D, then let Dc represent that string i.e. 1, 9 or 10, then D is give by the index of the character in the string Dc at position Dc % D.

https://dotnetfiddle.net/rdtKBE - Proof

The justification is that there will always be D - 1 digits before any digital until D approaches 0.

I only need to solve for the index in the string D would otherwise represent which is given by the modulo operation.

I call (n + (n - 1)) - n + 1) a Friedman Number ; its inverse or whatever the name were to be the term n.ToString().Length * n + indexOf(n - 1) - 1 which is going the other way and AFAIK multiplication is communitive, e.g. via addition but the subtraction is not hence the modulo.

This is like a sorta modulo for this problem set and its the Julian Friedman number or some Alpha in some Set.

Its term is similar to the case of for 10 but includes the extra term for the 0 case e.g. the identity which allows parametrization of... something else e.g. a Prisimetric en Volumeatrism.

See also: What is the radix of a base zero and 1 number system. or Repunit.

If there is more succinct way to explain this I would really appreciate that understanding and will happily remove my banter. If there is anyway I can improve this question more importantly my answer just lmk (formatting or otherwise) tyt tia

Jay
  • 99
  • 1
    The problem for a "pattern" would be with the numbers $N=\underbrace{aaaa....aaaaa}_{k \text{ times}}$ for $a=1,2,....,9$ and other similar numbers. – Piquito Jan 13 '21 at 14:47