P305
projecteuler.net

Reflexive Position

ℹ️Published on Sunday, 10th October 2010, 04:00 am; Solved by 688;
Difficulty rating: 60%

Let's call $S$ the (infinite) string that is made by concatenating the consecutive positive integers (starting from $1$) written down in base $10$.
Thus, $S = 1234567891011121314151617181920212223242\cdots$

It's easy to see that any number will show up an infinite number of times in $S$.

Let's call $f(n)$ the starting position of the $n$th occurrence of $n$ in $S$.
For example, $f(1)=1$, $f(5)=81$, $f(12)=271$ and $f(7780)=111111365$.

Find $\sum f(3^k)$ for $1 \le k \le 13$.



Soluzione

Last modified: May 01, 2025. Website built with Franklin.jl and the lovely Julia programming language.