Whilst playing around with the 38th spread Polynomial (or is it 39th?) I happened to see this strange and nice pattern, by printing the coefficients each on a separate line:
In each line of the text, the first number is a coefficient of the spread polynomial . This is a very big polynomial. In it’s most plain form, it has 38 different terms summed together, one each for , all the way down to . Each of these powers of has it’s own coefficient, and many of them are quite long in their number of digits.
But when printed out line by line, the coefficients seem to make this pretty curve shape. I don’t know what it’s called or how it came to be. But it seems nice.
The top line of the pattern (which starts on the 6th row of the computer text-terminal output above) is the coefficient for . The second line has for , and so on, down to the last line, for . The numbers after each coefficient are the prime factors of that coefficient, with ^ used to mean ‘raised to the power’. (Thanks sympy!) Added all together, these terms make the polynomial itself.
The spread polynomial itself can be written in a much smaller space, using sympy’s “Factor” feature, like so:
But this form doesn’t have that nice curve shape, that we see when we print the plain coefficients line by line. It’s the same polynomial technically, just expressed in two different ways. If you put in a number for s into either one, you get the same result eventually.
# print out factors of the coefficients of spread polynomials. from sympy import * import math s=symbols('s') # create the nth spread polynomial, in Sympy style, # using the Explicit Formula, p 106 of Divine Proportions, # by Norman J Wildberger def spread_poly(n): s,r,C,D=symbols('s,r,C,D') r=sqrt(4*s*(1-s)) C=1-2*s+I*r D=1-2*s-I*r spoly = Rational(1,4)*(2 - C**n - D**n) return spoly n=38 spreadpoly = spread_poly(n) startspread = Rational(0,1) print('Spread polynomial (factored): S_ '+str(n)+' =',factor(spreadpoly)) print('Spread polynomial (plain ): S_ '+str(n)+' =',expand(spreadpoly)) coefficients = Poly(spreadpoly).coeffs() for c in coefficients: factors = factorint(c) print(c,end=' ') for k in sorted(factors.keys()): print(str(k),end='') if (factors[k]!=1): print('**'+str(factors[k]),end=' ') else: print(end=' ') print()
I did some other amateur experiments with sympy and spread polynomials, and the code is here on Github: https://github.com/donbright/piliko/tree/master/sympy
There is something interesting about the curve of coefficients in the pattern above. In a way the curve could be imagined as an expressions of the complexity of each coefficient, and how it goes up and down again as the degree of goes down after starting at . That is to say, it might take “more information” to express a number that contains lots of digits, than it does to express a number that has only a few digits. On the other hand, this is presupposing that there is not some super-compression algorithm that could render each line the same width in some compact form. But I did try to break them down into prime factors – and the nice curve is still basically there. So, I do wonder if the longer coefficients intrinsically have more information in them. But then also, I wonder why their complexity would form this nice curve. Why does require more information to express itself than, say, ? Fascinating.
This reminds me a little bit of Norman Wildberger’s videos on Hyperoperations and the complexity of the expression of natural numbers, for example starting with Math Foundations 173: A disruptive view of big number arithmetic.
Of course I could always be wrong. Thanks for reading regardless.