A100329
a(n) = -a(n-1) -a(n-2) -a(n-3) +a(n-4), a(0)=0, a(1)=1, a(2)=-1, a(3)=0.
Original entry on oeis.org
0, 1, -1, 0, 0, 2, -3, 1, 0, 4, -8, 5, -1, 8, -20, 18, -7, 17, -48, 56, -32, 41, -113, 160, -120, 114, -267, 433, -400, 348, -648, 1133, -1233, 1096, -1644, 2914, -3599, 3425, -4384, 7472, -10112, 10449, -12193, 19328, -27696, 31010, -34835, 50849, -74720, 89716, -100680
Offset: 0
-
I:=[0,1,-1,0]; [n le 4 select I[n] else -Self(n-1) -Self(n-2) -Self(n-3) +Self(n-4): n in [1..61]]; // G. C. Greubel, Jan 30 2023
-
a:= n-> (<<1|1|0|0>, <1|0|1|0>, <1|0|0|1>, <1|0|0|0>>^(-n))[1, 4]:
seq(a(n), n=0..50); # Alois P. Heinz, Jun 12 2008
-
CoefficientList[Series[x/(1+x+x^2+x^3-x^4), {x, 0, 50}], x]
LinearRecurrence[{-1,-1,-1,1},{0,1,-1,0},60] (* Harvey P. Dale, May 20 2018 *)
-
@CachedFunction
def a(n): # a=A100329
if (n<4): return (0,1,-1,0)[n]
else: return -a(n-1)-a(n-2)-a(n-3)+a(n-4)
[a(n) for n in range(61)] # G. C. Greubel, Jan 30 2023
A180735
Expansion of (1+x)*(1-x)/(1 - x + x^2 + x^3).
Original entry on oeis.org
1, 1, -1, -3, -3, 1, 7, 9, 1, -15, -25, -11, 29, 65, 47, -47, -159, -159, 47, 365, 477, 65, -777, -1319, -607, 1489, 3415, 2533, -2371, -8319, -8481, 2209, 19009, 25281, 4063, -40227, -69571, -33407, 76391, 179369, 136385
Offset: 0
a(6) = 7 = (1, 1, 1, -1, -3, -3, 1) dot (-2, 0, 2, 0, -2, 0, 1) = (-2, 0, 2, 0, 6, 0, 1) = 7.
-
CoefficientList[Series[(1 + x)*(1 - x)/(1 - x + x^2 + x^3), {x, 0, 50}], x] (* G. C. Greubel, Feb 22 2017 *)
LinearRecurrence[{1,-1,-1},{1,1,-1},50] (* Harvey P. Dale, Aug 10 2021 *)
-
x='x+O('x^50); Vec((1 + x)*(1 - x)/(1 - x + x^2 + x^3)) \\ G. C. Greubel, Feb 22 2017
A321196
Riordan triangle T = (1/(1 + x^2 - x^3), x/(1 + x^2 - x^3)).
Original entry on oeis.org
1, 0, 1, -1, 0, 1, 1, -2, 0, 1, 1, 2, -3, 0, 1, -2, 3, 3, -4, 0, 1, 0, -6, 6, 4, -5, 0, 1, 3, -1, -12, 10, 5, -6, 0, 1, -2, 12, -4, -20, 15, 6, -7, 0, 1, -3, -7, 30, -10, -30, 21, 7, -8, 0, 1, 5, -16, -15, 60, -20, -42, 28, 8, -9, 0, 1
Offset: 0
The triangle T(n, k) begins:
n\k 0 1 2 3 4 5 6 7 8 9 10 ...
---------------------------------------------
0: 1
1: 0 1
2: -1 0 1
3: 1 -2 0 1
4: 1 2 -3 0 1
5: -2 3 3 -4 0 1
6: 0 -6 6 4 -5 0 1
7: 3 -1 -12 10 5 -6 0 1
8: -2 12 -4 -20 15 6 -7 0 1
9: -3 -7 30 -10 -30 21 7 -8 0 1
10: 5 -16 -15 60 -20 -42 28 8 -9 0 1
...
Cayley-Hamilton formula for the matrix TS(x) =[[x,-1,1], [1,0,0], [0,1,0]] with Det(TS(x)) = +1, sigma(3, 2) = +1, and Tr(TS(x)) = x. For n = 3: TS(x)^3 = R(1, x)*TS(x)^2 + (-R(0, x) + R(-1, x))*TS(x) + R(0, x)*1_3 = x*TS(x)^2 - TS(x) + 1_3. Compare this for x = -1 with r^3 = R(3)*r^2 + (-R(2) + R(1))*r + R(2)*1 = r^2 - r + 1, where r = 1/t = A192918, with the tribonacci constant t = A058265, and R(n) = A057597(n) = R(n-2, -1).
Recurrence: T(5, 2) = T(4, 1) - T(3, 2) + T(2, 2) = 1 -(-1) + 1 = 3.
Boas-Buck type recurrence with B = {0, -2, 3, ...}:
T(5, 2) = ((2+1)/(5-2))*(3*1 + (-2)*0 + 0*(-3)) = 1*3 = 3.
Z- and A-recurrence with A(n) = {1, 0, -1, 1, -1, ...} and Z(n) = A(n+1):
T(4, 0) = 0*T(3, 0) - 1*T(3, 1) + 1*T(3, 2) - 1*T(3, 3) = 0 + 2 + 0 - 1 = 1.
T(5, 2) = 1*T(4, 1) + 0*T(4, 2) - 1*T(4, 3) + 1*T(4, 4) = 2 + 0 + 0 + 1 = 3.
-
T[n_, k_] /; 0 <= k <= n := T[n, k] = T[n - 1, k - 1] - T[n - 2, k] + T[n - 3, k]; T[0, 0] = 1; T[, ] = 0;
Table[T[n, k], {n, 0, 10}, {k, 0, n}] (* Jean-François Alcover, Jul 06 2019 *)
-
# uses[riordan_array from A256893]
riordan_array(1/(1 + x^2 - x^3), x/(1 + x^2 - x^3), 11) # Peter Luschny, Nov 13 2018
A105580
a(n+3) = a(n) - a(n+1) - a(n+2); a(0) = -5, a(1) = 6, a(2) = 0.
Original entry on oeis.org
-5, 6, 0, -11, 17, -6, -22, 45, -29, -38, 112, -103, -47, 262, -318, 9, 571, -898, 336, 1133, -2367, 1570, 1930, -5867, 5507, 2290, -13664, 16881, -927, -29618, 47426, -18735, -58309, 124470, -84896, -97883, 307249, -294262, -110870, 712381, -895773, 72522, 1535632, -2503927, 1040817, 2998742
Offset: 0
This sequence was generated using the same floretion which generated the sequences A105577, A105578, A105579, etc.. However, in this case a force transform was applied. [Specifically, (a(n)) may be seen as the result of a tesfor-transform of the zero-sequence A000004 with respect to the floretion given in the program code.]
-
Transpose[NestList[Join[Rest[#],ListCorrelate[ {1,-1,-1}, #]]&,{-5,6,0},50]][[1]] (* Harvey P. Dale, Mar 14 2011 *)
CoefficientList[Series[(5-x-x^2)/(x^3-x^2-x-1),{x,0,50}],x] (* Harvey P. Dale, Mar 14 2011 *)
A349904
Inverse Euler transform of the tribonacci numbers A000073.
Original entry on oeis.org
0, 0, 1, 1, 2, 3, 6, 10, 18, 31, 56, 96, 172, 299, 530, 929, 1646, 2893, 5126, 9044, 16028, 28362, 50328, 89249, 158598, 281830, 501538, 892857, 1591282, 2837467, 5064334, 9044023, 16163946, 28906213, 51729844, 92628401, 165967884, 297541263, 533731692, 957921314
Offset: 1
-
read transforms; # https://oeis.org/transforms.txt
arow := len -> EULERi([seq(A000073(n), n = 0..len)]): arow(39);
# second Maple program:
t:= n-> (<<0|1|0>, <0|0|1>, <1|1|1>>^n)[1, 3]:
b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
add(binomial(a(i)+j-1, j)*b(n-i*j, i-1), j=0..n/i)))
end:
a:= proc(n) option remember; t(n-1)-b(n, n-1) end:
seq(a(n), n=1..40); # Alois P. Heinz, Dec 05 2021
-
(* EulerInvTransform is defined in A022562. *)
EulerInvTransform[LinearRecurrence[{1, 1, 1}, {0, 0, 1}, 40]]
-
InvEulerT(v)={my(p=log(1+x*Ser(v))); dirdiv(vector(#v,n,polcoef(p,n)), vector(#v,n,1/n))}
seq(n) = InvEulerT(Vec(x^2/(1 - x - x^2 - x^3) + O(x^n), -n)) \\ Andrew Howroyd, Dec 05 2021
-
# After the Maple program of Alois P. Heinz.
from functools import cache
from math import comb
def binomial(n, k):
if n == -1: return 1
return comb(n, k)
@cache
def A000073(n):
if n <= 1: return 0
if n == 2: return 1
return A000073(n-1) + A000073(n-2) + A000073(n-3)
@cache
def b(n, i):
if n == 0: return 1
if i < 1: return 0
return sum(binomial(a(i) + j - 1, j) *
b(n - i * j, i - 1) for j in range(1 + n // i))
@cache
def a(n): return (A000073(n - 1) - b(n, n - 1))
print([a(n) for n in range(1, 41)])
-
def euler_invtrans(A) :
L = []; M = []
for i in range(len(A)) :
s = (i+1)*A[i] - sum(L[j-1]*A[i-j] for j in (1..i))
L.append(s)
s = sum(moebius((i+1)/d)*L[d-1] for d in divisors(i+1))
M.append(s/(i + 1))
return M
@cached_function
def a(n): return a(n-1) + a(n-2) + a(n-3) if n > 2 else [0,0,1][n]
print(euler_invtrans([a(n) for n in range(40)]))
Comments