cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-10 of 16 results. Next

A220399 A convolution triangle of numbers obtained from A057682.

Original entry on oeis.org

1, 0, 1, 0, 2, 1, 0, 3, 4, 1, 0, 3, 10, 6, 1, 0, 0, 18, 21, 8, 1, 0, -9, 21, 53, 36, 10, 1, 0, -27, 0, 99, 116, 55, 12, 1, 0, -54, -81, 117, 286, 215, 78, 14, 1, 0, -81, -270, -27, 528, 650, 358, 105, 16, 1
Offset: 0

Views

Author

Philippe Deléham, Feb 19 2013

Keywords

Comments

Triangle T(n,k) given by (0, 2, -1/2, 3/2, 0, 0, 0, 0, 0, 0, 0, ...) DELTA (1, 0, 0, 0, 0, 0, 0, ...) where DELTA is the operator defined in A084938.

Examples

			Triangle begins :
1
0, 1
0, 2, 1
0, 3, 4, 1
0, 3, 10, 6, 1
0, 0, 18, 21, 8, 1
0, -9, 21, 53, 36, 10, 1
0, -27, 0, 99, 116, 55, 12, 1
		

Crossrefs

Formula

G.f.: (1-3*x+3*x^2)/(1-3*x-3*x*y+3*x^2+x^2*y)
G.f for k-th column: ((x-x^2)/(1-3*x+3*x^2))^k.
T(n,k) = 3*T(n-1,k) + T(n-1,k-1) - 3*T(n-2,k) - T(n-2,k-1), T(0,0) = 1, T(1,0) = T(2,0) = 0, T(n,k) = 0 if k<0 or if k>n.
Sum_{k, 0<=k<=n, n>0} T(n,k) = A001792(n-1).
T(n+1,n) = 2*n = A005843(n).
T(n+2,n) = A014105(n).
T(n,1) = A057682(n).

A049347 Period 3: repeat [1, -1, 0].

Original entry on oeis.org

1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0
Offset: 0

Views

Author

Keywords

Comments

G.f. 1/cyclotomic(3, x) (the third cyclotomic polynomial).
Self-convolution yields (-1)^n*A099254(n). - R. J. Mathar, Apr 06 2008
Hankel transform of A099324. - Paul Barry, Aug 10 2009
A057083(n) = p(-1) where p(x) is the unique degree-n polynomial such that p(k) = a(k) for k = 0..n. - Michael Somos, Apr 29 2012
a(n) appears, together with b(n) = A099837(n+3) in the formula 2*exp(2*Pi*n*I/3) = b(n) + a(n)*sqrt(3)*I, n >= 0, with I = sqrt(-1). See A164116 for the case N=5. - Wolfdieter Lang, Feb 27 2014
The binomial transform is 1, 0, -1, -1, 0, 1, 1, 0, -1, -1.. (see A010891). The inverse binom. transform is 1, -2, 3, -3, 0, 9, -27, 54, -81.. (see A057682). - R. J. Mathar, Feb 25 2023

Examples

			G.f. = 1 - x + x^3 - x^4 + x^6 - x^7 + x^9 - x^10 + x^12 - x^13 + x^15 + ...
		

References

  • A. T. Benjamin and J. J. Quinn, Proofs that really count: the art of combinatorial proof, M.A.A. 2003, id. 175.

Crossrefs

Alternating row sums of A049310 (Chebyshev-S). [Wolfdieter Lang, Nov 04 2011]

Programs

Formula

G.f.: 1/(1+x+x^2).
a(n) = +1 if n mod 3 = 0, a(n) = -1 if n mod 3 = 1, else 0.
a(n) = S(n, -1) = U(n, -1/2) (Chebyshev's U(n, x) polynomials.)
a(n) = 2*sqrt(3)*cos(2*Pi*n/3 + Pi/6)/3. - Paul Barry, Mar 15 2004
a(n) = Sum_{k >= 0} (-1)^(n-k)*C(n-k, k).
Given g.f. A(x), then B(x) = x * A(x) satisfies 0 = f(B(x), B(x^2)) where f(u, v) = u^2 - v + 2*u*v. - Michael Somos, Oct 03 2006
Euler transform of length 3 sequence [-1, 0, 1]. - Michael Somos, Oct 03 2006
a(n) = b(n+1) where b(n) is multiplicative with b(3^e) = 0^e, b(p^e) = 1 if p == 1 (mod 3), b(p^e) = (-1)^e if p == 2 (mod 3). - Michael Somos, Oct 03 2006
From Michael Somos, Oct 03 2006: (Start)
G.f.: (1 - x) /(1 - x^3).
a(n) = -a(1-n) = -a(n-1) - a(n-2) = a(n-3). (End)
From Michael Somos, Apr 29 2012: (Start)
G.f.: 1 / (1 + x / ( 1 - x / (1 + x))).
a(n) = (-1)^n * A010892(n).
a(n) * n! = A194770(n+1).
Revert transform of A001006. Convolution inverse of A130716. MOBIUS transform of A002324. EULER transform is A111317. BIN1 transform of itself. STIRLING transform is A143818(n+2). (End)
a(-n) = A057078(n). a(n) = A106510(n+1) unless n=0. - Michael Somos, Oct 15 2008
G.f. A(x) = 1/(1+x+x^2) = Q(0); Q(k) = 1- x/(1 - x^2/(x^2 - 1 + x/(x - 1 + x^2/(x^2 - 1/Q(k+1))))); (continued fraction 3 kind, 5-step ). - Sergei N. Gladkovskii, Jun 19 2012
a(n) = -1 + floor(67/333*10^(n+1)) mod 10. - Hieronymus Fischer, Jan 03 2013
a(n) = -1 + floor(19/26*3^(n+1)) mod 3. - Hieronymus Fischer, Jan 03 2013
a(n) = ceiling((n-1)/3) - ceiling(n/3) + floor(n/3) - floor((n-1)/3). - Wesley Ivan Hurt, Dec 06 2013
a(n) = n + 1 - 3*floor((n+2)/3). - Mircea Merca, Feb 04 2014
a(n) = A102283(n+1) for all n in Z. - Michael Somos, Sep 24 2019
E.g.f.: exp(-x/2)*(3*cos(sqrt(3)*x/2) - sqrt(3)*sin(sqrt(3)*x/2))/3. - Stefano Spezia, Oct 26 2022

Extensions

Edited by Charles R Greathouse IV, Mar 23 2010

A005773 Number of directed animals of size n (or directed n-ominoes in standard position).

Original entry on oeis.org

1, 1, 2, 5, 13, 35, 96, 267, 750, 2123, 6046, 17303, 49721, 143365, 414584, 1201917, 3492117, 10165779, 29643870, 86574831, 253188111, 741365049, 2173243128, 6377181825, 18730782252, 55062586341, 161995031226, 476941691177, 1405155255055, 4142457992363
Offset: 0

Views

Author

Keywords

Comments

This sequence, with first term a(0) deleted, appears to be determined by the conditions that the diagonal and first superdiagonal of U are {1,1,1,1,...} and {2,3,4,5,...,n+1,...} respectively, where A=LU is the LU factorization of the Hankel matrix A given by [{a(1),a(2),...}, {a(2),a(3),...}, ..., {a(n),a(n+1),...}, ...]. - John W. Layman, Jul 21 2000
Also the number of base 3 n-digit numbers (not starting with 0) with digit sum n. For the analogous sequence in base 10 see A071976, see example. - John W. Layman, Jun 22 2002
Also number of paths in an n X n grid from (0,0) to the line x=n-1, using only steps U=(1,1), H=(1,0) and D=(1,-1) (i.e., left factors of length n-1 of Motzkin paths, palindromic Motzkin paths of length 2n-2 or 2n-1). Example: a(3)=5, namely, HH, UD, HU, UH and UU. Also number of ordered trees with n edges and having nonroot nodes of outdegree at most 2. - Emeric Deutsch, Aug 01 2002
Number of symmetric Dyck paths of semilength 2n-1 with no peaks at even level. Example: a(3)=5 because we have UDUDUDUDUD, UDUUUDDDUD, UUUUUDDDDD, UUUDUDUDDD and UUUDDUUDDD, where U=(1,1) and D=(1,-1). Also number of symmetric Dyck paths of semilength 2n with no peaks at even level. Example: a(3)=5 because we have UDUDUDUDUDUD, UDUUUDUDDDUD, UUUDUDUDUDDD, UUUUUDUDDDDD and UUUDDDUUUDDD. - Emeric Deutsch, Nov 21 2003
a(n) is the sum of the (n-1)-st central trinomial coefficient and its predecessor. Example: a(4) = 6 + 7 and (1 + x + x^2)^3 = ... + 6*x^2 + 7*x^3 + ... . - David Callan, Feb 07 2004
a(n) is the number of UDU-free paths of n upsteps (U) and n downsteps (D) that start U (n>=1). Example: a(2)=2 counts UUDD, UDDU. - David Callan, Aug 18 2004
a(n) is also the number of Grand-Dyck paths of semilength n starting with an up-step and avoiding the pattern DUD. - David Bevan, Nov 19 2019
Hankel transform of a(n+1) = [1,2,5,13,35,96,...] gives A000012 = [1,1,1,1,1,1,...]. - Philippe Deléham, Oct 24 2007
Equals row sums of triangle A136787 starting (1, 2, 5, 13, 35, ...). - Gary W. Adamson, Jan 21 2008
a(n) is the number of permutations on [n] that avoid the patterns 1-23-4 and 1-3-2, where the omission of a dash in a pattern means the permutation entries must be adjacent. Example: a(4) = 13 counts all 14 (Catalan number) (1-3-2)-avoiding permutations on [4] except 1234. - David Callan, Jul 22 2008
a(n) is also the number of involutions of length 2n-2 which are invariant under the reverse-complement map and have no decreasing subsequences of length 4. - Eric S. Egge, Oct 21 2008
Hankel transform is A010892. - Paul Barry, Jan 19 2009
a(n) is the number of Dyck words of semilength n with no DUUU. For example, a(4) = 14-1 = 13 because there is only one Dyck 4-word containing DUUU, namely UDUUUDDD. - Eric Rowland, Apr 21 2009
Inverse binomial transform of A024718. - Philippe Deléham, Dec 13 2009
Let w(i, j, n) denote walks in N^2 which satisfy the multivariate recurrence
w(i, j, n) = w(i - 1, j, n - 1) + w(i, j - 1, n - 1) + w(i + 1, j - 1,n - 1) with boundary conditions w(0,0,0) = 1 and w(i,j,n) = 0 if i or j or n is < 0. Let alpha(n) the number of such walks of length n, alpha(n) = Sum_{i = 0..n, j=0..n} w(i, j, n). Then a(n+1) = alpha(n). - Peter Luschny, May 21 2011
Number of length-n strings [d(0),d(1),d(2),...,d(n-1)] where 0 <= d(k) <= k and abs(d(k) - d(k-1)) <= 1 (smooth factorial numbers, see example). - Joerg Arndt, Nov 10 2012
a(n) is the number of n-multisets of {1,...,n} containing no pair of consecutive integers (e.g., 111, 113, 133, 222, 333 for n=3). - David Bevan, Jun 10 2013
a(n) is also the number of n-multisets of [n] in which no integer except n occurs exactly once (e.g., 111, 113, 222, 223, 333 for n=3). - David Bevan, Nov 19 2019
Number of minimax elements in the affine Weyl group of the Lie algebra so(2n+1) or the Lie algebra sp(2n). See Panyushev 2005. Cf. A245455. - Peter Bala, Jul 22 2014
The shifted, signed 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 interpolating (here t=-2) o.g.f. G(x,t) = (1-sqrt(1-4x/(1+(1-t)x)))/2 and inverse o.g.f. Ginv(x,t) = x(1-x)/(1+(t-1)x(1-x)) (A057682). See A091867 for more info on this family. - Tom Copeland, Nov 09 2014
Alternatively, this sequence corresponds to the number of positive walks with n steps {-1,0,1} starting at the origin, ending at any altitude, and staying strictly above the x-axis. - David Nguyen, Dec 01 2016
Let N be a squarefree number with n prime factors: p_1 < p_2 < ... < p_n. Let D be its set of divisors, E the subset of D X D made of the (d_1, d_2) for which, provided that we know which p_i are in d_1, which p_i are in d_2, d_1 <= d_2 is provable without needing to know the numerical values of the p_i. It appears that a(n+1) is the number of (d_1, d_2) in E such that d_1 and d_2 are coprime. - Luc Rousseau, Aug 21 2017
Number of ordered rooted trees with n non-root nodes and all non-root nodes having outdegrees 1 or 2. - Andrew Howroyd, Dec 04 2017
a(n) is the number of compositions (ordered partitions) of n where there are A001006(k-1) sorts of part k (see formula by Andrew Howroyd, Dec 04 2017). - Joerg Arndt, Jan 26 2024

Examples

			G.f. = 1 + x + 2*x^2 + 5*x^3 + 13*x^4 + 35*x^5 + 96*x^6 + 267*x^7 + ...
a(3) = 5, a(4) = 13; since the top row of M^3 = (5, 5, 2, 1, ...)
From _Eric Rowland_, Sep 25 2021: (Start)
There are a(4) = 13 directed animals of size 4:
  O
  O    O    O    OO              O         O
  O    O    OO   O    OO   O    OO   OOO   O    O    OO    O
  O    OO   O    O    OO   OOO  O    O    OO   OOO  OO   OOO  OOOO
(End)
From _Joerg Arndt_, Nov 10 2012: (Start)
There are a(4)=13 smooth factorial numbers of length 4 (dots for zeros):
[ 1]   [ . . . . ]
[ 2]   [ . . . 1 ]
[ 3]   [ . . 1 . ]
[ 4]   [ . . 1 1 ]
[ 5]   [ . . 1 2 ]
[ 6]   [ . 1 . . ]
[ 7]   [ . 1 . 1 ]
[ 8]   [ . 1 1 . ]
[ 9]   [ . 1 1 1 ]
[10]   [ . 1 1 2 ]
[11]   [ . 1 2 1 ]
[12]   [ . 1 2 2 ]
[13]   [ . 1 2 3 ]
(End)
From _Joerg Arndt_, Nov 22 2012: (Start)
There are a(4)=13 base 3 4-digit numbers (not starting with 0) with digit sum 4:
[ 1]   [ 2 2 . . ]
[ 2]   [ 2 1 1 . ]
[ 3]   [ 1 2 1 . ]
[ 4]   [ 2 . 2 . ]
[ 5]   [ 1 1 2 . ]
[ 6]   [ 2 1 . 1 ]
[ 7]   [ 1 2 . 1 ]
[ 8]   [ 2 . 1 1 ]
[ 9]   [ 1 1 1 1 ]
[10]   [ 1 . 2 1 ]
[11]   [ 2 . . 2 ]
[12]   [ 1 1 . 2 ]
[13]   [ 1 . 1 2 ]
(End)
		

References

  • J. E. Goodman and J. O'Rourke, editors, Handbook of Discrete and Computational Geometry, CRC Press, 1997, p. 237.
  • T. Mansour, Combinatorics of Set Partitions, Discrete Mathematics and Its Applications, CRC Press, 2013, p. 377.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • R. P. Stanley, Enumerative Combinatorics, Cambridge, Vol. 2, 1999; see Problem 6.46a.
  • R. P. Stanley, Catalan Numbers, Cambridge, 2015, p. 132.

Crossrefs

See also A005775. Inverse of A001006. Also sum of numbers in row n+1 of array T in A026300. Leading column of array in A038622.
The right edge of the triangle A062105.
Column k=3 of A295679.
Interpolates between Motzkin numbers (A001006) and Catalan numbers (A000108). Cf. A054391, A054392, A054393, A055898.
Except for the first term a(0), sequence is the binomial transform of A001405.
a(n) = A002426(n-1) + A005717(n-1) if n > 0. - Emeric Deutsch, Aug 14 2002

Programs

  • Haskell
    a005773 n = a005773_list !! n
    a005773_list = 1 : f a001006_list [] where
       f (x:xs) ys = y : f xs (y : ys) where
         y = x + sum (zipWith (*) a001006_list ys)
    -- Reinhard Zumkeller, Mar 30 2012
    
  • Magma
    R:=PowerSeriesRing(Rationals(), 30); Coefficients(R!( 2*x/(3*x-1+Sqrt(1-2*x-3*x^2)) )); // G. C. Greubel, Apr 05 2019
  • Maple
    seq( sum(binomial(i-1, k)*binomial(i-k, k), k=0..floor(i/2)), i=0..30 ); # Detlef Pauly (dettodet(AT)yahoo.de), Nov 09 2001
    A005773:=proc(n::integer)
    local i, j, A, istart, iend, KartProd, Liste, Term, delta;
        A:=0;
        for i from 0 to n do
            Liste[i]:=NULL;
            istart[i]:=0;
            iend[i]:=n-i+1:
            for j from istart[i] to iend[i] do
                Liste[i]:=Liste[i], j;
            end do;
            Liste[i]:=[Liste[i]]:
        end do;
        KartProd:=cartprod([seq(Liste[i], i=1..n)]);
        while not KartProd[finished] do
            Term:=KartProd[nextvalue]();
            delta:=1;
            for i from 1 to n-1 do
                if (op(i, Term) - op(i+1, Term))^2 >= 2 then
                    delta:=0;
                    break;
                end if;
            end do;
            A:=A+delta;
        end do;
    end proc; # Thomas Wieder, Feb 22 2009:
    # n -> [a(0),a(1),..,a(n)]
    A005773_list := proc(n) local W, m, j, i;
    W := proc(i, j, n) option remember;
    if min(i, j, n) < 0 or max(i, j) > n then 0
    elif n = 0 then if i = 0 and j = 0 then 1 else 0 fi
    else W(i-1,j,n-1)+W(i,j-1,n-1)+W(i+1,j-1,n-1) fi end:
    [1,seq(add(add(W(i,j,m),i=0..m),j=0..m),m=0..n-1)] end:
    A005773_list(27); # Peter Luschny, May 21 2011
    A005773 := proc(n)
        option remember;
        if n <= 1 then
            1 ;
        else
            2*n*procname(n-1)+3*(n-2)*procname(n-2) ;
            %/n ;
        end if;
    end proc:
    seq(A005773(n),n=0..10) ; # R. J. Mathar, Jul 25 2017
  • Mathematica
    CoefficientList[Series[(2x)/(3x-1+Sqrt[1-2x-3x^2]), {x,0,40}], x] (* Harvey P. Dale, Apr 03 2011 *)
    a[0]=1; a[n_] := Sum[k/n*Sum[Binomial[n, j]*Binomial[j, 2*j-n-k], {j, 0, n}], {k, 1, n}]; Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Mar 31 2015, after Vladimir Kruchinin *)
    A005773[n_] := 2 (-1)^(n+1) JacobiP[n - 1, 3, -n -1/2, -7] / (n^2 + n); A005773[0] := 1; Table[A005773[n], {n, 0, 27}] (* Peter Luschny, May 25 2021 *)
  • PARI
    a(n)=if(n<2,n>=0,(2*n*a(n-1)+3*(n-2)*a(n-2))/n)
    
  • PARI
    for(n=0, 27, print1(if(n==0, 1, sum(k=0, n-1, (-1)^(n - 1 + k)*binomial(n - 1, k)*binomial(2*k + 1, k + 1))),", ")) \\ Indranil Ghosh, Mar 14 2017
    
  • PARI
    Vec(1/(1-serreverse(x*(1-x)/(1-x^3) + O(x*x^25)))) \\ Andrew Howroyd, Dec 04 2017
    
  • Sage
    def da():
        a, b, c, d, n = 0, 1, 1, -1, 1
        yield 1
        yield 1
        while True:
            yield b + (-1)^n*d
            n += 1
            a, b = b, (3*(n-1)*n*a+(2*n-1)*n*b)//((n+1)*(n-1))
            c, d = d, (3*(n-1)*c-(2*n-1)*d)//n
    A005773 = da()
    print([next(A005773) for  in range(28)]) # _Peter Luschny, May 16 2016
    
  • Sage
    (2*x/(3*x-1+sqrt(1-2*x-3*x^2))).series(x, 30).coefficients(x, sparse=False) # G. C. Greubel, Apr 05 2019
    

Formula

G.f.: 2*x/(3*x-1+sqrt(1-2*x-3*x^2)). - Len Smiley
Also a(0)=1, a(n) = Sum_{k=0..n-1} M(k)*a(n-k-1), where M(n) are the Motzkin numbers (A001006).
D-finite with recurrence n*a(n) = 2*n*a(n-1) + 3*(n-2)*a(n-2), a(0)=a(1)=1. - Michael Somos, Feb 02 2002
G.f.: 1/2+(1/2)*((1+x)/(1-3*x))^(1/2). Related to Motzkin numbers A001006 by a(n+1) = 3*a(n) - A001006(n-1) [see Yaqubi Lemma 2.6].
a(n) = Sum_{q=0..n} binomial(q, floor(q/2))*binomial(n-1, q) for n > 0. - Emeric Deutsch, Aug 15 2002
From Paul Barry, Jun 22 2004: (Start)
a(n+1) = Sum_{k=0..n} (-1)^(n+k)*C(n, k)*C(2*k+1, k+1).
a(n) = 0^n + Sum_{k=0..n-1} (-1)^(n+k-1)*C(n-1, k)*C(2*k+1, k+1). (End)
a(n+1) = Sum_{k=0..n} (-1)^k*3^(n-k)*binomial(n, k)*A000108(k). - Paul Barry, Jan 27 2005
Starting (1, 2, 5, 13, ...) gives binomial transform of A001405 and inverse binomial transform of A001700. - Gary W. Adamson, Aug 31 2007
Starting (1, 2, 5, 13, 35, 96, ...) gives row sums of triangle A132814. - Gary W. Adamson, Aug 31 2007
G.f.: 1/(1-x/(1-x-x^2/(1-x-x^2/(1-x-x^2/(1-x-x^2/(1-x-x^2/(1-... (continued fraction). - Paul Barry, Jan 19 2009
G.f.: 1+x/(1-2*x-x^2/(1-x-x^2/(1-x-x^2/(1-x-x^2/(1-.... (continued fraction). - Paul Barry, Jan 19 2009
a(n) = Sum_{l_1=0..n+1} Sum_{l_2=0..n}...Sum_{l_i=0..n-i}...Sum_{l_n=0..1} delta(l_1,l_2,...,l_i,...,l_n) where delta(l_1,l_2,...,l_i,...,l_n) = 0 if any (l_i - l_(i+1))^2 >= 2 for i=1..n-1 and delta(l_1,l_2,..., l_i,...,l_n) = 1 otherwise. - Thomas Wieder, Feb 25 2009
INVERT transform of offset Motzkin numbers (A001006): (a(n)){n>=1}=(1,1,2,4,9,21,...). - _David Callan, Aug 27 2009
A005773(n) = ((n+3)*A001006(n+1) + (n-3)*A001006(n)) * (n+2)/(18*n) for n > 0. - Mark van Hoeij, Jul 02 2010
a(n) = Sum_{k=1..n} (k/n * Sum_{j=0..n} binomial(n,j)*binomial(j,2*j-n-k)). - Vladimir Kruchinin, Sep 06 2010
a(0) = 1; a(n+1) = Sum_{t=0..n} n!/((n-t)!*ceiling(t/2)!*floor(t/2)!). - Andrew S. Hays, Feb 02 2011
a(n) = leftmost column term of M^n*V, where M = an infinite quadradiagonal matrix with all 1's in the main, super and subdiagonals, [1,0,0,0,...] in the diagonal starting at position (2,0); and rest zeros. V = vector [1,0,0,0,...]. - Gary W. Adamson, Jun 16 2011
From Gary W. Adamson, Jul 29 2011: (Start)
a(n) = upper left term of M^n, a(n+1) = sum of top row terms of M^n; M = an infinite square production matrix in which the main diagonal is (1,1,0,0,0,...) as follows:
1, 1, 0, 0, 0, 0, ...
1, 1, 1, 0, 0, 0, ...
1, 1, 0, 1, 0, 0, ...
1, 1, 1, 0, 1, 0, ...
1, 1, 1, 1, 0, 1, ...
1, 1, 1, 1, 1, 0, ... (End)
Limit_{n->oo} a(n+1)/a(n) = 3.0 = lim_{n->oo} (1 + 2*cos(Pi/n)). - Gary W. Adamson, Feb 10 2012
a(n) = A025565(n+1) / 2 for n > 0. - Reinhard Zumkeller, Mar 30 2012
With first term deleted: E.g.f.: a(n) = n! * [x^n] exp(x)*(BesselI(0, 2*x) + BesselI(1, 2*x)). - Peter Luschny, Aug 25 2012
G.f.: G(0)/2 + 1/2, where G(k) = 1 + 2*x*(4*k+1)/( (2*k+1)*(1+x) - x*(1+x)*(2*k+1)*(4*k+3)/(x*(4*k+3) + (1+x)*(k+1)/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, Jun 24 2013
a(n) ~ 3^(n-1/2)/sqrt(Pi*n). - Vaclav Kotesovec, Jul 30 2013
For n > 0, a(n) = (-1)^(n+1) * hypergeom([3/2, 1-n], [2], 4). - Vladimir Reshetnikov, Apr 25 2016
a(n) = GegenbauerC(n-2,-n+1,-1/2) + GegenbauerC(n-1,-n+1,-1/2) for n >= 1. - Peter Luschny, May 12 2016
0 = a(n)*(+9*a(n+1) + 18*a(n+2) - 9*a(n+3)) + a(n+1)*(-6*a(n+1) + 7*a(n+2) - 2*a(n+3)) + a(n+2)*(-2*a(n+2) + a(n+3)) for n >= 0. - Michael Somos, Dec 01 2016
G.f.: 1/(1-x*G(x)) where G(x) is g.f. of A001006. - Andrew Howroyd, Dec 04 2017
a(n) = (-1)^(n + 1)*2*JacobiP(n - 1, 3, -n - 1/2, -7)/(n^2 + n). - Peter Luschny, May 25 2021
a(n+1) = A005043(n) + 2*A005717(n) for n >= 1. - Peter Bala, Feb 11 2022
a(n) = Sum_{k=0..n-1} A064189(n-1,k) for n >= 1. - Alois P. Heinz, Aug 29 2022

A057083 Scaled Chebyshev U-polynomials evaluated at sqrt(3)/2; expansion of 1/(1 - 3*x + 3*x^2).

Original entry on oeis.org

1, 3, 6, 9, 9, 0, -27, -81, -162, -243, -243, 0, 729, 2187, 4374, 6561, 6561, 0, -19683, -59049, -118098, -177147, -177147, 0, 531441, 1594323, 3188646, 4782969, 4782969, 0, -14348907, -43046721, -86093442, -129140163, -129140163, 0
Offset: 0

Views

Author

Wolfdieter Lang, Aug 11 2000

Keywords

Comments

With different sign pattern, see A000748.
Conjecture: Let M be any endomorphism on any vector space, such that M^3 = 1 (identity). Then (1-M)^n = A057681(n) - A057682(n)*M + z(n)*M^2, where z(0) = z(1) = 0 and, apparently, z(n+2) = a(n). - Stanislav Sykora, Jun 10 2012

Crossrefs

Programs

Formula

a(n) = S(n, sqrt(3))*(sqrt(3))^n with S(n, x) := U(n, x/2), Chebyshev polynomials of 2nd kind, A049310.
a(2*n) = A057078(n)*3^n; a(2*n+1)= A010892(n)*3^(n+1).
G.f.: 1/(1-3*x+3*x^2).
Binomial transform of A057079. a(n) = Sum_{k=0..n} 2*binomial(n, k)*cos((k-1)Pi/3). - Paul Barry, Aug 19 2003
For n > 5, a(n) = -27*a(n-6) - Gerald McGarvey, Apr 21 2005
a(n) = Sum_{k=0..n} A109466(n,k)*3^k. - Philippe Deléham, Nov 12 2008
a(n) = Sum_{k=1..n} binomial(k,n-k) * 3^k *(-1)^(n-k) for n>0; a(0)=1. - Vladimir Kruchinin, Feb 07 2011
By the conjecture: 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) = z(n+2). This recurrence indeed ends up in a repetitive cycle of length 6 and multiplicative factor -27, confirming G. McGarvey's observation. - Stanislav Sykora, Jun 10 2012
G.f.: Q(0) where Q(k) = 1 + k*(3*x+1) + 9*x - 3*x*(k+1)*(k+4)/Q(k+1) ; (continued fraction). - Sergei N. Gladkovskii, Mar 15 2013
G.f.: G(0)/(2-3*x), where G(k)= 1 + 1/(1 - x*(k+3)/(x*(k+4) + 2/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, Jun 16 2013
a(n) = Sum_{k = 0..floor(n/3)} (-1)^k*binomial(n+2,3*k+2). Sykora's conjecture in the Comments section follows easily from this. - Peter Bala, Nov 21 2016
From Vladimir Shevelev, Jul 30 2017: (Start)
a(n) = 2*3^(n/2)*cos(Pi*(n-2)/6);
a(n) = K_2(n+2) - K_1(n+2);
For m,n>=1, a(n+m) = a(n-1)*K_1(m+1) + K_2(n+1)*K_2(m+1) + K_1(n+1)*a(m-1) where K_1 = A057681, K_2 = A057682. (End)

A000748 Expansion of bracket function.

Original entry on oeis.org

1, -3, 6, -9, 9, 0, -27, 81, -162, 243, -243, 0, 729, -2187, 4374, -6561, 6561, 0, -19683, 59049, -118098, 177147, -177147, 0, 531441, -1594323, 3188646, -4782969, 4782969, 0, -14348907, 43046721, -86093442, 129140163, -129140163, 0, 387420489, -1162261467
Offset: 0

Views

Author

Keywords

Comments

It appears that the sequence coincides with its third-order absolute difference. - John W. Layman, Sep 05 2003
It appears that, for n > 0, the (unsigned) a(n) = 3*|A057682(n)| = 3*|Sum_{j=0..floor(n/3)} (-1)^j*binomial(n,3*j+1)|. - John W. Layman, Sep 05 2003

Examples

			G.f. = 1 - 3*x + 6*x^2 - 9*x^3 + 9*x^4 - 27*x^6 + 81*x^7 - 162*x^8 + ...
		

References

  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Column 3 of A307047.
Cf. A057682.

Programs

  • Magma
    I:=[1,-3]; [n le 2 select I[n] else -3*Self(n-1)-3*Self(n-2): n in [1..40]]; // Vincenzo Librandi, Feb 11 2016
  • Maple
    A000748:=(-1-2*z-3*z**2-3*z**3+18*z**5)/(-1+z+9*z**5); # conjectured by Simon Plouffe in his 1992 dissertation; gives sequence apart from signs
    a:= n-> (Matrix([[ -3,1], [ -3,0]])^n)[1,1]: seq(a(n), n=0..40); # Alois P. Heinz, Sep 06 2008
  • Mathematica
    a[n_] := 2*3^(n/2)*Sin[(1-5*n)*Pi/6]; Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Mar 12 2014 *)
    LinearRecurrence[{-3, -3}, {1, -3}, 40] (* Jean-François Alcover, Feb 11 2016 *)
  • PARI
    {a(n) = if( n<0, 0, polcoeff(1 / (1 + 3*x + 3*x^2) + x * O(x^n), n))}; /* Michael Somos, Jun 07 2005 */
    
  • PARI
    {a(n) = if( n<0, 0, 3^((n+1)\2) * (-1)^(n\6) * ((-1)^n + (n%3==2)))}; /* Michael Somos, Sep 29 2007 */
    

Formula

G.f.: 1/((1+x)^3-x^3).
a(n) = A007653(3^n).
a(n) = -3*a(n-1) - 3*a(n-2). - Paul Curtz, May 12 2008
a(n) = Sum_{k=1..n} binomial(k,n-k)*(-3)^(k) for n > 0; a(0)=1. - Vladimir Kruchinin, Feb 07 2011
G.f.: 1/(1 + 3*x /(1 - x /(1+x))). - Michael Somos, May 12 2012
G.f.: G(0)/2, where G(k) = 1 + 1/( 1 - 3*x*(2*k+1 + x)/(3*x*(2*k+2 + x) - 1/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, Feb 09 2014
a(n) = 2*3^(n/2)*sin((1-5*n)*Pi/6). - Jean-François Alcover, Mar 12 2014
a(n) = (-1)^n * Sum_{k=0..floor(n/3)} (-1)^k * binomial(n+2,3*k+2). - Seiichi Manyama, Aug 05 2024
a(n) = (i*sqrt(3)/3)*((-3/2 - i*sqrt(3)/2)^(n+1) - (-3/2 + i*sqrt(3)/2)^(n+1)), where i = sqrt(-1). - Taras Goy, Jan 20 2025
a(n) = -2*a(n-1) + 3*a(n-3). - Taras Goy, Jan 26 2025

A057681 a(n) = Sum_{j=0..floor(n/3)} (-1)^j*binomial(n,3*j).

Original entry on oeis.org

1, 1, 1, 0, -3, -9, -18, -27, -27, 0, 81, 243, 486, 729, 729, 0, -2187, -6561, -13122, -19683, -19683, 0, 59049, 177147, 354294, 531441, 531441, 0, -1594323, -4782969, -9565938, -14348907, -14348907, 0, 43046721, 129140163, 258280326, 387420489, 387420489
Offset: 0

Views

Author

N. J. A. Sloane, Oct 20 2000

Keywords

Comments

Let M be any endomorphism on any vector space, such that M^3 = 1 (identity). Then (1-M)^n = a(n)-A057682(n)*M+z(n)*M^2, where z(0)=z(1)=0 and, apparently, z(n+2)=A057083(n). - Stanislav Sykora, Jun 10 2012
Pisano period lengths: 1, 3, 1, 6, 24, 3, 6, 12, 1, 24, 60, 6, 12, 6, 24, 24, 96, 3, 18, 24, ... . - R. J. Mathar, Aug 10 2012
{A057681, A057682, A*}, where A* is A057083 prefixed by two 0's, is the difference analog of the trigonometric functions of order 3, {k_1(x), k_2(x), k_3(x)}. For a definition see [Erdelyi] and the Shevelev link. - Vladimir Shevelev, Jun 25 2017

Examples

			If M^3=1 then (1-M)^6 = a(6)-A057682(6)*M+A057083(4)*M^2 = -18+9*M+9*M^2.
		

References

  • A. Erdelyi, Higher Transcendental Functions, McGraw-Hill, 1955, Vol. 3, Chapter XVIII.

Crossrefs

Programs

  • GAP
    a:=[1,1];; for n in [3..40] do a[n]:=3*a[n-1]-3*a[n-2]; od; Concatenation([1],a); # Muniru A Asiru, Oct 24 2018
  • Magma
    I:=[1,1]; [1] cat [n le 2 select I[n] else 3*Self(n-1) - 3*Self(n-2): n in [1..40]]; // G. C. Greubel, Oct 23 2018
    
  • Maple
    A057681 := n->add((-1)^j*binomial(n,3*j),j=0..floor(n/3)); seq(A057681(n), n=0..50);
    A057681_list := proc(n) local i; series((1+2*exp(3*z/2)*cos(z*sqrt(3/4)))/3, z,n+2): seq(i!*coeff(%,z,i),i=0..n) end: A057681_list(38); # Peter Luschny, Jul 10 2012
  • Mathematica
    Join[{1},LinearRecurrence[{3,-3},{1,1},40]] (* Harvey P. Dale, Aug 19 2014 *)
  • PARI
    x='x+O('x^40); Vec((1-x)^2/((1-x)^3+x^3)) \\ G. C. Greubel, Oct 23 2018
    

Formula

From Paul Barry, Feb 26 2004: (Start)
G.f.: (1-x)^2/((1-x)^3+x^3).
a(n) = 0^n/3 + 2*3^((n-2)/2)*cos(Pi*n/6). (End)
From Paul Barry, Feb 27 2004: (Start)
Binomial transform of (1, 0, 0, -1, 0, 0, 1, 0, 0, -1, 0, ...).
E.g.f.: 2*exp(3x/2)*cos(sqrt(3)*x/2)/3+1/3.
a(n) = (((3+sqrt(-3))/2)^n+((3-sqrt(-3))/2)^n)/3+0^n/3. (End)
a(n) = 6*a(n-1)-15*a(n-2)+20*a(n-3)-15*a(n-4)+6*a(n-5). - Paul Curtz, Jan 02 2008
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)=x(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
E.g.f.: (1+2*exp(3*z/2)*cos(z*sqrt(3/4)))/3. - Peter Luschny, Jul 10 2012
a(0)=a(1)=a(2)=1, a(n)=3*a(n-1)-3*a(n-2), n>=3. - Wesley Ivan Hurt, Nov 11 2014
For n>=1, a(n) = 2*3^((n-2)/2)*cos(Pi*n/6). - Vladimir Shevelev, Jun 25 2017
a(n+m) = a(n)*a(m)-A057682(n)*A*057083(m)-A*057083(n)*A057682(m), where A*057083 is A057083 prefixed by two 0's. - Vladimir Shevelev, Jun 25 2017

A030523 A convolution triangle of numbers obtained from A001792.

Original entry on oeis.org

1, 3, 1, 8, 6, 1, 20, 25, 9, 1, 48, 88, 51, 12, 1, 112, 280, 231, 86, 15, 1, 256, 832, 912, 476, 130, 18, 1, 576, 2352, 3276, 2241, 850, 183, 21, 1, 1280, 6400, 10976, 9424, 4645, 1380, 245, 24, 1, 2816, 16896, 34848, 36432, 22363, 8583, 2093, 316, 27, 1
Offset: 1

Views

Author

Keywords

Comments

a(n,m) := s1p(3; n,m), a member of a sequence of unsigned triangles including s1p(2; n,m)= A007318(n-1,m-1) (Pascal's triangle). Signed version: (-1)^(n-m)*a(n,m) := s1(3; n,m).
With offset 0, this is T(n,k) = Sum_{i=0..n} C(n,i)*C(i+k+1,2k+1). Binomial transform of A078812 (product of lower triangular matrices). - Paul Barry, Jun 22 2004
Subtriangle of the triangle T(n,k) given by (0, 3, -1/3, 4/3, 0, 0, 0, 0, 0, 0, 0, ... ) DELTA (1, 0, 0, 0, 0, 0, 0, 0, ...) where DELTA is the operator defined in A084938. - Philippe Deléham, Feb 20 2013

Examples

			{1}; {3,1}; {8,6,1}; {20,25,9,1}; {48,88,51,12,1}; ...
(0, 3, -1/3, 4/3, 0, 0, ...) DELTA (1, 0, 0, 0, ...) begins:
1
0   1
0   3   1
0   8   6   1
0  20  25   9   1
0  48  88  51  12   1
...
- _Philippe Deléham_, Feb 20 2013
		

Crossrefs

Cf. A057682 (alternating row sums).

Programs

  • Mathematica
    a[n_, m_] := SeriesCoefficient[(1-2*x)^2/((x^2-x)*y + (1-2*x)^2) - 1, {x, 0, n}, {y, 0, m}]; Table[a[n, m], {n, 1, 10}, {m, 1, n}] // Flatten (* Jean-François Alcover, Apr 28 2015, after Vladimir Kruchinin *)

Formula

a(n, 1) = A001792(n-1).
Row sums = A039717(n).
a(n, m) = 2*(2*m+n-1)*a(n-1, m)/n + m*a(n-1, m-1)/n, n >= m >= 1; a(n, m) := 0, n
T(n,k) = 4*T(n-1,k) - 4*T(n-2,k) + T(n-1,k-1) - T(n-2,k-1), T(0,0) = 1, T(1,0) = T(2,0) = 0, T(n,k) = 0 if k > n or if k < 0. - Philippe Deléham, Feb 20 2013
Sum_{k=1..n} T(n,k)*2^(k-1) = A140766(n). -Philippe Deléham, Feb 20 2013
G.f.: (1-2*x)^2/((x^2-x)*y+(1-2*x)^2)-1. - Vladimir Kruchinin, Apr 28 2015

A240438 Greatest minimal difference between numbers of adjacent cells in a regular hexagonal honeycomb of order n with cells numbered from 1 through the total number of cells, the order n corresponding to the number of cells on one side of the honeycomb.

Original entry on oeis.org

0, 1, 5, 11, 18, 28, 40, 53, 69, 87, 106, 128, 152, 177, 205, 235, 266, 300, 336, 373, 413, 455, 498, 544, 592, 641, 693, 747, 802, 860, 920, 981, 1045, 1111, 1178, 1248, 1320, 1393, 1469, 1547, 1626, 1708, 1792, 1877, 1965, 2055, 2146, 2240, 2336, 2433, 2533, 2635
Offset: 1

Author

Jörg Zurkirchen, Apr 05 2014

Keywords

Comments

Difference table of a(n), with a(0)=0 and offset=0:
0, 0, 1, 5, 11, 18, 28, 40, 53, 69, ...
0, 1, 4, 6, 7, 10, 12, 13, 16, 18, ... = A047234(n+1)
1, 3, 2, 1, 3, 2, 1, 3, 2, 1, ... = A130784
2, -1, -1, 2, -1, -1, 2, -1, -1, 2, ... = -A131713(n+1)
-3, 0, 3, -3, 0, 3, -3, 0, 3, -3; ... = A099838(n+4)
3, 3, -6, 3, 3, -6, 3, 3, -6, 3, ...
0, -9, 9, 0, -9, 9, 0, -9, 9, 0, ...
-9, 18, -9, -9, 18, -9, -9, 18, -9, -9, ...
First column: see A057682. - Paul Curtz, Nov 11 2014
Diameter of the chamber graph Γ(Alt(2n+1)). Definition of this graph:
Each vertex v is a sequence (v[1],v[2],...,v[n]) of length n, where each v[i] is a 2-subset of {1,2,...,2n+1} and v[i] and v[j] are disjoint unless i=j.
Vertices u and v are connected iff either:
u and v are identical except for their first elements u[1] and v[1], or
u and v are identical except for some i for which u[i]=v[i+1] and v[i]=u[i+1] - Tim Crinion, 17 Feb 2019

Examples

			For n = 3 an example of a honeycomb with the greatest minimal difference of a(3) = 5 is:
.         __
.      __/ 7\__
.   __/15\__/13\__
.  / 4\__/ 2\__/ 1\
.  \__/10\__/ 8\__/
.  /18\__/16\__/14\
.  \__/ 5\__/ 3\__/
.  /12\__/11\__/ 9\
.  \__/19\__/17\__/
.     \__/ 6\__/
.        \__/
.
		

References

  • 22ème Championnat des jeux mathématiques et logiques - 1/4 de finale individuels 2008, problème 18, «Les ruches d’Abella»

Programs

  • Magma
    [n*(n-1)-Floor((n+1)/3): n in [1..60]]; // Vincenzo Librandi, Nov 12 2014
  • Maple
    A240438:=n->n*(n-1)-floor((n+1)/3); seq(A240438(n), n=1..50); # Wesley Ivan Hurt, Apr 08 2014
  • Mathematica
    Table[n (n - 1) - Floor[(n + 1)/3], {n, 50}] (* Wesley Ivan Hurt, Apr 08 2014 *)
    CoefficientList[Series[x (x + 1) (2 x + 1) / ((1 - x)^3 (x^2 + x + 1)), {x, 0, 60}], x] (* Vincenzo Librandi, Nov 12 2014 *)
    LinearRecurrence[{2, -1, 1, -2, 1},{0, 1, 5, 11, 18},52] (* Ray Chandler, Sep 24 2015 *)

Formula

a(n) = n*(n-1)-floor((n+1)/3).
G.f.: -x^2*(x+1)*(2*x+1) / ((x-1)^3*(x^2+x+1)). - Colin Barker, Apr 08 2014
a(n+3) = a(n) + 6*n+5. - Paul Curtz, Nov 11 2014
a(n) = n^2 - (A042965(n+1)=0, 1, 3, 4, ...). - Paul Curtz, Nov 11 2014
a(n+1) = a(n) + A047234(n+1). - Paul Curtz, Nov 11 2014

A307079 Square array A(n,k), n >= 0, k >= 1, read by antidiagonals, where column k is the expansion of g.f. ((1-x)^(k-2))/((1-x)^k+x^k).

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 2, 3, 0, 1, 1, 2, 3, 3, -4, 1, 1, 2, 3, 4, 0, -8, 1, 1, 2, 3, 4, 4, -9, -8, 1, 1, 2, 3, 4, 5, 0, -27, 0, 1, 1, 2, 3, 4, 5, 5, -14, -54, 16, 1, 1, 2, 3, 4, 5, 6, 0, -48, -81, 32, 1, 1, 2, 3, 4, 5, 6, 6, -20, -116, -81, 32, 1
Offset: 0

Author

Seiichi Manyama, Mar 22 2019

Keywords

Examples

			Square array begins:
   1,  1,   1,    1,   1,   1, 1, 1, 1, ...
   1,  2,   2,    2,   2,   2, 2, 2, 2, ...
   1,  2,   3,    3,   3,   3, 3, 3, 3, ...
   1,  0,   3,    4,   4,   4, 4, 4, 4, ...
   1, -4,   0,    4,   5,   5, 5, 5, 5, ...
   1, -8,  -9,    0,   5,   6, 6, 6, 6, ...
   1, -8, -27,  -14,   0,   6, 7, 7, 7, ...
   1,  0, -54,  -48, -20,   0, 7, 8, 8, ...
   1, 16, -81, -116, -75, -27, 0, 8, 9, ...
		

Crossrefs

Columns 1-6 give A000012, A099087, A057682(n+1), A099587(n+1), A289321(n+1), A307089.

Programs

  • Mathematica
    T[n_, k_] := Sum[(-1)^j * Binomial[n+1, k*j+1], {j, 0, Floor[n/k]}]; Table[T[n-k, k], {n, 0, 12}, {k, n, 1, -1}] // Flatten (* Amiram Eldar, May 20 2021 *)

Formula

A(n,k) = Sum_{j=0..floor(n/k)} (-1)^j * binomial(n+1,k*j+1).
A(n,2*k) = Sum_{i=0..n} Sum_{j=0..n-i} (-1)^j * binomial(i,k*j) * binomial(n-i,k*j).

A094717 a(n) = n! * Sum_{i+2j+3k=n} 1/(i!*(2j)!*(3k)!).

Original entry on oeis.org

1, 1, 2, 5, 12, 36, 113, 351, 1080, 3281, 9882, 29646, 88817, 266085, 797526, 2391485, 7173360, 21520080, 64563521, 193700403, 581120892, 1743392201, 5230206126, 15690618378, 47071766561, 141215033961, 423644570442, 1270932914165, 3812797945332, 11438393835996
Offset: 0

Author

Benoit Cloitre, May 23 2004

Keywords

Programs

  • Magma
    R:=PowerSeriesRing(Integers(), 40); Coefficients(R!( (1-5*x+8*x^2-5*x^3+2*x^4-2*x^5)/((1-x)*(1-3*x)*(1+x+x^2)*(1-3*x+3*x^2)) )); // G. C. Greubel, Jul 14 2023
    
  • Maple
    A094717_list := proc(n) local i; exp(z)*cosh(z)*(exp(z)+2*exp(-z/2)* cos(z*sqrt(3/4)))/3; series(%,z,n+2); seq(simplify(i!*coeff(%,z,i)),i=0..n) end: A094717_list(27); # Peter Luschny, Jul 11 2012
  • Mathematica
    a[n_]:= n! Sum[Boole[i +2j +3k ==n]/(i! (2j)! (3k)!), {i,0,n}, {j,0,n}, {k,0,n}]; Table[a[n], {n,0,27}] (* Jean-François Alcover, Jul 06 2019 *)
    LinearRecurrence[{6,-12,10,-6,12,-9}, {1,1,2,5,12,36}, 40] (* G. C. Greubel, Jul 14 2023 *)
  • PARI
    a(n)=sum(i=0,n,sum(j=0,n,sum(k=0,n,if(n-i-2*j-3*k,0,n!/(i)!/(2*j)!/(3*k)!))))
    
  • SageMath
    def A094717_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P( (1-5*x+8*x^2-5*x^3+2*x^4-2*x^5)/((1-x)*(1-3*x)*(1+x+x^2)*(1-3*x+3*x^2)) ).list()
    A094717_list(40) # G. C. Greubel, Jul 14 2023

Formula

Limit_{n->oo} a(n)/3^n = 1/6.
E.g.f.: exp(z)*cosh(z)*(exp(z) + 2*exp(-z/2)*cos(z*sqrt(3/4)))/3. - Peter Luschny, Jul 11 2012
G.f.: (1-5*x+8*x^2-5*x^3+2*x^4-2*x^5)/((1-x)*(1-3*x)*(1+x+x^2)*(1-3*x+3*x^2)). - Colin Barker, Dec 24 2012
From G. C. Greubel, Jul 14 2023: (Start)
a(n) = (1/6)*(1 + 3^n + 2*A049347(n) + A049347(n-1) + 2*A057083(n) - 3*A057083(n-1)).
a(n) = (1/6)*(1 + 3^n + A099837(n+3) + A057682(n+3)). (End)
Showing 1-10 of 16 results. Next