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.

Previous Showing 21-30 of 84 results. Next

A106516 A Pascal-like triangle based on 3^n.

Original entry on oeis.org

1, 3, 1, 9, 4, 1, 27, 13, 5, 1, 81, 40, 18, 6, 1, 243, 121, 58, 24, 7, 1, 729, 364, 179, 82, 31, 8, 1, 2187, 1093, 543, 261, 113, 39, 9, 1, 6561, 3280, 1636, 804, 374, 152, 48, 10, 1, 19683, 9841, 4916, 2440, 1178, 526, 200, 58, 11, 1, 59049, 29524, 14757, 7356, 3618, 1704, 726, 258, 69, 12, 1
Offset: 0

Views

Author

Paul Barry, May 05 2005

Keywords

Comments

Row sums are A027649. Antidiagonal sums are A106517.
From Wolfdieter Lang, Jan 09 2015: (Start)
Alternating row sums give A025192. The A-sequence of this Riordan lower triangular matrix is [1, 1, repeat(0, )] (leading to the Pascal recurrence for T(n,k) for n >= k >= 1. The Z-sequence is [3, repeat(0, )] (leading to the recurrence T(n,0) = 3*T(n-1,0), n >= 1. For A- and Z-sequences see the W. Lang link under A006232.
The inverse of this Riordan matrix is Tinv = ((1 - 2*x)/(1 + x), x/(1 + x)) given as a signed version of A093560: Tinv(n,m) = (-1)^(n-m)*A093560(n,m). (End)

Examples

			The triangle T(n,k) begins:
n\k     0     1     2    3    4    5   6   7  8  9 10 ...
0:      1
1:      3     1
2:      9     4     1
3:     27    13     5    1
4:     81    40    18    6    1
5:    243   121    58   24    7    1
6:    729   364   179   82   31    8   1
7:   2187  1093   543  261  113   39   9   1
8:   6561  3280  1636  804  374  152  48  10  1
9:  19683  9841  4916 2440 1178  526 200  58 11  1
10: 59049 29524 14757 7356 3618 1704 726 258 69 12  1
... reformatted and extended. - _Wolfdieter Lang_, Jan 06 2015
----------------------------------------------------------
With the array M(k) as defined in the Formula section, the infinite product M(0)*M(1)*M(2)*... begins
/ 1        \/1           \/1        \       /1         \
| 3  1     ||0  1        ||0 1      |      | 3  1      |
| 9  4 1   ||0  3  1     ||0 0 1    |... = | 9  7  1   |
|27 13 5 1 ||0  9  4 1   ||0 0 3 1  |      |27 37 12 1 |
|...       ||0 27 13 5 1 ||0 0 9 4 1|      |...        |
|...       ||...         ||...      |      |...        |
= A143495. - _Peter Bala_, Dec 23 2014
		

Crossrefs

Columns 1, 2, 3, 4, 5: A003462, A000340, A052150, A097786, A097787.

Programs

  • Mathematica
    a106516[n_] := Block[{a, k},
    a[x_] := Flatten@ Last@ Reap[For[k = -1, k < x, Sow[Binomial[x, k] +
    2 Sum[3^(i - 1)*Binomial[x - i, k], {i, 1, x}]], k++]]; Flatten@Array[a, n, 0]]; a106516[11] (* Michael De Vlieger, Dec 23 2014 *)

Formula

Riordan array (1/(1-3x), x/(1-x)); Number triangle T(n, 0)=A000244(n), T(n, k)=T(n-1, k-1)+T(n-1, k); T(n, k)=sum{j=0..n, binomial(n, k+j)2^j}.
From Peter Bala, Jul 16 2013: (Start)
T(n,k) = binomial(n,k) + 2*sum {i = 1..n} 3^(i-1)*binomial(n-i,k).
O.g.f.: (1 - t)/( (1 - 3*t)*(1 - (1 + x)*t) ) = 1 + (3 + x)*t + (9 + 4*x + x^2)*t^2 + ....
The n-th row polynomial R(n,x) = 1/(x - 2)*( x*(x + 1)^n - 2*3^n ). (End)
Closed-form formula for arbitrary left and right borders of Pascal-like triangle see A228196. - Boris Putievskiy, Aug 19 2013
T(n,k) = 4*T(n-1,k) + T(n-1,k-1) - 3*T(n-2,k) - 3*T(n-2,k-1), T(0,0)=1, T(1,0)=3, T(1,1)=1, T(n,k)=0 if k<0 or if k>n. - Philippe Deléham, Dec 26 2013
From Peter Bala, Dec 23 2014: (Start)
exp(x) * e.g.f. for row n = e.g.f. for diagonal n. For example, for n = 3 we have exp(x)*(27 + 13*x + 5*x^2/2! + x^3/3!) = 27 + 40*x + 58*x^2/2! + 82*x^3/3! + 113*x^4/4! + .... The same property holds more generally for Riordan arrays of the form ( f(x), x/(1 - x) ).
Let M denote the present triangle. For k = 0,1,2,... define M(k) to be the lower unit triangular block array
/I_k 0\
\ 0 M/ having the k X k identity matrix I_k as the upper left block; in particular, M(0) = M. The infinite product M(0)*M(1)*M(2)*..., which is clearly well-defined, is equal to A143495 (but with a different offset). See the Example section. Cf. A055248. (End)
n-th row polynomial R(n, x) = (2*3^n - x*(1 + x)^n)/(2 - x). - Peter Bala, Mar 05 2025

A189315 Expansion of g.f. 5*(1-3*x+x^2)/(1-5*x+5*x^2).

Original entry on oeis.org

5, 10, 30, 100, 350, 1250, 4500, 16250, 58750, 212500, 768750, 2781250, 10062500, 36406250, 131718750, 476562500, 1724218750, 6238281250, 22570312500, 81660156250, 295449218750, 1068945312500, 3867480468750, 13992675781250, 50625976562500, 183166503906250, 662702636718750
Offset: 0

Views

Author

L. Edson Jeffery, Apr 20 2011

Keywords

Comments

Let A be the unit-primitive matrix (see [Jeffery])
A=A_(10,1)=
(0 1 0 0 0)
(1 0 1 0 0)
(0 1 0 1 0)
(0 0 1 0 1)
(0 0 0 2 0).
Then a(n) = Trace(A^(2*n)).
Evidently one of a class of accelerator sequences for Catalan's constant based on traces of successive powers (here they are A^(2*n)) of a unit-primitive matrix A_(N,r) (0
From Tom Copeland, Dec 08 2015: (Start)
These are also the non-vanishing traces for the adjacency matrices of the simple Lie algebras B_5 and C_5. See links for B_4, A265185, and B_3, A025192.
a(n+1) = 10 * A081567(n), and, ignoring a(0), a G.F. is 10 *(1-2*x)/(1-5*x+5*x^2) whose denominator is y^5 * A127672(5,1/y) with y = sqrt(x).
-log(1 - 5x^2 + 5x^4) = 10 x^2/2 + 30 x^4/4 + ... provides a logarithmic series for the traces of both the odd and even powers of the matrix beginning with the first power. (End)

Programs

  • Magma
    I:=[5,10,30]; [n le 3 select I[n] else 5*Self(n-1)-5*Self(n-2): n in [1..30]]; // Vincenzo Librandi, Dec 09 2015
  • Mathematica
    CoefficientList[Series[5(1-3x+x^2)/(1-5x+5x^2),{x,0,40}],x] (* or *)
    Join[{5},LinearRecurrence[{5,-5},{10,30},40]]  (* Harvey P. Dale, Apr 25 2011 *)
  • PARI
    Vec(5*(1-3*x+x^2)/(1-5*x+5*x^2)+O(x^99)) \\ Charles R Greathouse IV, Sep 24 2012
    

Formula

a(n) = 5*a(n-1)-5*a(n-2), n>2, a(0)=5, a(1)=10, a(2)=30.
a(n) = Sum_{k=1..5} (w_k)^(2*n), w_k=2*cos((2*k-1)*Pi/10).
a(n) = 2^(1-n)*((5-Sqrt(5))^n+(5+Sqrt(5))^n), for n>0, with a(0)=5.
a(n) = 5*A147748(n).
E.g.f.: 1 + 4*exp(5*x/2)*cosh(sqrt(5)*x/2). - Stefano Spezia, Jul 09 2024

A200139 Triangle T(n,k), read by rows, given by (1,1,0,0,0,0,0,0,0,...) DELTA (1,0,0,0,0,0,0,0,0,...) where DELTA is the operator defined in A084938.

Original entry on oeis.org

1, 1, 1, 2, 3, 1, 4, 8, 5, 1, 8, 20, 18, 7, 1, 16, 48, 56, 32, 9, 1, 32, 112, 160, 120, 50, 11, 1, 64, 256, 432, 400, 220, 72, 13, 1, 128, 576, 1120, 1232, 840, 364, 98, 15, 1, 256, 1280, 2816, 3584, 2912, 1568, 560, 128, 17, 1, 512, 2816, 6912, 9984, 9408, 6048, 2688, 816, 162, 19, 1
Offset: 0

Author

Philippe Deléham, Nov 13 2011

Keywords

Comments

Riordan array ((1-x)/(1-2x),x/(1-2x)).
Product A097805*A007318 as infinite lower triangular arrays.
Product A193723*A130595 as infinite lower triangular arrays.
T(n,k) is the number of ways to place n unlabeled objects into any number of labeled bins (with at least one object in each bin) and then designate k of the bins. - Geoffrey Critzer, Nov 18 2012
Apparently, rows of this array are unsigned diagonals of A028297. - Tom Copeland, Oct 11 2014
Unsigned A118800, so my conjecture above is true. - Tom Copeland, Nov 14 2016

Examples

			Triangle begins:
   1
   1,   1
   2,   3,   1
   4,   8,   5,   1
   8,  20,  18,   7,   1
  16,  48,  56,  32,   9,   1
  32, 112, 160, 120,  50,  11,   1
		

Crossrefs

Cf. A118800 (signed version), A081277, A039991, A001333 (antidiagonal sums), A025192 (row sums); diagonals: A000012, A005408, A001105, A002492, A072819l; columns: A011782, A001792, A001793, A001794, A006974, A006975, A006976.

Programs

  • Mathematica
    nn=15;f[list_]:=Select[list,#>0&];Map[f,CoefficientList[Series[(1-x)/(1-2x-y x) ,{x,0,nn}],{x,y}]]//Grid  (* Geoffrey Critzer, Nov 18 2012 *)

Formula

T(n,k) = 2*T(n-1,k)+T(n-1,k-1) with T(0,0)=T(1,0)=T(1,1)=1 and T(n,k)=0 for k<0 or for n
T(n,k) = A011782(n-k)*A135226(n,k) = 2^(n-k)*(binomial(n,k)+binomial(n-1,k-1))/2.
Sum_{k, 0<=k<=n} T(n,k)*x^k = A000007(n), A011782(n), A025192(n), A002001(n), A005054(n), A052934(n), A055272(n), A055274(n), A055275(n), A052268(n), A055276(n), A196731(n) for n=-1,0,1,2,3,4,5,6,7,8,9,10 respectively.
G.f.: (1-x)/(1-(2+y)*x).
T(n,k) = Sum_j>=0 T(n-1-j,k-1)*2^j.
T = A007318*A059260, so the row polynomials of this entry are given umbrally by p_n(x) = (1 + q.(x))^n, where q_n(x) are the row polynomials of A059260 and (q.(x))^k = q_k(x). Consequently, the e.g.f. is exp[tp.(x)] = exp[t(1+q.(x))] = e^t exp(tq.(x)) = [1 + (x+1)e^((x+2)t)]/(x+2), and p_n(x) = (x+1)(x+2)^(n-1) for n > 0. - Tom Copeland, Nov 15 2016
T^(-1) = A130595*(padded A130595), differently signed A118801. Cf. A097805. - Tom Copeland, Nov 17 2016
The n-th row polynomial in descending powers of x is the n-th Taylor polynomial of the rational function (1 + x)/(1 + 2*x) * (1 + 2*x)^n about 0. For example, for n = 4, (1 + x)/(1 + 2*x) * (1 + 2*x)^4 = (8*x^4 + 20*x*3 + 18*x^2 + 7*x + 1) + O(x^5). - Peter Bala, Feb 24 2018

A052156 Number of compositions of n into 2*j-1 kinds of j's for all j>=1.

Original entry on oeis.org

1, 1, 4, 12, 36, 108, 324, 972, 2916, 8748, 26244, 78732, 236196, 708588, 2125764, 6377292, 19131876, 57395628, 172186884, 516560652, 1549681956, 4649045868, 13947137604, 41841412812, 125524238436, 376572715308, 1129718145924
Offset: 0

Author

Barry E. Williams, Jan 24 2000

Keywords

Comments

First differences of A025192, also second differences of A000244.

Examples

			1 + x + 4*x^2 + 12*x^3 + 36*x^4 + 108*x^5 + 324*x^6 + 972*x^7 + 2916*x^8 + ...
		

References

  • A. H. Beiler, Recreations in the Theory of Numbers, Dover, N.Y., 1964, pp. 189, 194-196.
  • P. Ribenhoim, The Little Book of Big Primes, Springer-Verlag, N.Y., 1991, p. 53.

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[(1 - x)^2/(1 - 3 x), {x, 0, 40}], x ] (* Vincenzo Librandi, Apr 29 2014 *)
  • PARI
    {a(n) = local(A); if( n<1, n==0, A = vector(n); A[1] = 1; for( k=2, n, A[k] = (-4*k + 9) * A[k-1] + 3 * sum( j=1, k-1, A[j] * A[k-j])); A[n])} /* Michael Somos, Jul 23 2011 */

Formula

a(n) = 4*3^(n-2); n >= 2; a(0) = 1; a(1) = 1.
G.f.: (1-x)^2/(1-3*x).
G.f.: 1/(1-sum(j>=1, (2*j-1)*x^j )). - Joerg Arndt, Jul 06 2011
a(n) = 3*a(n-1)+(-1)^n*C(2, 2-n).
a(n) = A003946(n-1), n>0. - R. J. Mathar, Oct 13 2008
a(n) = (-4*n + 9) * a(n-1) + 3 * Sum_{k=1..n-1} a(k) * a(n-k) if n>1. - Michael Somos, Jul 23 2011
a(n) = Sum_{k, 0<=k<=n} A201780(n,k). - Philippe Deléham, Dec 05 2011

Extensions

New name from Joerg Arndt, Jul 06 2011

A154690 Triangle read by rows: T(n, k) = (2^(n-k) + 2^k)*binomial(n,k), 0 <= k <= n.

Original entry on oeis.org

2, 3, 3, 5, 8, 5, 9, 18, 18, 9, 17, 40, 48, 40, 17, 33, 90, 120, 120, 90, 33, 65, 204, 300, 320, 300, 204, 65, 129, 462, 756, 840, 840, 756, 462, 129, 257, 1040, 1904, 2240, 2240, 2240, 1904, 1040, 257, 513, 2322, 4752, 6048, 6048, 6048, 6048, 4752, 2322, 513
Offset: 0

Author

Roger L. Bagula and Gary W. Adamson, Jan 14 2009

Keywords

Comments

From G. C. Greubel, Jan 18 2025: (Start)
A more general triangle of coefficients may be defined by T(n, k, p, q) = (p^(n-k)*q^k + p^k*q^(n-k))*A007318(n, k). When (p, q) = (2, 1) this sequence is obtained.
Some related triangles are:
(p, q) = (1, 1) : 2*A007318(n,k).
(p, q) = (2, 2) : 2*A038208(n,k).
(p, q) = (3, 2) : A154692(n,k).
(p, q) = (3, 3) : 2*A038221(n,k). (End)

Examples

			Triangle begins as:
     2;
     3,    3;
     5,    8,     5;
     9,   18,    18,     9;
    17,   40,    48,    40,    17;
    33,   90,   120,   120,    90,    33;
    65,  204,   300,   320,   300,   204,    65;
   129,  462,   756,   840,   840,   756,   462,   129;
   257, 1040,  1904,  2240,  2240,  2240,  1904,  1040,   257;
   513, 2322,  4752,  6048,  6048,  6048,  6048,  4752,  2322,  513;
  1025, 5140, 11700, 16320, 16800, 16128, 16800, 16320, 11700, 5140, 1025;
		

Crossrefs

Cf. A215149.
Sums include: A008776 (row), A010673 (alternating sign row).
Columns k: A000051 (k=0).
Main diagonal: A059304.

Programs

  • Magma
    A154690:= func< n,k | (2^(n-k)+2^k)*Binomial(n,k) >;
    [A154690(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Jan 18 2025
    
  • Maple
    A154690 := proc(n,m) binomial(n,m)*(2^(n-m)+2^m) ; end proc: # R. J. Mathar, Jan 13 2011
  • Mathematica
    T[n_, m_]:= (2^(n-m) + 2^m)*Binomial[n,m];
    Table[T[n,m], {n,0,12}, {m,0,n}]//Flatten
  • Python
    from sage.all import *
    def A154690(n,k): return (pow(2,n-k)+pow(2,k))*binomial(n,k)
    print(flatten([[A154690(n,k) for k in range(n+1)] for n in range(13)])) # G. C. Greubel, Jan 18 2025

Formula

T(n, k) = (2^(n-k) + 2^k)*A007318(n, k).
Sum_{k=0..n} T(n, k) = A008776(n) = A025192(n+1).
From G. C. Greubel, Jan 18 2025: (Start)
T(n, n-k) = T(n, k) (symmetry).
T(n, 1) = n + A215149(n), n >= 1.
T(2*n-1, n) = 3*A069720(n).
Sum_{k=0..n} (-1)^k*T(n, k) = A010673(n+1).
Sum_{k=0..floor(n/2)} T(n-k, k) = A000129(n+1) + A001045(n+1).
Sum_{k=0..floor(n/2)} (-1)^k*T(n-k, k) = n+1 + A107920(n+1). (End)

A061922 Xcatalans - produced as a self-convolved sequence like Catalan numbers (A000108) but use carryless GF(2)[ X ] polynomial multiplication.

Original entry on oeis.org

1, 1, 2, 5, 14, 42, 132, 421, 1382, 4478, 15580, 54114, 181676, 650484, 2289320, 8028901, 28045302, 103229014, 372640460, 1336511110, 4882492452, 17534836812, 63692926552, 234287550818, 868236370364, 3281589811404
Offset: 0

Author

Antti Karttunen, May 15 2001

Keywords

Comments

Shifts one place left when Xmult-convolved (XMULTCONV) with itself.

Crossrefs

For Xmult, see A048720 (Xmult table) or A048631 (Xfactorials). Other self-convolved sequences: A000108, A007460 - A007464, A025192.

Programs

  • Maple
    Xcatalans(30); Xcatalans := proc(upto_n) local a,i,k; a := [1]; for i from 1 to upto_n do a := [ op(a), add(Xmult(a[k],a[i-k+1]), k=1..i)]; od; RETURN(a); end;
    XMULTCONV := proc(a,b) local c,i,k,n; n := min( nops(a), nops(b) ); c := []; for i from 0 to n-1 do c := [ op(c), add(Xmult(a[k+1],b[i-k+1]), k=0..i)]; od; RETURN(c); end;

A080342 Number of weighings required to identify a single bad coin out of n coins, using a two-pan balance.

Original entry on oeis.org

0, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5
Offset: 1

Author

Artemario Tadeu Medeiros da Silva (artemario(AT)uol.com.br), Mar 19 2003

Keywords

Comments

It is known that there is exactly one bad coin, which is heavier than the others. No weights are used in the weighings.
0 appears once, 1 twice, 2 6 times, 3 18 times, 4 54 times, ... which is the same as the number of base-3 numbers of length n; see A007089. - Jonathan Vos Post, Apr 20 2011
Records appear at positions 3^n+1 (=A034472(n)). - Robert G. Wilson v, Aug 06 2012
The "Heavy Marble" section of "Brainteaser Problems" in the Mongan et al. reference describes the n = 8 case in detail and then derives the general formula given below. Of course this sequence applies also when the single, unlike object is lighter than all the others. If the unlike object is only known to have a different weight (that is, to be lighter than all the others or heavier than all the others), use A064099. - Rick L. Shepherd, Sep 05 2013
If it is unknown whether the bad coin is heavier or lighter, then the minimum number of weighings is A029837(n) and the number of coins that must be used in the first weighing is A004526(n), for n > 2. - Ivan N. Ianakiev, Apr 13 2017

Examples

			a(1) = 0 since no weighings are needed - the coin is bad. a(2) = 1 since one weighing is needed.
		

References

  • J. Mongan, N. Suojanen, and E. Giguère, Programming Interviews Exposed: Secrets to Landing Your Next Job, 2nd Edition, Wiley Publishing, Inc., 2007, pp. 169-172.

Crossrefs

Programs

  • Haskell
    import Data.List (transpose)
    a080342 n = genericIndex a080342_list (n - 1)
    a080342_list = 0 : zs where
       zs = 1 : 1 : (map (+ 1) $ concat $ transpose [zs, zs, zs])
    -- Reinhard Zumkeller, Sep 02 2015
  • Mathematica
    f[n_] := Floor[ Log[3, n]] - Floor[2^-FractionalPart[ Log[3, n]]] + 1; Array[f, 105] (* Robert G. Wilson v, Aug 05 2012 *)
  • PARI
    a(n) = ceil(log(n)/log(3)) \\ Rick L. Shepherd, Sep 05 2013
    

Formula

a(n) = floor(L) - floor(2^(-f(L))) + 1, where L = log_3(n) and f() = fractional part.
a(n) = ceiling(log_3(n)). - Rick L. Shepherd, Sep 05 2013
A064235(n) = 3 ^ a(n). - Reinhard Zumkeller, Sep 02 2015

A094554 Number of closed walks of length n at a base vertex of a truncated tetrahedron (triangular prism).

Original entry on oeis.org

1, 0, 3, 2, 19, 30, 143, 322, 1179, 3110, 10183, 28842, 89939, 262990, 802623, 2380562, 7196299, 21479670, 64657463, 193535482, 581480259, 1742693150, 5231574703, 15687733602, 47077181819, 141203583430, 423666674343
Offset: 0

Author

Paul Barry, May 11 2004

Keywords

Comments

For n > 0, 6*a(n) is the number of 3-colorings of the prism of size 2 X n (i.e., C_2 X C_n).More generally, the number of k-colorings of the prism of size 2 X n is given by (k^2 - 3*k + 3)^n + (k - 1) * ((3 - k)^n + (1 - k)^n) + k^2 - 3*k + 1 (chromatic polynomial). - Sela Fried, Oct 07 2023

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{2, 5, -6}, {1, 0, 3, 2}, 30] (* Greg Dresden, Jun 19 2021 *)
  • PARI
    a(n) = if(n==0, 1, (1 + 3^n + 2*(-2)^n)/6) \\ Andrew Howroyd, Jun 14 2021

Formula

G.f.: (1 - 2*x - 2*x^2 + 2*x^3)/((1 - x)*(1 + 2*x)*(1 - 3*x)).
a(n) = 1/6 + 3^n/6 + (-2)^n/3 for n > 0.
a(n) = 2*a(n-1) + 5*a(n-2) - 6*a(n-3) for n >= 4.
E.g.f.: exp(-2*x)*(1 + exp(2*x))*(2 + exp(3*x))/6. - Stefano Spezia, Sep 26 2023

A099856 Expansion of (1+3*x)/(1-3*x).

Original entry on oeis.org

1, 6, 18, 54, 162, 486, 1458, 4374, 13122, 39366, 118098, 354294, 1062882, 3188646, 9565938, 28697814, 86093442, 258280326, 774840978, 2324522934, 6973568802, 20920706406, 62762119218, 188286357654, 564859072962, 1694577218886, 5083731656658, 15251194969974, 45753584909922
Offset: 0

Author

Paul Barry, Oct 28 2004

Keywords

Comments

A099858 gives a Chebyshev transform. Binomial transform is A083420.
Hankel transform is 1, -18, 0, 0, 0, 0, 0, 0, 0, ... - Philippe Deléham, Dec 13 2011

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[(1+3x)/(1-3x),{x,0,30}],x] (* or *) Join[{1}, NestList[3#&,6,30]] (* Harvey P. Dale, Nov 08 2011 *)
  • PARI
    Vec((1+3*x)/(1-3*x) + O(x^40)) \\ Michel Marcus, Dec 11 2015

Formula

a(n) = 2*3^n - 0^n.
a(n) = A025192(n+1), n > 0. - R. J. Mathar, Sep 02 2008
a(n) = Sum_{k=0..n} A093561(n,k)*2^k. - Philippe Deléham, Dec 13 2011
From Elmo R. Oliveira, Aug 23 2024: (Start)
E.g.f.: 2*exp(3*x) - 1.
a(n) = 3*a(n-1) for n > 1. (End)

Extensions

a(26)-a(28) from Elmo R. Oliveira, Aug 23 2024

A052948 Expansion of g.f.: (1-2*x)/(1-3*x+2*x^3).

Original entry on oeis.org

1, 1, 3, 7, 19, 51, 139, 379, 1035, 2827, 7723, 21099, 57643, 157483, 430251, 1175467, 3211435, 8773803, 23970475, 65488555, 178918059, 488813227, 1335462571, 3648551595, 9968028331, 27233159851, 74402376363, 203271072427, 555346897579, 1517235940011, 4145165675179
Offset: 0

Author

encyclopedia(AT)pommard.inria.fr, Jan 25 2000

Keywords

Comments

Number of (s(0), s(1), ..., s(n)) such that 0 < s(i) < 6 and |s(i) - s(i-1)| <= 1 for i = 1,2,...,n, s(0) = 3, s(n) = 3.
In general, a(n,m,j,k) = (2/m)*Sum_{r=1..m-1} sin(j*r*Pi/m)*sin(k*r*Pi/m)*(1+2*cos(Pi*r/m))^n is the number of (s(0), s(1), ..., s(n)) such that 0 < s(i) < m and |s(i) - s(i-1)| <= 1 for i = 1,2,...,n, s(0) = j, s(n) = k. - Herbert Kociemba, Jun 02 2004

Crossrefs

Programs

  • GAP
    a:=[1,1,3];; for n in [4..30] do a[n]:=3*a[n-1]-2*a[n-3]; od; a; # G. C. Greubel, Oct 21 2019
  • Magma
    R:=PowerSeriesRing(Integers(), 30); Coefficients(R!( (1-2*x)/(1-3*x+2*x^3) )); // G. C. Greubel, Oct 21 2019
    
  • Maple
    spec := [S,{S=Sequence(Prod(Union(Sequence(Prod(Sequence(Z),Z)),Z),Z))}, unlabeled ]: seq(combstruct[count ](spec,size=n), n=0..20);
    seq(coeff(series((1-2*x)/(1-3*x+2*x^3), x, n+1), x, n), n = 0 .. 40); # G. C. Greubel, Oct 21 2019
  • Mathematica
    CoefficientList[Series[(1-2x)/(1-3x+2x^3),{x,0,30}],x] (* or *) LinearRecurrence[{3,0,-2},{1,1,3},30] (* Harvey P. Dale, Aug 22 2012 *)
  • PARI
    Vec((1-2*x)/(1-3*x+2*x^3)+O(x^30))
    
  • Sage
    from sage.combinat.sloane_functions import recur_gen2b; it = recur_gen2b(1,1,2,2, lambda n: -1); [next(it) for i in range(0,29)] # Zerinvary Lajos, Jul 09 2008
    

Formula

a(n) = 2*a(n-1) + 2*a(n-2) - 1.
a(n) = Sum_{alpha=RootOf(1-3*z+2*z^3)} alpha^(-n)/3.
a(n) = (1 + (1+sqrt(3))^n + (1-sqrt(3))^n)/3. Binomial transform of A025192 (with interpolated zeros). - Paul Barry, Sep 16 2003
a(n) = (1/3)*Sum_{k=1..5} sin(Pi*k/2)^2 * (1 + 2*cos(Pi*k/6))^n. - Herbert Kociemba, Jun 02 2004
a(0)=1, a(1)=1, a(2)=3, a(n) = 3*a(n-1) - 2*a(n-3). - Harvey P. Dale, Aug 22 2012
a(n) = A077846(n) - 2*A077846(n-1). - R. J. Mathar, Feb 27 2019
E.g.f.: exp(x)*(1 + 2*cosh(sqrt(3)*x))/3. - Stefano Spezia, Mar 02 2024

Extensions

More terms from James Sellers, Jun 06 2000
Definition revised by N. J. A. Sloane, Feb 24 2011
Previous Showing 21-30 of 84 results. Next