The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A218452 Number of ways to factor (1 + x + x^2+ ... + x^(n - 1))^2 as the product of two monic polynomials of degree n - 1 with positive coefficients (counting order). 0
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 5, 7, 9, 9, 13, 11, 17, 19, 33 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,12
COMMENTS
a(n) is the number of ways one can divide the unit square in n possibly irregular lines * n possibly irregular columns (parallel to the sides) so that each of the diagonals of the n X n irregular checkerboard thus constructed has the same area as it would in a regular checkerboard. Alternatively, this is the number of ways to construct a pair of n-sided dice (probability distribution on the n sides, labeled 0 through n-1), no face having probability 0, so that the sum of the two dice follows the expected probability distribution for the sum of two fair n-sided dice. Note that a(n) is always odd because there is always the obvious factorization of (1+x+...+x^(n-1))^2 as 1+x+...+x^(n-1) times itself, and each other factorization counts twice.
LINKS
EXAMPLE
For n=12 we have a(n)=3 because apart from the obvious factorization of (1+x+...+x^11)^2 as (1+x+...+x^11) times itself, there exist the factorizations p*q and q*p where p = (1-sqrt(3)*x+x^2) * (1-x+x^2) * (1+x^2) * (1+x+x^2)^2 * (1+x) and q = (1-sqrt(3)*x+x^2) * (1-x+x^2) * (1+x^2) * (1+sqrt(3)*x+x^2)^2 * (1+x), both of which have positive coefficients, and those are the only two possible.
PROG
(Sage)
R.<x> = AA['x']
def has_positive_coefficients(pol):
return not any(c <= 0 for c in pol.coeffs())
def trydie(m):
results = []
tmp = list(factor(sum([x^i for i in range(m)])))
facs = [f for (f, _) in tmp]
n = len(facs)
for i in range((3^n+1)//2):
exps = [(i//(3^k))%3 for k in range(n)]
coexps = [2-v for v in exps]
pol = R(prod([facs[k]^exps[k] for k in range(n)]))
copol = R(prod([facs[k]^coexps[k] for k in range(n)]))
if pol.degree()<m and copol.degree()<m and has_positive_coefficients(pol) and has_positive_coefficients(copol):
pol /= pol.subs({x:1})
copol /= copol.subs({x:1})
results += [(pol.coeffs(), copol.coeffs())]
return 2*len(results)-1
CROSSREFS
Sequence in context: A265527 A217250 A213923 * A007731 A306590 A249494
KEYWORD
nonn
AUTHOR
David A. Madore, Oct 28 2012
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 10 01:53 EDT 2024. Contains 373251 sequences. (Running on oeis4.)