A301703
a(n) is the number of positive coefficients of the polynomial (x-1)*(x^2-1)*...*(x^n-1).
Original entry on oeis.org
1, 2, 3, 3, 6, 6, 9, 13, 16, 18, 21, 27, 34, 32, 42, 47, 54, 62, 73, 79, 85, 96, 104, 113, 123, 140, 150, 171, 174, 190, 200, 211, 234, 240, 263, 275, 301, 304, 322, 351, 368, 396, 413, 455, 451, 470, 487, 499, 531, 540, 592, 585, 631, 630, 687, 691, 734, 774, 793, 863
Offset: 1
Denote P_n(x) = (x-1)...(x^n-1).
P_1(x) = x-1, hence a(1)=1.
P_2(x) = (x-1)*(x^2-1) = x^3-x^2-x+1, hence a(2)=2;
P_3(x) = (x-1)*(x^2-1)*(x^3-1) = x^6-x^5-x^4+x^2+x-1, hence a(3)=3;
P_4(x) = (x-1)*(x^2-1)*(x^3-1)*(x^4-1) = x^10 - x^9 - x^8+2x^5-x^2-x+1, hence a(4)=3.
Cf.
A231599: a(n) is the number of positive coefficients in row n.
-
a:= n-> nops(select(x-> x>0, [(p-> seq(coeff(p, x, i),
i=0..degree(p)))(expand(mul(x^i-1, i=1..n)))])):
seq(a(n), n=1..60); # Alois P. Heinz, Mar 29 2019
-
Table[Count[CoefficientList[Expand[Times@@(x^Range[n]-1)],x],?(#>0&)],{n,60}] (* _Harvey P. Dale, Feb 10 2019 *)
-
a(n) = #select(x->(x>0), Vec((prod(k=1, n, (x^k-1))))); \\ Michel Marcus, Apr 02 2018
A301704
a(n) is the number of negative coefficients of polynomial (x-1)*(x^2-1)*...*(x^n-1).
Original entry on oeis.org
1, 2, 3, 4, 6, 8, 9, 12, 16, 18, 21, 26, 34, 32, 42, 50, 54, 64, 73, 82, 85, 96, 104, 116, 123, 134, 150, 162, 174, 182, 200, 216, 234, 252, 263, 286, 301, 322, 322, 340, 368, 376, 413, 414, 451, 460, 487, 518, 531, 580, 592, 638, 631, 684, 687, 728, 734, 744, 793, 800, 859, 854, 917, 936, 977, 1000, 1037, 1088, 1108, 1166
Offset: 1
Denote P_n(x) = (x-1)...(x^n-1).
P_1(x) = x-1, hence a(1)=1.
P_2(x) = (x-1)*(x^2-1) = x^3-x^2-x+1, hence a(2)=2;
P_3(x) = (x-1)*(x^2-1)*(x^3-1) = x^6-x^5-x^4+x^2+x-1, hence a(3)=3;
P_4(x) = (x-1)*(x^2-1)*(x^3-1)*(x^4-1) = x^10 - x^9 - x^8+2x^5-x^2-x+1, hence a(4)=4.
Cf.
A231599: Row n represents coefficients of (-1)^n*P_n(x).
-
a:= n-> add(`if`(i<0, 1, 0), i=[(p-> seq(coeff(p, x, i),
i=0..degree(p)))(expand(mul(x^i-1, i=1..n)))]):
seq(a(n), n=1..70); # Alois P. Heinz, Mar 29 2019
-
Rest@ Array[Count[CoefficientList[Times @@ Array[x^# - 1 &, # - 1], x], ?(# < 0 &)] &, 71] (* _Michael De Vlieger, Mar 29 2019 *)
-
a(n) = #select(x->(x<0), Vec((prod(k=1, n, (x^k-1))))); \\ Michel Marcus, Apr 02 2018
A301705
a(n) is the number of zero coefficients of the polynomial (x-1)*(x^2-1)*...*(x^n-1) below the leading coefficient.
Original entry on oeis.org
0, 0, 1, 4, 4, 8, 11, 12, 14, 20, 25, 26, 24, 42, 37, 40, 46, 46, 45, 50, 62, 62, 69, 72, 80, 78, 79, 74, 88, 94, 97, 102, 94, 104, 105, 106, 102, 116, 137, 130, 126, 132, 121, 122, 134, 152, 155, 160, 164, 156, 143, 156, 170, 172, 167, 178, 186, 194, 185, 168, 174, 176, 183, 182, 192, 194, 205, 196, 200, 188
Offset: 1
Denote P_n(x) = (x-1)...(x^n-1).
P_1(x) = x-1, hence a(1)=0.
P_2(x) = (x-1)*(x^2-1) = x^3-x^2-x+1, hence a(2)=0;
P_3(x) = (x-1)*(x^2-1)*(x^3-1) = x^6-x^5-x^4+x^2+x-1, hence a(3)=1;
P_4(x) = (x-1)*(x^2-1)*(x^3-1)*(x^4-1) = x^10 - x^9 - x^8+2x^5-x^2-x+1, hence a(4)=4.
-
a:= n-> add(`if`(i=0, 1, 0), i=[(p-> seq(coeff(p, x, i),
i=0..degree(p)))(expand(mul(x^i-1, i=1..n)))]):
seq(a(n), n=1..70); # Alois P. Heinz, Mar 29 2019
-
Rest@ Array[Count[CoefficientList[Times @@ Array[x^# - 1 &, # - 1], x], ?(# == 0 &)] &, 71] (* _Michael De Vlieger, Mar 29 2019 *)
-
a(n) = #select(x->(x==0), Vec((prod(k=1, n, (x^k-1))))); \\ Michel Marcus, Apr 02 2018
A282938
Recursive 2-parameter sequence allowing calculation of the Möbius function (not the same as A266378).
Original entry on oeis.org
1, -1, 1, -1, -1, 2, -1, 0, 1, -2, 1, 0, -1, 2, -1, -1, 3, -2, -1, 1, -1, 1, 1, 0, -2, 1, 1, -2, 1, 0, -1, 1, -1, 3, -1, 0, -1, -2, 1, 1, 1, -1, -1, 3, -2, -1, 1, -1, 2, -2, 1, 1, 0, 0, -1, -3, 2, 2, 0, 0, -2, 1, 0, 0, 1, -3, 2, 1, -1, 1, -2, 2, -2, 2, -2, -1
Offset: 1
The first few rows starting from 1 follow:
1
-1
1, -1
-1, 2, -1, 0
1, -2, 1, 0, -1, 2, -1
-1, 3, -2, -1, 1, -1, 1, 1, 0, -2, 1
1, -2, 1, 0, -1, 1, -1, 3, -1, 0, -1, -2, 1, 1, 1, -1
-1, 3, -2, -1, 1, -1, 2, -2, 1, 1, 0, 0, -1, -3, 2, 2, 0, 0, -2, 1, 0, 0
-
nu[n_]:=(n-1)*(n-2)/2
U[n_, m_] := U[n, m] = If[n > 1, U[n - 1, m - n + 1] - U[n - 1, m], 0]
U[1, m_] := U[1, m] = If[m == 0, 1, 0]
a[n_, m_] := a[n, m] = If[(m < 0) || (nu[n] < m), 0, a[n - 1, m - n + 1] - a[n - 1, m] - a[n - 1, nu[n - 1]]*U[n - 1, m - 1]]
a[1, m_] := a[1, m] = If[m == 0, 1, 0]
Table[Table[a[n, m], {m, 0, nu[n]}], {n, 1, 30}]
Table[a[n, nu[n]], {n, 1, 50}]
A380385
Triangle read by rows. T(1, 1) = 1, T(n, k) = [n >= k](Sum_{i=1..k-1} T[n - i, k - 1] - Sum_{i=1..n-1} T[n - i, k]).
Original entry on oeis.org
1, 0, 1, 0, -1, 1, 0, 0, -1, 1, 0, 0, -1, -1, 1, 0, 0, 1, -1, -1, 1, 0, 0, 0, 0, -1, -1, 1, 0, 0, 0, 1, 0, -1, -1, 1, 0, 0, 0, 1, 0, 0, -1, -1, 1, 0, 0, 0, -1, 2, 0, 0, -1, -1, 1, 0, 0, 0, 0, 0, 1, 0, 0, -1, -1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, -1, -1, 1
Offset: 1
{
{1},
{0, 1},
{0, -1, 1},
{0, 0, -1, 1},
{0, 0, -1, -1, 1},
{0, 0, 1, -1, -1, 1},
{0, 0, 0, 0, -1, -1, 1},
{0, 0, 0, 1, 0, -1, -1, 1},
{0, 0, 0, 1, 0, 0, -1, -1, 1},
{0, 0, 0, -1, 2, 0, 0, -1, -1, 1},
{0, 0, 0, 0, 0, 1, 0, 0, -1, -1, 1},
{0, 0, 0, 0, 0, 1, 1, 0, 0, -1, -1, 1}
}
-
nn = 12; t[n_, 1] = If[n == 1, 1, 0]; t[n_, k_] := t[n, k] = If[n >= k, Sum[t[n - i, k - 1], {i, 1, k - 1}] - Sum[t[n - i, k], {i, 1, n - 1}], 0]; Table[Table[t[n, k], {k, 1, n}], {n, 1, nn}]; Flatten[%]
nn = 12; Table[Table[If[n == k, 1, Coefficient[Product[(1 - x^i), {i, k - 1}], x^(n - k)]], {k, 1, n}], {n, 1, nn}] // Flatten (* Conjectured after A231599. - Mats Granvik, Jan 25 2025 *)
Comments