Hello everyone,
In each base b, I was interested in finding the smallest nontrivial p such that p divides the (right) concatenation of all numbers <=p in base b. By "nontrivial" I mean p not dividing b(b-1): divisors d of b or odd divisors d of b-1 trivially satisfy that they divide that concatenation. So for example, in base 10 the answer is 8167 (see A072712).
Now I am coping M. F. Hasler's program in A029455 to give one searching for the smallest prime p:
(PARI) a(base) = c=0; for(d=1, oo, for(n=d, -1+d*=base, c=c*d+n; if(isprime(n) && (base*(base-1))%n!=0 && c%n==0, return(n))); d--)
so we can calculate starting from base 2:
3, ?, 2281, 23, 103, 61, 13, 47, 8167, 281, 29, ?, 19, 6829, 83, 809, 208631, 47, 71, 79, ?, ?, ...
The values corresponding to bases 3, 13, 22, 23 are marked with "?".
But if the answer in same b is very large then it should be very hard to find: For each n the concatenation of 1 through n has O(n log n) digits, so finding its remainder modulo n requires O(n (log n)^2) bit operations. Taking the sum of n means that to calculate terms up to n, the time complexity is O(n^2 (log n)^2). I guess some optimizations may be applied, but still we face something at the order of n^2.
Here we are in the situation of finding Wieferich primes or k-Wall-Sun-Sun primes: we conjecture that there are infinitely many (because we can't give a proof of the contrary), we know at most a handful of terms in each base, and in some bases (like 1-Wall-Sun-Sun) we don't know any result at all.
So I was wondering if everyone is interested in finding the smallest nontrivial p dividing the concatenation of all numbers <=p in base 3? Or in other bases? Perhaps someone have studied this sequence in the litterature before (and proved that such primes do not exist)? Thank you for your attention, for your time and any help in advance! :)