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

A129339 Main diagonal 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,k-1) for 2 <= k <= j.

Original entry on oeis.org

1, 2, 4, 7, 11, 16, 23, 37, 74, 175, 431, 1024, 2291, 4825, 9650, 18571, 34955, 65536, 124511, 242461, 484922, 989527, 2038103, 4194304, 8565755, 17308657, 34617314, 68703187, 135812051, 268435456, 532087943, 1059392917, 2118785834
Offset: 1

Views

Author

Paul Curtz, May 28 2007

Keywords

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. A038504, A131022 (T read by rows), 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:=33; 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, n]: n in [1..m] ]; // Klaus Brockhaus, Jun 10 2007
    
  • Magma
    m:=33; S:=[ [1, 1, 1, 0, 0, 0][(n-1) mod 6 + 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
    
  • Magma
    I:=[1,2,4,7]; [n le 4 select I[n] else 5*Self(n-1)-9*Self(n-2)+6*Self(n-3): n in [1..40]]; // Vincenzo Librandi, Feb 13 2018
  • Mathematica
    a[n_] := 2^(n-2) + 2*3^((n-3)/2)*Sin[n*Pi/6]; a[1]=1; Table[a[n], {n, 1, 33}] (* Jean-François Alcover, Aug 13 2012 *)
    CoefficientList[Series[(1 - x)^3 / ((1 - 2 x) (1 - 3 x + 3 x^2)), {x, 0, 33}], x] (* Vincenzo Librandi, Feb 13 2018 *)
  • PARI
    {m=33; v=concat([1, 2, 4, 7], vector(m-4)); for(n=5, m, v[n]=5*v[n-1]-9*v[n-2]+6*v[n-3]); v} \\ Klaus Brockhaus, Jun 10 2007
    

Formula

G.f.: x*(1-x)^3/((1-2*x)*(1-3*x+3*x^2)). [multiplied by x to match the offset by R. J. Mathar, Jul 22 2009]
a(1) = 1, a(2) = 2, a(3) = 4, a(4) = 7; for n > 4, a(n) = 5*a(n-1) - 9*a(n-2) + 6*a(n-3).
Binomial transform of A088911. - Klaus Brockhaus, Jun 17 2007
a(n+1) = A057083(n)/3+2^(n-1), n > 1. - R. J. Mathar, Jul 22 2009

Extensions

Edited and extended by Klaus Brockhaus, Jun 10 2007

A131027 Period 6: repeat [4, 3, 1, 0, 1, 3].

Original entry on oeis.org

4, 3, 1, 0, 1, 3, 4, 3, 1, 0, 1, 3, 4, 3, 1, 0, 1, 3, 4, 3, 1, 0, 1, 3, 4, 3, 1, 0, 1, 3, 4, 3, 1, 0, 1, 3, 4, 3, 1, 0, 1, 3, 4, 3, 1, 0, 1, 3, 4, 3, 1, 0, 1, 3, 4, 3, 1, 0, 1, 3, 4, 3, 1, 0, 1, 3, 4, 3, 1, 0, 1, 3, 4, 3, 1, 0, 1, 3, 4, 3, 1, 0, 1, 3, 4, 3, 1, 0, 1, 3, 4, 3, 1, 0, 1, 3, 4, 3, 1, 0, 1, 3, 4, 3, 1
Offset: 1

Views

Author

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

Keywords

Comments

Third column of triangular array T defined in A131022.
a(n) = abs(A078070(n+1)).
Determinants of the spiral knots S(3,k,(1,1)). a(k+4) = det(S(3,k,(1,1))). These knots are also the torus knots T(3,k). - Ryan Stees, Dec 13 2014

Examples

			For k=3, b(7)=sqrt(3)b(6)-b(5)=3-1=2, so det(S(3,3,(1,1)))=2^2=4.
		

Crossrefs

Cf. A087204, A131022, A078070. Other columns of T are in A088911, A131026, A131028, A131029, A131030.

Programs

  • Magma
    m:=105; [ [4, 3, 1, 0, 1, 3][(n-1) mod 6 + 1]: n in [1..m] ];
    
  • Maple
    A131027:=n->2+cos(n*Pi/3)+sqrt(3)*sin(n*Pi/3): seq(A131027(n), n=1..100); # Wesley Ivan Hurt, Sep 11 2014
  • Mathematica
    Table[2 + Cos[n*Pi/3] + Sqrt[3]*Sin[n*Pi/3], {n, 30}] (* Wesley Ivan Hurt, Sep 11 2014 *)
  • PARI
    {m=105; for(n=1, m, r=(n-1)%6; print1(if(r==0, 4, if(r==1||r==5, 3, if(r==3, 0, 1))), ","))}
    
  • Sage
    [(lucas_number2(n,2,1)-lucas_number2(n-1,1,1)) for n in range(4, 109)] # Zerinvary Lajos, Nov 10 2009

Formula

a(1) = 4, a(2) = a(6) = 3, a(3) = a(5) = 1, a(4) = 0, a(6) = 1; for n > 6, a(n) = a(n-6).
G.f.: (4-5*x+3*x^2)/((1-x)*(1-x+x^2)).
a(n) = 2+cos(n*Pi/3)+sqrt(3)*sin(n*Pi/3) = 2+(-1)^((n-1)/3)+(-1)^((1-n)/3). - Wesley Ivan Hurt, Sep 11 2014
a(k+4) = det(S(3,k,(1,1))) = (b(k+4))^2, where b(5)=1, b(6)=sqrt(3), b(k)=sqrt(3)*b(k-1) - b(k-2) = b(6)*b(k-1) - b(k-2). - Ryan Stees, Dec 13 2014
a(n) = 2 + 2*cos(Pi/3*(n-1)) = 2 + A087204(n-1) for n >= 1. - Werner Schulte, Jul 18 2017 and Peter Munn, Apr 28 2022

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)

A131028 Periodic sequence (7, 4, 1, 1, 4, 7).

Original entry on oeis.org

7, 4, 1, 1, 4, 7, 7, 4, 1, 1, 4, 7, 7, 4, 1, 1, 4, 7, 7, 4, 1, 1, 4, 7, 7, 4, 1, 1, 4, 7, 7, 4, 1, 1, 4, 7, 7, 4, 1, 1, 4, 7, 7, 4, 1, 1, 4, 7, 7, 4, 1, 1, 4, 7, 7, 4, 1, 1, 4, 7, 7, 4, 1, 1, 4, 7, 7, 4, 1, 1, 4, 7, 7, 4, 1, 1, 4, 7, 7, 4, 1, 1, 4, 7, 7, 4, 1, 1, 4, 7, 7, 4, 1, 1, 4, 7, 7, 4, 1, 1, 4, 7, 7, 4, 1
Offset: 1

Views

Author

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

Keywords

Comments

Fourth column of triangular array T defined in A131022.
Continued fractions of (131 + sqrt(18530))/37 = 7.2195930... - R. J. Mathar, Mar 08 2012

Crossrefs

Cf. A131022, A084104. Other columns of T are in A088911, A131026, A131027, A131029, A131030.

Programs

  • Magma
    m:=105; [ [7, 4, 1, 1, 4, 7][(n-1) mod 6 + 1]: n in [1..m] ];
  • Mathematica
    PadRight[{},120,{7,4,1,1,4,7}] (* Harvey P. Dale, Jul 15 2013 *)
  • PARI
    {m=105; for(n=1, m, r=(n-1)%6; print1(if(r==0||r==5, 7, if(r==1||r==4, 4, 1)), ","))}
    

Formula

a(1) = a(6) = 7, a(2) = a(5) = 4, a(3) = a(4) = 1; for n > 6, a(n) = a(n-6).
G.f.: x*(7-10*x+7*x^2)/((1-x)*(1-x+x^2)).
a(n) = A084104(n+2).
a(n) = 4+2*sqrt(3)*cos(Pi/6*(2*n-1)). - Werner Schulte, Jul 21 2017

A131029 Periodic sequence (11, 5, 2, 5, 11, 14).

Original entry on oeis.org

11, 5, 2, 5, 11, 14, 11, 5, 2, 5, 11, 14, 11, 5, 2, 5, 11, 14, 11, 5, 2, 5, 11, 14, 11, 5, 2, 5, 11, 14, 11, 5, 2, 5, 11, 14, 11, 5, 2, 5, 11, 14, 11, 5, 2, 5, 11, 14, 11, 5, 2, 5, 11, 14, 11, 5, 2, 5, 11, 14, 11, 5, 2, 5, 11, 14, 11, 5, 2, 5, 11, 14, 11, 5, 2, 5, 11, 14, 11, 5, 2, 5, 11, 14
Offset: 1

Views

Author

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

Keywords

Comments

Fifth column of triangular array T defined in A131022.

Crossrefs

Cf. A131022. Other columns of T are in A088911, A131026, A131027, A131028, A131030.

Programs

  • Magma
    m:=84; [ [11, 5, 2, 5, 11, 14][(n-1) mod 6 + 1]: n in [1..m] ];
    
  • Mathematica
    PadRight[{},120,{11,5,2,5,11,14}] (* or *) LinearRecurrence[{2,-2,1},{11,5,2},120] (* Harvey P. Dale, Jun 12 2017 *)
  • PARI
    {m=84; for(n=1, m, r=(n-1)%6; print1(if(r==0||r==4, 11, if(r==2, 2, if(r==5, 14, 5))), ","))}
    
  • Python
    def a(n): return [11, 5, 2, 5, 11, 14][n%6]
    print([a(n) for n in range(84)]) # Michael S. Branicky, Nov 05 2021

Formula

a(1) = a(5) = 11, a(2) = a(4) = 5, a(3) = 2, a(6) = 14; for n > 6, a(n) = a(n-6).
G.f.: (11-17*x+14*x^2)/((1-x)*(1-x+x^2)).
a(n) = 3*cos((n-1)/3*Pi)-3*sqrt(3)*sin((n-1)/3*Pi)+8. - Leonid Bedratyuk, May 13 2012

A131030 Period 6: repeat [16, 7, 7, 16, 25, 25].

Original entry on oeis.org

16, 7, 7, 16, 25, 25, 16, 7, 7, 16, 25, 25, 16, 7, 7, 16, 25, 25, 16, 7, 7, 16, 25, 25, 16, 7, 7, 16, 25, 25, 16, 7, 7, 16, 25, 25, 16, 7, 7, 16, 25, 25, 16, 7, 7, 16, 25, 25, 16, 7, 7, 16, 25, 25, 16, 7, 7, 16, 25, 25, 16, 7, 7, 16, 25, 25, 16, 7, 7, 16, 25, 25, 16, 7, 7, 16, 25, 25, 16
Offset: 1

Views

Author

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

Keywords

Comments

Sixth column of triangular array T defined in A131022.

Crossrefs

Cf. A131022. Other columns of T are in A088911, A131026, A131027, A131028, A131029.

Programs

  • Magma
    m:=79; [ [16, 7, 7, 16, 25, 25][(n-1) mod 6 + 1]: n in [1..m] ];
  • Maple
    seq(op([16, 7, 7, 16, 25, 25]), n=0..30); # Wesley Ivan Hurt, Oct 02 2018
  • PARI
    {m=79; for(n=1, m, r=(n-1)%6; print1(if(r==0||r==3, 16, if(r==1||r==2, 7, 25)), ","))}
    

Formula

a(1) = a(4) = 16, a(2) = a(3) = 7, a(5) = a(6) = 25; for n > 6, a(n) = a(n-6).
G.f.: x*(16 - 25*x + 25*x^2)/((1-x)*(1 - x + x^2)).
a(n) = 16 + 9*cos(n*Pi/3) - 3*sqrt(3)*sin(n*Pi/3). - Wesley Ivan Hurt, Sep 26 2018

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)).

A131079 Periodic sequence (2, 2, 2, 1, 0, 0, 0, 1).

Original entry on oeis.org

2, 2, 2, 1, 0, 0, 0, 1, 2, 2, 2, 1, 0, 0, 0, 1, 2, 2, 2, 1, 0, 0, 0, 1, 2, 2, 2, 1, 0, 0, 0, 1, 2, 2, 2, 1, 0, 0, 0, 1, 2, 2, 2, 1, 0, 0, 0, 1, 2, 2, 2, 1, 0, 0, 0, 1, 2, 2, 2, 1, 0, 0, 0, 1, 2, 2, 2, 1, 0, 0, 0, 1, 2, 2, 2, 1, 0, 0, 0, 1, 2, 2, 2, 1, 0, 0, 0, 1, 2, 2, 2, 1, 0, 0, 0, 1, 2, 2, 2, 1, 0, 0, 0, 1, 2
Offset: 1

Views

Author

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

Keywords

Comments

Second column of triangular array T defined in A131074.

Crossrefs

Programs

  • Magma
    m:=105; [ [2, 2, 2, 1, 0, 0, 0, 1][(n-1) mod 8 + 1]: n in [1..m] ];
  • Mathematica
    PadRight[{},120,{2,2,2,1,0,0,0,1}] (* Harvey P. Dale, Mar 04 2020 *)
  • PARI
    {m=105; for(n=1, m, r=(n-1)%8; print1(if(r<3, 2, if(r==3||r==7, 1, 0)), ","))}
    

Formula

a(n) = a(n-8).
G.f.: x*(2-x^3+x^4)/((1-x)*(1+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)).
Showing 1-10 of 12 results. Next