strange beauty in coefficients of the spread polynomial

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:

delme

In each line of the text, the first number is a coefficient of the spread polynomial S_{38}. This is a very big polynomial. In it’s most plain form, it has 38 different terms summed together, one each for s^{38}, s^{37}, s^{36}, all the way down to s^{1}. Each of these powers of s 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 -18889465931478580854784 for s^{38}. The second line has 358899852698093036240896 for s^{37}, and so on, down to the last line, 1444 for s^{1}. 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:

S_{38}(s) = -4s(s - 1)(262144s^9 - 1245184s^8 + 2490368s^7 - 2723840s^6 + 1770496s^5 - 695552s^4 + 160512s^3 - 20064s^2 + 1140s - 19)^{2} (262144s^9 - 1114112s^8 + 1966080s^7 - 1863680s^6 + 1025024s^5 - 329472s^4 + 59136s^3 - 5280s^2 + 180s - 1)^2

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.


Here is the computer code to produce the curve pattern, in python3 language. You need to have sympy installed, as well as python version 3.

# 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 s goes down after starting at 38. 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 s^{32} require more information to express itself than, say, s^{16}? 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.

 

Advertisements

About donbright

don bright http://github.com/donbright
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s