[Archive!] Pure mathematics, physics, chemistry, etc.: brain-training problems not related to trade in any way - page 320

 
Mathemat wrote(a)>>
Richie, will you solve it yourself?

So I came up with it myself :)

))

Then make it four instead of three. And 128, not 12.

 
I'm doing a bit of fiddling with #226.
I figured out that the points lie not only on the circles centered at a point == the centre of the polygon,
but also on a set of half-diameter circles pressed against the edges of the polygon.
It is easy to understand, if to imagine the position of the midpoints of all the chords which intersect the circle at one of their ends at a fixed point.
Perhaps there are some more "half-points" on these circles. (c) That is the answer will be probably more than the obvious minimum (1976).
I think further.
// By the way, 1976 == 2*2*2*13*19
// I don't know if this helps the case. But I take it into account. :)
 
a = 128(b+c+d)/(bcd-128)
Again if all are equal, then 512*a = a*a*a*a, i.e. a = 8. The number 8888 is also slightly mystical.
No other solutions have been thought of. But the product of any three digits is greater than 128.
 
MetaDriver писал(а) >>

Then give me four digits instead of three. And not by 12, but by 128.


I have a program in BASIC, so don't "fill me up" with it :)))

 
Richie >>:

У меня программа есть на бейсике, так, что меня этим не "засыпать" :)))

Easy. If the number is, say, 30 digits, your vasic will be tortured to count. It would be quicker for a collider to destroy the Earth.

 

Mathemat, give it up about the collider. It poses no danger. It's just politicians and scientists need to take a piss.
The Americans once tried to "heat the air" with microwaves - they lost a lot of money, now journos walk on that territory :)))
-
By the way, about 128.
The following will do:
34688
34866
36468
38864
43668
44946
44964
63468
etc.
-
Here is the program itself:
-
'Declare
Dim M As Long
Dim N As Long
Dim Koeficient As Long

Private Sub Command1_Click()
Dim MaxChislo As Long
Dim MinChislo As Long
Dim i As Long
Dim strok As String
'Set initial data
MinChislo = 1
MaxChislo = 100000
Koeficient = 128
For i = MinChislo To MaxChislo
strok = LTrim(RTrim(Str(i)))
If ProizCifr(strok) / SumCifr(strok) = Koeficient Then
Print strok
Else
'Print "Not found"
End If
Next i
End Sub

'TOTAL COUNTING
Private Function SumCifr(Stroca As String) As Long
Dim i As Long
Dim Summa As Long
Dim Cifra As Long
For i = 1 To Len(Stroca)
Cifra = Val(Mid(Stroca, i, 1))
Summa = Summa + Cifra
Next i
SumCifr = Summa
End Function

'PROIZ CALCULATION
Private Function ProizCifr(Stroca As String) As Long
Dim i As Long
Dim Proiz As Long
Dim Cifra As Long
Proiz = 1
For i = 1 To Len(Stroca)
Cifra = Val(Mid(Stroca, i, 1))
Proiz = Proiz * Cifra
Next i
ProizCifr = Proiz
End Function

 
Richie, I understand that the collider is a bit too much.
34688 doesn't work: the sum is 29 and the product is not divisible by this prime number. You can't make a stone flower... And none of them fits at all.
P.S. Oh, you have five digits!
 
Mathemat >>:
О других решениях не думал. Но произведение любых трех цифр больше 128.

The solution is the only one.

No problem to write a program.

For example, in the trailer the script for 4 digits gives a brute force solution for an arbitrary divisor. (The speed, by the way, is pleasantly surprising).

It solves with nested loops.

What's interesting: how to write a program for an arbitrary number of characters (specified in the parameter).

What are the options?

Recursion seems to work, but it is stack consuming. I would like to make recursion. Any other ideas?

Files:
12.mq5  1 kb
 
Mathemat писал(а) >>
Richie, I realise that the collider is a bit overdone.
34688 doesn't work: the sum is 29 and the product is not divisible by this prime number. You can't make a stone flower...
And none of the ones you've mentioned work at all.


I'm not very good today, I'm working too hard:
-

 
MetaDriver >>:

А вот интересно: как написать прогу для произвольного количества знаков (задаваемого в параметре).

Какие варианты?

Рекурсия вроде прокатывает, но расходно по стеку. Щас сделаю рекурсию. Ещё идеи есть?

There are no options. For 30 characters, you need to limit the overshoot effectively somehow.

Recursion is probably useless (if the number of characters is more than 10).

Reason: