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 14 results. Next

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)

A131022 Triangular array T read by rows: T(j,1) = 1 for ((j-1) mod 6) < 3, else 0; T(j,k) = T(j-1,k-1) + T(j,k-1) for 2 <= k <= j.

Original entry on oeis.org

1, 1, 2, 1, 2, 4, 0, 1, 3, 7, 0, 0, 1, 4, 11, 0, 0, 0, 1, 5, 16, 1, 1, 1, 1, 2, 7, 23, 1, 2, 3, 4, 5, 7, 14, 37, 1, 2, 4, 7, 11, 16, 23, 37, 74, 0, 1, 3, 7, 14, 25, 41, 64, 101, 175, 0, 0, 1, 4, 11, 25, 50, 91, 155, 256, 431, 0, 0, 0, 1, 5, 16, 41, 91, 182, 337, 593, 1024
Offset: 1

Views

Author

Klaus Brockhaus, following a suggestion of Paul Curtz, Jun 10 2007

Keywords

Comments

All columns are periodic with period length 6. The (3+6*i)-th row equals the first (3+6*i) terms of main diagonal (i >= 0).

Examples

			First seven rows of T are
[ 1 ]
[ 1, 2 ]
[ 1, 2, 4 ]
[ 0, 1, 3, 7 ]
[ 0, 0, 1, 4, 11 ]
[ 0, 0, 0, 1, 5, 16 ]
[ 1, 1, 1, 1, 2, 7, 23 ].
		

Crossrefs

Cf. A129339 (main diagonal of T), A131023 (first subdiagonal of T), A131024 (row sums of T), A131025 (antidiagonal sums of T). First through sixth column of T are in A088911, A131026, A131027, A131028, A131029, A131030 resp.

Programs

  • Magma
    m:=13; M:=ZeroMatrix(IntegerRing(), m, m); for j:=1 to m do if (j-1) mod 6 lt 3 then M[j, 1]:=1; end if; end for; for k:=2 to m do for j:=k to m do M[j, k]:=M[j-1, k-1]+M[j, k-1]; end for; end for; &cat[ [ M[j, k]: k in [1..j] ]: j in [1..m] ];
  • Mathematica
    T[j_, 1] := If[Mod[j-1, 6]<3, 1, 0]; T[j_, k_] := T[j, k] = T[j-1, k-1]+T[j, k-1]; Table[T[j, k], {j, 1, 13}, {k, 1, j}] // Flatten (* Jean-François Alcover, Mar 06 2014 *)
  • PARI
    {m=13; M=matrix(m, m); for(j=1, m, M[j, 1]=if((j-1)%6<3, 1, 0)); for(k=2, m, for(j=k, m, M[j, k]=M[j-1, k-1]+M[j, k-1])); for(j=1, m, for(k=1, j, print1(M[j, k], ",")))}
    

Formula

From Werner Schulte, Jul 22 2017: (Start)
T(n,k) = 2^(k-2) + 2*sqrt(3)^(k-3) * sin(Pi/6*(2*n-k)) for 1 < k <= n, and
T(n,1) = 1 - floor((n-1)/3) mod 2 for n >= 1. (End)

A130781 Sequence is identical to its third differences: a(n+3) = 3*a(n+2) - 3*a(n+1) + 2*a(n), with a(0)=a(1)=1, a(2)=2.

Original entry on oeis.org

1, 1, 2, 5, 11, 22, 43, 85, 170, 341, 683, 1366, 2731, 5461, 10922, 21845, 43691, 87382, 174763, 349525, 699050, 1398101, 2796203, 5592406, 11184811, 22369621, 44739242, 89478485, 178956971, 357913942, 715827883, 1431655765, 2863311530
Offset: 0

Views

Author

Paul Curtz, Jul 14 2007, Jul 18 2007

Keywords

Comments

The inverse binomial transform is 1,0,1,... repeated with period 3, essentially A011655. - R. J. Mathar, Aug 28 2023

Crossrefs

Essentially a duplicate of A024493.

Programs

  • Mathematica
    a[n_] := a[n] = 3 a[n - 1] - 3 a[n - 2] + 2 a[n - 3]; a[0] = a[1] = 1; a[2] = 2; Table[a@n, {n, 0, 33}] (* Or *)
    CoefficientList[ Series[(1 - 2 x + 2 x^2)/(1 - 3 x + 3 x^2 - 2 x^3), {x, 0, 33}], x] (* Robert G. Wilson v, Sep 08 2007 *)
    LinearRecurrence[{3,-3,2},{1,1,2},40] (* Harvey P. Dale, Sep 17 2013 *)

Formula

3*a(n) = 2^(n+1) + A087204(n+1).
Also first differences of A024494.
G.f.: (1-2x+2x^2)/(1-3x+3x^2-2x^3).
Binomial transform of [1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, ...]; i.e., ones in positions 2, 5, 8, 11, ... and the rest zeros. [Corrected by Gary W. Adamson, Jan 07 2008]

Extensions

Edited by N. J. A. Sloane, Jul 28 2007

A129961 Main diagonal of triangular array T: T(j,1) = 1 for ((j-1) mod 8) < 4, else 0; T(j,k) = T(j-1,k-1)+T(j,k-1) for 2 <= k <= j.

Original entry on oeis.org

1, 2, 4, 8, 15, 26, 42, 64, 94, 140, 232, 464, 1092, 2744, 6840, 16384, 37384, 81296, 169120, 338240, 654192, 1232288, 2280864, 4194304, 7761376, 14635712, 28384384, 56768768, 116566080, 243472256, 511907712, 1073741824, 2232713344
Offset: 1

Views

Author

Paul Curtz, Jun 10 2007

Keywords

Comments

First column is periodically 1 1 1 1 0 0 0 0 (see A131078).
First subdiagonal is 1, 2, 4, 7, 11, 16, 22, ... (see A131075); next subdiagonals are 1, 2, 3, 4, 5, 6, 8, 16, 46, 140, ..., 1, 1, 1, 1, 1, 2, 8, 30, 94, 256, ..., 0, 0, 0, 0, 1, 6, 22, 64, 162, 372, ..., 0, 0, 0, 1, 5, 16, 42, 98, 210, 420, ...., 0, 0, 1, 4, 11, 26, 56, 112, 210, 372, ..., 0, 1, 3, 7, 15, 30, 56, 98, 162, 256, ...,1, 2, 4, 8, 15, 26, 42, 64, 94, 140, ... . Main diagonal and eighth subdiagonal agree; generally j-th subdiagonal equals (j+8)-th subdiagonal.
Antidiagonal sums are 1, 1, 3, 3, 6, 5, 11, ... (see A131077).

Examples

			First seven rows of T are
[ 1 ]
[ 1, 2 ]
[ 1, 2, 4 ]
[ 1, 2, 4, 8 ]
[ 0, 1, 3, 7, 15 ]
[ 0, 0, 1, 4, 11, 26 ]
[ 0, 0, 0, 1, 5, 16, 42 ].
		

Crossrefs

Cf. A129339, A131074 (T read by rows), A131075 (first subdiagonal of T), A131076 (row sums of T), A131077 (antidiagonal sums of T). First through sixth column of T are in A131078, A131079, A131080, A131081, A131082, A131083 resp.

Programs

  • Magma
    m:=33; M:=ZeroMatrix(IntegerRing(), m, m); for j:=1 to m do if (j-1) mod 8 lt 4 then M[j, 1]:=1; end if; end for; for k:=2 to m do for j:=k to m do M[j, k]:=M[j-1, k-1]+M[j, k-1]; end for; end for; [ M[n, n]: n in [1..m] ]; // Klaus Brockhaus, Jun 14 2007
    
  • Magma
    m:=33; S:=[ [1, 1, 1, 1, 0, 0, 0, 0][(n-1) mod 8 + 1]: n in [1..m] ]; [ &+[ Binomial(i-1, k-1)*S[k]: k in [1..i] ]: i in [1..m] ]; // Klaus Brockhaus, Jun 17 2007
  • PARI
    {m=33; v=concat([1, 2, 4, 8, 15], vector(m-5)); for(n=6, m, v[n]=6*v[n-1]-14*v[n-2]+16*v[n-3]-10*v[n-4]+4*v[n-5]); v} \\ Klaus Brockhaus, Jun 14 2007
    

Formula

G.f.: x*(1-x)^4/((1-2*x)*(1-4*x+6*x^2-4*x^3+2*x^4)).
a(1) = 1, a(2) = 2, a(3) = 4, a(4) = 8, a(5) = 15; for n > 5, a(n) = 6*a(n-1)-14*a(n-2)+16*a(n-3)-10*a(n-4)+4*a(n-5).
Binomial transform of A131078. - Klaus Brockhaus, Jun 17 2007

Extensions

Edited and extended by Klaus Brockhaus, Jun 14 2007
G.f. corrected by Klaus Brockhaus, Oct 15 2009

A131025 Antidiagonal sums of triangular array T: T(j,1) = 1 for ((j-1) mod 6) < 3, else 0; T(j,k) = T(j-1,k-1) + T(j-1,k) for 2 <= k <= j.

Original entry on oeis.org

1, 1, 3, 2, 5, 3, 9, 6, 16, 11, 27, 22, 50, 50, 101, 114, 215, 255, 471, 552, 1024, 1145, 2169, 2290, 4460, 4460, 8921, 8556, 17477, 16383, 33861, 31674, 65536, 62255, 127791, 124510, 252302, 252302, 504605, 514446, 1019051, 1048575, 2067627
Offset: 1

Views

Author

Klaus Brockhaus, following a suggestion of Paul Curtz, Jun 10 2007

Keywords

Examples

			For first seven rows of T see A131022 or A129339.
		

Crossrefs

Cf. A131022 (T read by rows), A129339 (main diagonal of T), A131023 (first subdiagonal of T), A131024 (row sums of T). First through sixth column of T are in A088911, A131026, A131027, A131028, A131029, A131030 resp.

Programs

  • Magma
    m:=43; M:=ZeroMatrix(IntegerRing(), m, m); for j:=1 to m do if (j-1) mod 6 lt 3 then M[j, 1]:=1; end if; end for; for k:=2 to m do for j:=k to m do M[j, k]:=M[j-1, k-1]+M[j, k-1]; end for; end for; [ &+[ M[j-k+1, k]: k in [1..(j+1) div 2] ]: j in [1..m] ];
  • Mathematica
    CoefficientList[Series[(1 - 3 x^2 + 2 x^4 + 2 x^6 - 2 x^8 + x^9)/((1 - x)*(1 + x)*(1 - x + x^2)*(1 - 2 x^2)*(1 - 3 x^2 + 3 x^4)), {x, 0, 42}], x] (* Michael De Vlieger, Oct 26 2021 *)
  • PARI
    {m=43; M=matrix(m, m); for(j=1, m, M[j, 1]=if((j-1)%6<3, 1, 0)); for(k=2, m, for(j=k, m, M[j, k]=M[j-1, k-1]+M[j, k-1])); for(j=1, m, print1(sum(k=1, (j+1)\2, M[j-k+1, k]), ","))}
    

Formula

G.f.: (1-3*x^2+2*x^4+2*x^6-2*x^8+x^9)/((1-x)*(1+x)*(1-x+x^2)*(1-2*x^2)*(1-3*x^2+3*x^4)).

A131023 First subdiagonal of triangular array T: T(j,1) = 1 for ((j-1) mod 6) < 3, else 0; T(j,k) = T(j-1,k-1) + T(j-1,k) for 2 <= k <= j.

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 14, 37, 101, 256, 593, 1267, 2534, 4825, 8921, 16384, 30581, 58975, 117950, 242461, 504605, 1048576, 2156201, 4371451, 8742902, 17308657, 34085873, 67108864, 132623405, 263652487, 527304974, 1059392917, 2133134741
Offset: 1

Views

Author

Klaus Brockhaus, following a suggestion of Paul Curtz, Jun 10 2007

Keywords

Comments

Also first differences of main diagonal A129339.

Examples

			For first seven rows of T see A131022 or A129339.
		

Crossrefs

Cf. A131022 (T read by rows), A129339 (main diagonal of T), A131024 (row sums of T), A131025 (antidiagonal sums of T). First through sixth column of T are in A088911, A131026, A131027, A131028, A131029, A131030 resp.

Programs

  • Magma
    m:=34; M:=ZeroMatrix(IntegerRing(), m, m); for j:=1 to m do if (j-1) mod 6 lt 3 then M[j, 1]:=1; end if; end for; for k:=2 to m do for j:=k to m do M[j, k]:=M[j-1, k-1]+M[j, k-1]; end for; end for; [ M[n+1, n]: n in [1..m-1] ];
    
  • PARI
    {m=33; v=concat([1, 2, 3, 4],vector(m-4)); for(n=5, m, v[n]=5*v[n-1]-9*v[n-2]+6*v[n-3]); v}

Formula

a(1) = 1, a(2) = 2, a(3) = 3, a(4) = 4; for n > 4, a(n) = 5*a(n-1) - 9*a(n-2) + 6*a(n-3).
G.f.: x*(1-3*x+2*x^2+x^3)/((1-2*x)*(1-3*x+3*x^2)).
a(n) = A057681(n-1) + 2^(n-2), a(1) = 1. - Bruno Berselli, Feb 17 2011

A131024 Row sums of triangular array T: T(j,1) = 1 for ((j-1) mod 6) < 3, else 0; T(j,k) = T(j-1,k-1) + T(j-1,k) for 2 <= k <= j.

Original entry on oeis.org

1, 3, 7, 11, 16, 22, 36, 73, 175, 431, 1024, 2290, 4824, 9649, 18571, 34955, 65536, 124510, 242460, 484921, 989527, 2038103, 4194304, 8565754, 17308656, 34617313, 68703187, 135812051, 268435456, 532087942, 1059392916, 2118785833, 4251920575, 8546887871
Offset: 1

Views

Author

Klaus Brockhaus, following a suggestion of Paul Curtz, Jun 10 2007

Keywords

Comments

Sum of n-th row equals (n+1)-th term of main diagonal minus (n+1)-th term of first column. A088911 has offset 0, so a(n) = A129339(n+1) - A088911(n).

Examples

			For first seven rows of T see A131022 or A129339.
		

Crossrefs

Cf. A131022 (T read by rows), A129339 (main diagonal of T), A131023 (first subdiagonal of T), A131025 (antidiagonal sums of T). First through sixth column of T are in A088911, A131026, A131027, A131028, A131029, A131030 resp.

Programs

  • Magma
    m:=32; M:=ZeroMatrix(IntegerRing(), m, m); for j:=1 to m do if (j-1) mod 6 lt 3 then M[j, 1]:=1; end if; end for; for k:=2 to m do for j:=k to m do M[j, k]:=M[j-1, k-1]+M[j, k-1]; end for; end for; [ &+[ M[j, k]: k in [1..j] ]: j in [1..m] ];
  • PARI
    lista(m) = my(M=matrix(m, m)); for(j=1, m, M[j, 1]=if((j-1)%6<3, 1, 0)); for(k=2, m, for(j=k, m, M[j, k]=M[j-1, k-1]+M[j, k-1])); for(j=1, m, print1(sum(k=1, j, M[j, k]), ", "))
    

Formula

G.f.: x*(1-3*x+3*x^2-3*x^3+6*x^4-4*x^5+x^6)/((1-x)*(1+x)*(1-2*x)*(1-x+x^2)*(1-3*x+3*x^2)).

A132357 a(n) = 3*a(n-1) - a(n-3) + 3*a(n-4), with initial values 1,4,14,41.

Original entry on oeis.org

1, 4, 14, 41, 122, 364, 1093, 3280, 9842, 29525, 88574, 265720, 797161, 2391484, 7174454, 21523361, 64570082, 193710244, 581130733, 1743392200, 5230176602, 15690529805, 47071589414, 141214768240, 423644304721
Offset: 0

Views

Author

Paul Curtz, Nov 24 2007

Keywords

Crossrefs

First differences of A132353.
Cf. A129339.

Programs

  • Mathematica
    LinearRecurrence[{3,0,-1,3},{1,4,14,41},50] (* Paolo Xausa, Dec 05 2023 *)
  • PARI
    a(n)=([0,1,0,0; 0,0,1,0; 0,0,0,1; 3,-1,0,3]^n*[1;4;14;41])[1,1] \\ Charles R Greathouse IV, Oct 08 2016

Formula

O.g.f.: -(1+x+2*x^2)/((3*x-1)*(x+1)*(x^2-x+1)) = -(3/2)/(3*x-1)+(1/3)*(x-2)/(x^2-x+1)+(1/ 6)/(x+1). - R. J. Mathar, Nov 28 2007
a(n) = (1/2)*3^(n+1) + (1/6)*(-1)^n - (2/3)*cos(Pi*n/3). Or, a(n) = (1/2)*3^(n+1) + (1/2)*[ -1; -1; 1; 1; 1; -1]. - Richard Choulet, Jan 02 2008
a(n+1) - 3a(n) = A132367(n+1). - Paul Curtz, Dec 02 2007
6*a(n) = (-1)^n +3^(n+2) -2*A057079(n+1). - R. J. Mathar, Oct 03 2021

A132868 a(n) = 3*a(n-1) - a(n-3) + 3*a(n-4), with initial values 1,3,7,20.

Original entry on oeis.org

1, 3, 7, 20, 60, 182, 547, 1641, 4921, 14762, 44286, 132860, 398581, 1195743, 3587227, 10761680, 32285040, 96855122, 290565367, 871696101, 2615088301, 7845264902, 23535794706, 70607384120, 211822152361, 635466457083, 1906399371247, 5719198113740
Offset: 0

Views

Author

Paul Curtz, Nov 22 2007

Keywords

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{3,0,-1,3},{1,3,7,20},50] (* Harvey P. Dale, Jan 21 2012 *)

Formula

4*a(n) = 3^(n+1) + A132951(n).
O.g.f.: (-1+2*x^2)/((3*x-1)*(x+1)*(x^2-x+1)) = -(3/4)/(3*x-1)-(1/12)/(x+1)+(1/3)*(x+1)/(x^2-x+1). - R. J. Mathar, Nov 28 2007
a(n) = (1/12)*(3^(n+2) - 4*cos((n+1)*Pi/3) + cos((n+1)*Pi) + 4*sqrt(3) * sin(((n+1)*Pi)/3) + I*sin((n+1)*Pi)). - Harvey P. Dale, Jan 21 2012
12*a(n) = -(-1)^n +3^(n+2) +4*A057079(n). - R. J. Mathar, Oct 03 2021

A135343 a(n) = 3*a(n-1) + 4*a(n-2) - a(n-3) + 3*a(n-4) + 4*a(n-5).

Original entry on oeis.org

1, 3, 12, 51, 205, 820, 3277, 13107, 52428, 209715, 838861, 3355444, 13421773, 53687091, 214748364, 858993459, 3435973837, 13743895348, 54975581389, 219902325555, 879609302220, 3518437208883, 14073748835533, 56294995342132, 225179981368525, 900719925474099
Offset: 0

Views

Author

Paul Curtz, Dec 05 2007

Keywords

Comments

See A129339 comments. Third sequence after b(n) = 3*b(n-1) - 3*b(n-2) + 2*b(n-3) and c(n) = 3*c(n-1) - c(n-3) + 3*c(n-4). The first is for every sequence identical to its third differences. What characterizes the two others?

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{3,4,-1,3,4},{1,3,12,51,205},30] (* Harvey P. Dale, Jun 03 2013 *)
  • PARI
    Vec((1-x+4*x^3)/((1+x)*(1-4*x)*(1-x+x^2)) + O(x^30)) \\ Colin Barker, Oct 11 2016

Formula

a(n+1) - 4*a(n) = hexaperiodic -1, 0, 3, 1, 0, -3.
a(n) = (1/15)*( 3*4^(n+1) - 2*(-1)^n + 5*cos(Pi*n/3) - 5*sqrt(3)*cos(Pi*n/3) ). - Richard Choulet, Jan 04 2008
G.f.: (1-x+4*x^3) / ((1+x)*(1-4*x)*(1-x+x^2)). - Colin Barker, Oct 11 2016

Extensions

More terms from Harvey P. Dale, Jun 03 2013
Removed incorrect formula, Joerg Arndt, Oct 11 2016
Showing 1-10 of 14 results. Next