login
A145285
a(n) is the number of monomials in the n-th power of polynomial x^4-x^3-x^2-x-1.
1
5, 8, 12, 16, 20, 25, 28, 32, 37, 41, 45, 49, 53, 57, 61, 65, 69, 73, 77, 81, 85, 89, 93, 97, 101, 105, 109, 113, 117, 121, 125, 129, 133, 137, 141, 145, 149, 153, 157, 161, 165, 169, 173, 177, 181, 185, 189, 193, 197, 201, 205, 209, 213, 217, 221, 225, 229, 233
OFFSET
1,1
COMMENTS
a(n)=Length[(x^4-x^3-x^2-x-1)^n].
FORMULA
From Chai Wah Wu, Sep 24 2020: (Start)
a(n) = 2*a(n-1) - a(n-2) for n > 10.
G.f.: x*(-x^9 + x^8 + x^7 - 2*x^6 + x^5 + x^2 - 2*x + 5)/(x - 1)^2. (End)
a(n) = 4*n+1 for n > 8. - Chai Wah Wu, Jan 09 2022
MATHEMATICA
a = {}; k = x^4 - x^3 - x^2- x - 1; m = k; Do[AppendTo[a, Length[m]]; m = Expand[m*k], {n, 1, 100}]; a (*Artur Jasinski*)
PROG
(Python)
from sympy import expand
from sympy.abc import x
def A145285(n):
return len(expand((x**4-x**3-x**2-x-1)**n).as_terms()[0]) # Chai Wah Wu, Sep 24 2020
(Python)
def A145285(n): return (5, 8, 12, 16, 20, 25, 28, 32)[n-1] if n <= 8 else 4*n+1 # Chai Wah Wu, Jan 09 2022
(PARI) a(n)=if(n>8, 4*n+1, [5, 8, 12, 16, 20, 25, 28, 32][n]) \\ Charles R Greathouse IV, Jun 23 2024
CROSSREFS
Cf. A016813.
Sequence in context: A287114 A314408 A190708 * A314409 A314410 A222802
KEYWORD
nonn,easy
AUTHOR
Artur Jasinski, Oct 06 2008
STATUS
approved