In this section, I introduce the advanced technique, written in

"Computational Recreations in *Mathematica*", Ilan Vardi, Addison-Wesley.

The square roots of 2n-digits, (2n-1)-digits numbers are determined by upper n-digits.

So we can consider the following algorithm.

# Let a be n-digits number consisted of 3 different digits. Let c be the concatinate of a and (n-1) times 0 (c=a*10^{n-1}). d=isqrt(c) Check (d+1)^{2}is consisted of 3 different digits or not. In this case, we need to check only lower n digits. (Because upper n digits is known as consisting of just 3 digits). If it is just 3 digits, found. Let c be the concatinate of a and n times 0 (c=a*10^{n}). d=isqrt(c) Check (d+1)^{2}is consisted of 3 different digits or not. In this case, we need to check only lower n digits. If it is just 3 digits, found.

In this algorithm, if the digits of a increase, the search range is double-digits.

And computation time of 1 increase of a, just 3 times.

In previous algorithm's case, if the digit of a increase, computation time is getting 10 times.

So using this algorithm, we can get a great advantage.

How to generate the (#) number ?

We need to generate the following number sequencially.

- e.g. 0, 1, 2 case

1 , 2 , 10 , 11 , 12 , 20 , 21 , 22 , 100 , 101 , ...

- e.g. 1, 2, 3 case

1 , 2 , 3 , 11 , 12 , 13 , 21 , 22 , 23 , 31 , 32 , 33 , 111 , ...

The algorithm is the following.

First storing 3 digits in T$[0], T$[1], T$[2] from smaller number.

Let s$ be the number consisted of 3 different digits.

i is the digits (lengths).

# Noticing the i-th digit. If i-th digit is T$[0] then exchange i-th digits as T$[1]. (i-1)-digit through 1-digits remain the same. If i-th digit is T$[1] then exchange i-th digits as T$[2]. (i-1)-digit through 1-digits remain the same. If i-th digit is T$[2] then exchange i-th digits as T$[0]. i=i-1 : gosub # If i=0 then concatinate T$[0] at the uppermost digit. If T$[0]=0 then concatinate T$[1] at the uppermost digit.

The programs are here.

Up to a ≤ 10^{23} (b=a^{2}) for patterns including zero,
and up to a ≤ 10^{25} for patterns not including zero has done.

Results are following;

**Solutions for 013 and 678 are not found yet.**

For higher powers, the results are following.

power 3 : a=10^{n}+1 (n ≥ 2), b=a^{3}

power 5 : a=10^{n}+1 (n ≥ 2), b=a^{5}

power | a | b=a^{p} |
---|---|---|

3 | 7 | 343 |

11 | 1331 | |

14 | 2744 | |

15 | 3375 | |

36 | 46656 | |

62 | 238328 | |

92 | 778688 | |

173 | 5177717 | |

192 | 7077888 | |

211 | 9393931 | |

888 | 700227072 | |

3543 | 44474744007 | |

110011 | 1331399339931331 | |

146796 | 3163316636166336 | |

4 | 9 | 6561 |

11 | 14641 | |

16 | 65536 | |

34 | 1336336 | |

5 | 6 | 7776 |

23 | 6436343 | |

6 | 6 | 46656 |

8 | 3 | 6561 |

4 | 65536 | |

11 | 3 | 177147 |

16 | 2 | 65536 |

**I couldn't find any solutions for power 7.**

At first, the conditions

- 3 different digits
- perfect n-th power

are too weak and we will be able to get the many results.

But for higher power cases, the results are only above.

previous | index |
---|

E-mail : kc2h-msm@asahi-net.or.jpHisanori Mishima