A323845 Number of inequivalent height 1 degree n polynomials with nonzero constant term.
1, 4, 6, 21, 45, 144, 378, 1161, 3321, 10044, 29646, 89181, 266085, 798984, 2392578, 7179921, 21526641, 64586484, 193720086, 581179941, 1743421725, 5230324224, 15690618378, 47072032281, 141215033961, 423645633324, 1270933711326, 3812802728301, 11438398618965, 34315200639864
Offset: 1
Examples
For n = 2, the degree 2 height 1 polynomials with nonzero constant term are x^2-x-1, x^2-x+1, x^2-1, x^2+1, x^2+x-1, x^2+x+1, and their (equivalent) negatives. x^2-x-1 is equivalent to x^2+x-1 (either by variable negation or a combination of variable inversion and polynomial negation), and x^2-x+1 is equivalent to x^2+x+1 (by variable negation), while x^2+1 and x^2-1 are each (together with their negative) in their own equivalence class, so a(2) = 4.
Links
- Mike Speciner, Python code to compute a(n) by counting equivalence classes
- Index entries for linear recurrences with constant coefficients, signature (3,3,-9).
Programs
-
Mathematica
LinearRecurrence[{3, 3, -9}, {1, 4, 6}, 30] (* Amiram Eldar, Sep 02 2023 *)
-
Python
def a(n) : k = (n-1)//2; return 3**k*((3**k+1) if n&1 else (3**(k+1)+5))//2 if n else 1;
Formula
a(2k+1) = 3^k*(3^k+1)/2, and a(2k+2) = 3^k*(3^(k+1)+5)/2.
G.f.: x*(1 + x - 9*x^2)/((1 - 3*x)*(1 - 3*x^2)). - Stefano Spezia, Sep 02 2023
Comments