I run the possible d values from 2 to 9 and n up to 50.
For n = 2 I found groups of 4 nvalues every 6 n, i.e. for n=4, 10, 16
...46
and for n=5 I found groups of 2 n-values for every 6 n, i.e. n= 6, 12,
18,...49.
For the remaining n-values there not a single case.
10 +2222222222 mod 2^10 = +910
11 +22222222222 mod 2^11 = +910
12 +222222222222 mod 2^12 = +910
13 +2222222222222 mod 2^13 = +910
16 +2222222222222222 mod 2^16 = +58254
17 +22222222222222222 mod 2^17 = +58254
18 +222222222222222222 mod 2^18 = +58254
19 +2222222222222222222 mod 2^19 = +58254
22 +2222222222222222222222 mod 2^22 = +3728270
23 +22222222222222222222222 mod 2^23 = +3728270
24 +222222222222222222222222 mod 2^24 = +3728270
25 +2222222222222222222222222 mod 2^25 = +3728270
...
46 +2222222222222222222222222222222222222222222222 mod 2^46
= +62549994824590
47 +22222222222222222222222222222222222222222222222 mod
2^47 = +62549994824590
48 +222222222222222222222222222222222222222222222222 mod
2^48 = +62549994824590
49 +2222222222222222222222222222222222222222222222222 mod
2^49 = +62549994824590
6 +555555 mod 5^6 = +8680
7 +5555555 mod 5^7 = +8680
12 +555555555555 mod 5^12 = +135633680
13 +5555555555555 mod 5^13 = +135633680
18 +555555555555555555 mod 5^18 = +2119276258680
19 +5555555555555555555 mod 5^19 = +2119276258680
...
48 +555555555555555555555555555555555555555555555555 mod
5^48 = +1973729821555833849642011854383680
49 +5555555555555555555555555555555555555555555555555 mod
5^49 = +1973729821555833849642011854383680
The fact that only 2 and 5 behave like this depends of caouse of the fact
that the number base is 10.
***
Farid wrote:
We note that there are repeated solutions of [(2)n] mod
2^n = k for consecutive n, at n = 6 m+4 which indicates a pattern. We
also note that 2222 = 2*1111 that is a digit times a repunit and
searching for this pattern using generalized or base-b repunits soon
reveals following:
A base-b repunit is defined as R[b,n] = (b^n-1)/(b-1)
and for the case b = 2^q+2 we find above mentioned pattern again and we
can conjecture (as there is no proof) and write:
2 R[2^q+2, q+p] mod 2^(q+p) = 2^(q+1)-2 for p= 1,
2 …. q+1
and these sequences repeat at n = 2 q(m+1) + 1
Bergot’s example is for q=3 and we can find Bergot’s
sequences to any length just by changing the number base.
Example: q=10, b=2^10+2 = 1026
[(2)n] (base 1026) mod 2^n = 2^11-2 for
n=11,12,…22
One can generalize further and change the repeated digit
d, unfortunately there is no nice solution as for the above case d=2 but
one can conjecture:
For the case b = d^q+d there exist an r such that
there is a solution
d R[d^q+d, ,r+p] mod d^(r+p)] = k for p= 1, 1,2 ….
q+1
Example: d=3; q=8; b=3^8+3 = 6564; r=185
k=55516363584578627563714802636925932160577108325280017016577943761936902977368488012124482
Or [(3)n](base 6564) mod 3^n= y for 9 consecutive n=185,
186, … 194