Primes and Squares

Place a different prime or square number on each of the fifteen disks below so that the number in any disk that lies on two others is the sum of the numbers in those disks. Do so in such a way that the number on the apex is as small as possible. • is this something you composed yourself? Nov 26 '18 at 15:13
• @KateGregory: A variation on an old theme. Nov 26 '18 at 15:15
• Zero (as a square) allowed?
– z100
Nov 26 '18 at 20:43
• @z100 You could not use a zero, since $x + 0 = x$, and therefore you'd have to have two $x$'es in your grid; that is disallowed. See imgur.com/a/gPWWkaN for explanation. Nov 26 '18 at 21:55

A much lower upper bound, which I'm fairly sure is optimal (assuming 0 is disallowed).

1669
576 || 1093
383 || 193 || 900
347 || 36 || 157 || 743
324 || 23 || 13 || 144 || 599

• Algorithm used extening the order? E.G.: 1st order: 1 ; 2nd order: 3 (1 2) ; 3rd order: 16 (3 13) (1 2 11) ; or 16 (13 3) (12 1 2) ;
– z100
Nov 26 '18 at 21:25
• @z100 I'm afraid I'm not sure what you're asking - could you clarify? Nov 26 '18 at 21:33
• My own (extremely shameful, dirty, brute-force) code confirms this answer is optimal. I can also provide the smallest apex value for a 4-level tree, which is 23. Nov 27 '18 at 1:03
• @BernardoRecamánSantos Oh! You're right, 23 isn't possible. I didn't notice that I had a duplicated 3... Dirty code leads to dirty bugs. Let me correct myself: The smallest apex value for a 4-level tree is 59. Nov 28 '18 at 1:14
• @benj2240: Yes, 59 is the lowest my students have achieved. Nov 28 '18 at 1:18

Alright, I’ve definitely got an upper bound here. In text:

390625
140625 || 250000
50625 || 90000 || 160000
18225 || 32400 || 57600 || 102400
6561 || 11664 || 20736 || 36864 || 65536

However,

this uses all square numbers, and is far from optimal. I’ll have to see if I can reduce it by using primes.