I could need someone to do a check on this problem, since it has been published in Matt Parkers book "things to make and do in the fourth dimension" and has now been featured in a numberphile video
In Matt Parker's most recent video on numberphile he states that you can build a giant hexagon with sides of length 22 and it will take 946 balls. It looks like he has used these numbers when he in reality should have been using these so he got the layers to be $1,6,15,\ldots,946$ instead of $1,7,19,\ldots,1387$.
The problem he was trying to solve was if there exists a number of cannonballs where they can both form a flat hexagon and a hexagonal pyramid (inspired by this old problem).
I made a simple python programme to check for a solution of the height up to $10^7$ (which equals $10^{18}$ cannonballs) with no solution
layer_size = 1
sum_to_height = 1
totals = []
layers = []
for height in range(2,10000):
layer_size = 3*((height-1)**2+height-1)+1 #Formula for how many balls in each layer
sum_to_height += layer_size #Sum of all balls in pyramid to current height
totals.append(sum_to_height)
layers.append(layer_size)
print(set(layers).intersection(totals)) #If there is a intersect, then that is a solution