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-6 of 6 results.

A133080 Interpolation operator: Triangle with an even number of zeros in each line followed by 1 or 2 ones.

Original entry on oeis.org

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

Views

Author

Gary W. Adamson, Sep 08 2007

Keywords

Comments

A133080 * [1,2,3,...] = A114753: (1, 3, 3, 7, 5, 11, 7, 15, ...).
Inverse of A133080: subdiagonal changes to (-1, 0, -1, 0, -1, ...); main diagonal unchanged.
A133080^(-1) * [1,2,3,...] = A093178: (1, 1, 3, 1, 5, 1, 7, 1, 9, ...).
In A133081, diagonal terms are switched with subdiagonal terms.

Examples

			First few rows of the triangle are:
  1;
  1, 1;
  0, 0, 1;
  0, 0, 1, 1;
  0, 0, 0, 0, 1;
  0, 0, 0, 0, 1, 1;
  0, 0, 0, 0, 0, 0, 1;
  ...
		

Crossrefs

Cf. A000034 (row sums), A114753, A093178, A133081.

Programs

  • Maple
    A133080 := proc(n,k)
        if n = k then
            1;
        elif  k=n-1 and type(n,even) then
            1;
        else
            0 ;
        end if;
    end proc: # R. J. Mathar, Jun 20 2015
  • Mathematica
    T[n_, k_] := If[k == n, 1, If[k == n - 1, (1 + (-1)^n)/2 , 0]];
    Table[T[n, k], {n, 1, 10}, {k, 1, n}] (* G. C. Greubel, Oct 21 2017 *)
  • PARI
    T(n, k) = if (k==n, 1, if (k == (n-1), 1 - (n % 2), 0)); \\ Michel Marcus, Feb 13 2014
    
  • PARI
    firstrows(n) = {my(res = vector(binomial(n + 1, 2)), t=0); for(i=1, n, t+=i; res[t] = 1; if(i%2==0, res[t-1]=1)) ;res} \\ David A. Corneth, Oct 21 2017

Formula

Infinite lower triangular matrix, (1,1,1,...) in the main diagonal and (1,0,1,0,1,...) in the subdiagonal.
Odd rows, (n-1) zeros followed by "1". Even rows, (n-2) zeros followed by "1, 1".
T(n,n)=1. T(n,k)=0 if 1 <= k < n-1. T(n,n-1)=1 if n even. T(n,n-1)=0 if n odd. - R. J. Mathar, Feb 14 2015

A133566 Triangle read by rows: (1,1,1,...) on the main diagonal and (0,1,0,1,...) on the subdiagonal.

Original entry on oeis.org

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

Views

Author

Gary W. Adamson, Sep 16 2007

Keywords

Comments

Usually regarded as a square matrix T when combined with other matrices and column vectors.
Then T * V, where V = any sequence regarded as a column vector with offset 1 is a new sequence S [called an interpolation transform] given by S(2n) = V(2n), S(2n-1) = V(2n) + V(2n-1). Example: If T * [1,2,3,...], S = [1, 2, 5, 4, 9, 6, 13, 8, 17, ...) = A114752. A133080 is identical to A133566 except that the subdiagonal = (1,0,1,0,...). A133080 * [1,2,3,...] = A114753: (1, 3, 3, 7, 5, 11, 7, 15, 9, 19, ...).
Triangle T(n,k), 0 <= k <= n, read by rows given by [0,1,-1,0,0,0,0,0,0,...] DELTA [1,0,-2,1,0,0,0,0,0,0,0,...] where DELTA is the operator defined in A084938. - Philippe Deléham, Dec 15 2007

Examples

			First few rows of the triangle:
  1;
  0, 1;
  0, 1, 1;
  0, 0, 0, 1;
  0, 0, 0, 1, 1;
  0, 0, 0, 0, 0, 1;
  ...
		

Crossrefs

Programs

  • Maple
    A133566 := proc(n,k)
        if n = k then
            1;
        elif  k=n-1 and type(n,odd) then
            1;
        else
            0 ;
        end if;
    end proc: # R. J. Mathar, Jun 20 2015
  • Mathematica
    T[n_, k_] := Which[n == k, 1, k == n - 1 && OddQ[n], 1, True, 0];
    Table[T[n, k], {n, 1, 14}, {k, 1, n}] // Flatten (* Jean-François Alcover, Aug 24 2023 *)

Formula

Odd rows: (n-2) zeros followed by 1, 1. Even rows: (n-1) zeros followed by 1.
Sum_{k=0..n} T(n,k) = A040001(n). - Philippe Deléham, Dec 15 2007
G.f.: (-1-x*y-x^2*y)*x*y/((-1+x*y)*(1+x*y)). - R. J. Mathar, Aug 11 2015

Extensions

Entry revised by N. J. A. Sloane, Jun 20 2015

A210530 T(n,k) = (k + 3*n - 2 - (k+n-2)*(-1)^(k+n))/2 n, k > 0, read by antidiagonals.

Original entry on oeis.org

1, 2, 3, 1, 2, 3, 4, 5, 6, 7, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22
Offset: 1

Views

Author

Boris Putievskiy, Jan 28 2013

Keywords

Comments

Row T(n,k) for odd n is even numbers sandwiched between n's starts from n and 2*n.
Row T(n,k) for even n is odd numbers sandwiched between n's starts from 2*n-1 and n.
Antidiagonal T(1,k), T(2,k-1), ..., T(k,1) for odd k is 1,2,3,...,k.
Antidiagonal T(1,k), T(2,k-1), ..., T(k,1) for even k is k+1, k+2, ..., 2*k+1.
The main diagonal is A000027.
Diagonal, located above the main diagonal T(1,k), T(2,k+1), T(3,k+2), ... for odd k is A000027.
Diagonal, located above the main diagonal T(1,k), T(2,k+1), T(3,k+2), ... for even k is k, k+3, k+6, ..., A016789, A016777, A008585.
Diagonal, located below the main diagonal T(n,1), T(n+1,2), T(n+2,3), ... for odd n is n,n+1, n+2, ... A000027.
Diagonal, located below the main diagonal T(n,1), T(n+1,2), T(n+2,3), ... for even n is 2*n-1, 2*n+2, 2*n+5, ... A008585, A016777, A016789.
The table contains:
A124625 as row 1,
A114753 as column 1,
A109043 as column 2,
A066104 as column 4.

Examples

			The start of the sequence as table:
   1   2   1   4   1   6   1   8   1  10
   3   2   5   2   7   2   9   2  11   2
   3   6   3   8   3  10   3  12   3  14
   7   4   9   4  11   4  13   4  15   4
   5  10   5  12   5  14   5  16   5  18
  11   6  13   6  15   6  17   6  19   6
   7  14   7  16   7  18   7  20   7  22
  15   8  17   8  19   8  21   8  23   8
   9  18   9  20   9  22   9  24   9  26
  19  10  21  10  23  10  25  10  27  10
  ...
The start of the sequence as triangle array read by rows:
   1;
   2,  3;
   1,  2,  3;
   4,  5,  6,  7;
   1,  2,  3,  4,  5;
   6,  7,  8,  9, 10, 11;
   1,  2,  3,  4,  5,  6,  7;
   8,  9, 10, 11, 12, 13, 14, 15;
   1,  2,  3,  4,  5,  6,  7,  8,  9;
  10, 11, 12, 13, 14, 15, 16, 17, 18, 19;
  ...
Row number r contains r numbers.
If r is  odd: 1,2,3,...,r.
If r is even: r, r+1, r+3, ..., 2*r-1.
The start of the sequence as array read by rows, the length of row r is 4*r-1.
First 2*r-1 numbers are from the row number 2*r-1 of triangle array, located above.
Last 2*r numbers are from the row number 2*r of triangle array, located above.
  1,2,3;
  1,2,3,4,5,6,7;
  1,2,3,4,5,6,7,8,9,10,11;
  1,2,3,4,5,6,7,8,9,10,11,12,13,14,15;
  1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19;
  ...
Row number r contains 4*r-1 numbers: 1,2,3,...,4*r-1.
		

Crossrefs

Programs

  • Mathematica
    T[n_, k_] := (k+3n-2-(k+n-2)(-1)^(k+n))/2; Table[T[n-k+1, k], {n, 1, 12}, {k, n, 1, -1}] // Flatten (* Jean-François Alcover, Nov 17 2018 *)
  • PARI
    T(n,k) = (k+3*n-2-(k+n-2)*(-1)^(k+n))/2; \\ Andrew Howroyd, Jan 11 2018
    
  • Python
    t=int((math.sqrt(8*n-7)-1)/2)
    v=int((t+2)/2)
    result=n-v*(2*v-3)-1

Formula

As table T(n,k) = (k + 3*n - 2 - (k+n-2)*(-1)^(k+n))/2.
As linear sequence
a(n) = A000027(n) - A204164(n)*(2*A204164(n)-3) - 1.
a(n) = n - v*(2*v-3) - 1, where t = floor((-1 + sqrt(8*n-7))/2) and v = floor((t+2)/2).
G.f. of the table: (y*(- 1 + 3*y^2) + x^2*(2 + 5*y - 2*y^2 - 7*y^3) + x^3*(4 + y - 6*y^2 - y^3) + x*(y + 2*y^2 - y^3))/((- 1 + x)^2*(1 + x)^2*(-1 + y)^2*(1 + y)^2). - Stefano Spezia, Nov 17 2018

A114752 a(2n)=2n, a(2n+1)=4n+1.

Original entry on oeis.org

1, 2, 5, 4, 9, 6, 13, 8, 17, 10, 21, 12, 25, 14, 29, 16, 33, 18, 37, 20, 41, 22, 45, 24, 49, 26, 53, 28, 57, 30, 61, 32, 65, 34, 69, 36, 73, 38, 77, 40, 81, 42, 85, 44, 89, 46, 93, 48, 97, 50, 101, 52, 105, 54, 109, 56, 113, 58, 117, 60, 121, 62, 125, 64, 129, 66, 133, 68, 137
Offset: 1

Views

Author

Amarnath Murthy, Nov 15 2005

Keywords

Comments

Original definition (typos corrected): The following triangle contains n consecutive numbers beginning from n in ascending order if n is odd else in descending order. 1 3 2 3 4 5 7 6 5 4 5 6 7 8 9 11 10 9 8 7 6 ... Sequence contains the leading diagonal.
Equals A133566 * [1,2,3,...]. - Gary W. Adamson, Sep 16 2007
The sequence satisfies a divisibility property described by E. Angelini on the SeqFan list, cf. link. - M. F. Hasler, Mar 22 2013
First difference of A014255 (shown easily from the Nurikabe property of that sequence, or by manipulating the linear recurrence representations). - Allan C. Wechsler, Oct 20 2022

Examples

			Contribution by _M. F. Hasler_, Mar 22 2013: (Start)
The triangle described in the original definition starts
   1
   3  2
   3  4  5
   7  6  5  4
   5  6  7  8  9
  11 10  9  8  7  6. (End)
		

Crossrefs

Programs

Formula

a(2n) = 2n, a(2n+1) = 4n+1. - Joshua Zucker, May 05 2006
G.f.: x*(1+2*x+3*x^2)/(1-x^2)^2. - Philippe Deléham, Mar 02 2012
a(n) = (3n-(n-1)*(-1)^n-1)/2. - Bruno Berselli, Mar 02 2012

Extensions

More terms from Joshua Zucker, May 05 2006
Simpler definition from M. F. Hasler, Mar 22 2013

A114751 The following triangle contains n consecutive numbers beginning from n in ascending order if n is odd else in descending order. Sequence contains the triangle by rows.

Original entry on oeis.org

1, 3, 2, 3, 4, 5, 7, 6, 5, 4, 5, 6, 7, 8, 9, 11, 10, 9, 8, 7, 6, 7, 8, 9, 10, 11, 12, 13, 15, 14, 13, 12, 11, 10, 9, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12
Offset: 1

Views

Author

Amarnath Murthy, Nov 15 2005

Keywords

Examples

			1
3 2
3 4 5
7 6 5 4
5 6 7 8 9
11 10 9 8 7 6
...
		

Crossrefs

Programs

  • Maple
    for n from 1 to 14 do if n mod 2 = 1 then print(seq(k,k=n..2*n-1)) else print(seq(2*n-k,k=1..n)) fi od; # yields sequence in triangular form # Emeric Deutsch, Jan 26 2006

Formula

a(n) = (3*t+2-t*(-1)^(t-1))/2-(1+(-1)^t)*(j-1)/2+(1-(-1)^t)*(j-1)/2, where j = (t*t+3*t+4)/2-n, t=floor((-1+sqrt(8*n-7))/2). - Boris Putievskiy, Jan 30 2013

Extensions

More terms from Emeric Deutsch, Jan 26 2006

A133086 Row sums of triangle A133085.

Original entry on oeis.org

1, 4, 10, 26, 64, 152, 352, 800, 1792, 3968, 8704, 18944, 40960, 88064, 188416, 401408, 851968, 1802240, 3801088, 7995392, 16777216, 35127296, 73400320, 153092096, 318767104, 662700032, 1375731712, 2852126720, 5905580032, 12213813248, 25232932864
Offset: 0

Views

Author

Gary W. Adamson, Sep 08 2007

Keywords

Examples

			a(3) = 26 = sum of row 3 of triangle A133085: (12 + 8, + 5 + 1).
a(3) = 26 = (1, 3, 3, 1) dot (1, 3, 3, 7) = (1 + 9 + 9 + 7).
		

Crossrefs

Programs

  • Magma
    [1,4] cat [2^n+3*n*2^(n-2): n in [2..30]]; // Vincenzo Librandi, Oct 21 2017
  • Mathematica
    Join[{1, 4}, Table[2^n + 3*n*2^(n - 2), {n, 2, 50}]] (* G. C. Greubel, Oct 21 2017 *)
    LinearRecurrence[{4,-4},{1,4,10,26},40] (* Harvey P. Dale, Jul 19 2020 *)
  • PARI
    concat([1,4], for(n=2,50, print1(2^n + 3*n*2^(n-2), ", "))) \\ G. C. Greubel, Oct 21 2017
    

Formula

Binomial transform of A114753: (1, 3, 3, 7, 5, 11, 7, 15, ...).
For n>1, a(n) = 2^n + 3*n*2^(n-2). - R. J. Mathar, Apr 04 2012
Showing 1-6 of 6 results.