Это легко проверить Hugo напрямую: запустить проверку с 8.0215613469e34, найдётся ли пятнашка (как минимальная десятка) или нет. Ставлю что найдётся, т.е. условие выполнено,
Huz, Вы попробовали сделать как предложил
Dmitriy40 ?
No, I didn't try it: I don't understand it (and had not realised it was addressed to me). The translation comes out as "run the check with 8.0215613469e34, whether there is a tag (as a minimum ten) or not". I don't understand what "tag" is supposed to mean, or what check is supposed to be run, or what doing this check is intended to prove.
Цитата:
Да, Вы, видимо, не поняли. Я о другом говорил. Весьма много первых пятёрок получается из этого паттерна:
И именно с двумя последними цифрами "21" для первого числа цепочки.
Но кроме этого надо проверять ещё числа
,
и
.
Вы всё это проверяете? И всё это успеваете сделать меньше чем за одну секунду?
If I correctly understand the question, my code doesn't work quite like that. Given
as the required number of divisors, it assigns each possible prime at each possible power to satisfy each of the odd primes dividing
. So for
, it will assign one of
to each of the positions along the chain, until all of them are assigned (or until the number of values to check is small enough). It then uses the Chinese Remainder Theorem to determine an overall modular constraint for that selection of assignments, and for each value matching that modular constraint checks if we have a solution.
That's the basic theory at least, ignoring lots of optimizations. For example if an assignment leaves the unassigned part of some value
forced to be a square, I take advantage of that to require that every assignment of
to a different value
has
being a quadratic residue
- for
that kicks in as soon as a power of 2 gets assigned. If two values are forced to be square I just solve the Pell equation, so those cases are resolved pretty much instantly.
In fact, for
, the code tells me that there are very few valid options for placing powers of 2, 3 and 5 (ignoring 7 cases such as
where one value is completely specified):
(Оффтоп)
. 2 3^2 2^2 5^2
. 2 3^2 2^2 5
. 2 3 2^2 5^2
. 2 3 2^2 5
.. and all but the first of those give Pell equations.