login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A057682
a(n) = Sum_{j=0..floor(n/3)} (-1)^j*binomial(n,3*j+1).
17
0, 1, 2, 3, 3, 0, -9, -27, -54, -81, -81, 0, 243, 729, 1458, 2187, 2187, 0, -6561, -19683, -39366, -59049, -59049, 0, 177147, 531441, 1062882, 1594323, 1594323, 0, -4782969, -14348907, -28697814, -43046721, -43046721, 0, 129140163, 387420489, 774840978
OFFSET
0,3
COMMENTS
Let M be any endomorphism on any vector space, such that M^3 = 1 (identity). Then (1-M)^n = A057681(n)-a(n)*M+z(n)*M^2, where z(0)=z(1)=0 and, apparently, z(n+2)=A057083(n). - Stanislav Sykora, Jun 10 2012
From Tom Copeland, Nov 09 2014: (Start)
This array belongs to an interpolated family of arrays associated to the Catalan A000108 (t=1), and Riordan, or Motzkin sums A005043 (t=0), with the interp. (here t=-2) o.g.f. G(x,t) = x(1-x)/[1+(t-1)x(1-x)] and inverse o.g.f. Ginv(x,t) = [1-sqrt(1-4x/(1+(1-t)x))]/2 (Cf. A005773 and A091867 and A030528 for more info on this family). (End)
{A057681, A057682, A*}, where A* is A057083 prefixed by two 0's, is the difference analog of the trigonometric functions {k_1(x), k_2(x), k_3(x)} of order 3. For the definitions of {k_i(x)} and the difference analog {K_i (n)} see [Erdelyi] and the Shevelev link respectively. - Vladimir Shevelev, Jul 31 2017
REFERENCES
A. Erdelyi, Higher Transcendental Functions, McGraw-Hill, 1955, Vol. 3, Chapter XVIII.
FORMULA
G.f.: (x - x^2) / (1 - 3*x + 3*x^2).
a(n) = 3*a(n-1) - 3*a(n-2), if n>1.
Starting at 1, the binomial transform of A000484. - Paul Barry, Jul 21 2003
It appears that abs(a(n)) = floor(abs(A000748(n))/3). - John W. Layman, Sep 05 2003
a(n) = ((3+i*sqrt(3))/2)^(n-2) + ((3-i*sqrt(3))/2)^(n-2). - Benoit Cloitre, Oct 27 2003
a(n) = n*3F2(1/3-n/3,2/3-n/3,1-n/3 ; 2/3,4/3 ; 1) for n>=1. - John M. Campbell, Jun 01 2011
Let A(n) be the n X n matrix with -1's along the main diagonal, 1's everywhere above the main diagonal, and 1's along the subdiagonal. Then a(n) equals (-1)^(n-1) times the sum of the coefficients of the characteristic polynomial of A(n-1), for all n>1 (see Mathematica code below). - John M. Campbell, Mar 16 2012
Start with x(0)=1, y(0)=0, z(0)=0 and set x(n+1) = x(n) - z(n), y(n+1) = y(n) - x(n), z(n+1) = z(n) - y(n). Then a(n) = -y(n). But this recurrence falls into a repetitive cycle of length 6 and multiplicative factor -27, so that a(n) = -27*a(n-6) for any n>6. - Stanislav Sykora, Jun 10 2012
a(n) = A057083(n-1) - A057083(n-2). - R. J. Mathar, Oct 25 2012
G.f.: 3*x - 1/3 + 3*x/(G(0) - 1) where G(k)= 1 + 3*(2*k+3)*x/(2*k+1 - 3*x*(k+2)*(2*k+1)/(3*x*(k+2) + (k+1)/G(k+1)));(continued fraction, 3rd kind, 3-step). - Sergei N. Gladkovskii, Nov 23 2012
G.f.: Q(0,u) -1, where u=x/(1-x), Q(k,u) = 1 - u^2 + (k+2)*u - u*(k+1 - u)/Q(k+1); (continued fraction). - Sergei N. Gladkovskii, Oct 07 2013
From Vladimir Shevelev, Jul 31 2017: (Start)
For n>=1, a(n) = 2*3^((n-2)/2)*cos(Pi*(n-2)/6);
For n>=2, a(n) = K_1(n) + K_3(n-2);
For m,n>=2, a(n+m) = a(n)*K_1(m) + K_1(n)*a(m) - K_3(n-2)*K_3(m-2), where
K_1 = A057681, K_3 = A057083. (End)
EXAMPLE
G.f. = x + 2*x^2 + 3*x^3 + 3*x^4 - 9*x^6 - 27*x^7 - 54*x^8 - 81*x^9 + ...
If M^3=1 then (1-M)^6 = A057681(6) - a(6)*M + A057083(4)*M^2 = -18 + 9*M + 9*M^2. - Stanislav Sykora, Jun 10 2012
MAPLE
A057682:=n->add((-1)^j*binomial(n, 3*j+1), j=0..floor(n/3)):
seq(A057682(n), n=0..50); # Wesley Ivan Hurt, Nov 11 2014
MATHEMATICA
A[n_] := Array[KroneckerDelta[#1, #2 + 1] - KroneckerDelta[#1, #2] + Sum[KroneckerDelta[#1, #2 -q], {q, n}] &, {n, n}];
Join[{0, 1}, Table[(-1)^(n-1)*Total[CoefficientList[ CharacteristicPolynomial[A[(n-1)], x], x]], {n, 2, 30}]] (* John M. Campbell, Mar 16 2012 *)
Join[{0}, LinearRecurrence[{3, -3}, {1, 2}, 40]] (* Jean-François Alcover, Jan 08 2019 *)
PROG
(PARI) {a(n) = sum( j=0, n\3, (-1)^j * binomial(n, 3*j + 1))} /* Michael Somos, May 26 2004 */
(PARI) {a(n) = if( n<2, n>0, n-=2; polsym(x^2 - 3*x + 3, n)[n + 1])} /* Michael Somos, May 26 2004 */
(Magma) I:=[0, 1, 2]; [n le 3 select I[n] else 3*Self(n-1)-3*Self(n-2): n in [1..45]]; // Vincenzo Librandi, Nov 10 2014
(SageMath)
b=BinaryRecurrenceSequence(3, -3, 1, 2)
def A057682(n): return 0 if n==0 else b(n-1)
[A057682(n) for n in range(41)] # G. C. Greubel, Jul 14 2023
CROSSREFS
Alternating row sums of triangle A030523.
Sequence in context: A121474 A138003 A329232 * A124841 A085355 A103120
KEYWORD
sign,easy
AUTHOR
N. J. A. Sloane, Oct 20 2000
STATUS
approved