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 41-50 of 72 results. Next

A131111 T(n, k) = 3*binomial(n,k) - 2*I(n,k), where I is the identity matrix; triangle T read by rows (n >= 0 and 0 <= k <= n).

Original entry on oeis.org

1, 3, 1, 3, 6, 1, 3, 9, 9, 1, 3, 12, 18, 12, 1, 3, 15, 30, 30, 15, 1, 3, 18, 45, 60, 45, 18, 1, 3, 21, 63, 105, 105, 63, 21, 1, 3, 24, 84, 168, 210, 168, 84, 24, 1, 3, 27, 108, 252, 378, 378, 252, 108, 27, 1
Offset: 0

Views

Author

Gary W. Adamson, Jun 15 2007

Keywords

Comments

Row sums = A033484: (1, 4, 10, 22, 46, ...) = 3*2^n - 2.

Examples

			Triangle T(n,k) (with rows n >= 0 and columns k = 0..n) begins:
  1;
  3,  1;
  3,  6,  1;
  3,  9,  9,  1;
  3, 12, 18, 12,  1;
  3, 15, 30, 30, 15,  1;
  3, 18, 45, 60, 45, 18, 1;
  ...
		

Crossrefs

Programs

  • GAP
    T:= function(n,k)
        if k=n then return 1;
        else return 3*Binomial(n,k);
        fi;  end;
    Flat(List([0..10], n-> List([0..n], k-> T(n,k) ))); # G. C. Greubel, Nov 18 2019
  • Magma
    [k eq n select 1 else 3*Binomial(n,k): k in [0..n], n in [0..10]]; // G. C. Greubel, Nov 18 2019
    
  • Maple
    seq(seq(`if`(k=n, 1, 3*binomial(n,k)), k=0..n), n=0..10); # G. C. Greubel, Nov 18 2019
  • Mathematica
    Table[If[k==n, 1, 3*Binomial[n, k]], {n,0,10}, {k,0,n}]//Flatten (* G. C. Greubel, Nov 18 2019 *)
  • PARI
    T(n,k) = if(k==n, 1, 3*binomial(n,k)); \\ G. C. Greubel, Nov 18 2019
    
  • Sage
    @CachedFunction
    def T(n, k):
        if (k==n): return 1
        else: return 3*binomial(n, k)
    [[T(n, k) for k in (0..n)] for n in (0..10)] # G. C. Greubel, Nov 18 2019
    

Formula

T(n,k) = 3*A007318(n,k) - 2*I(n,k), where A007318 = Pascal's triangle and I = Identity matrix.
Bivariate o.g.f.: Sum_{n,k>=0} T(n,k)*x^n*y^k = (1 + 2*x - x*y)/((1 - x*y)*(1 - x - x*y)). - Petros Hadjicostas, Feb 20 2021

A238303 Triangle T(n,k), 0<=k<=n, read by rows given by T(n,0) = 1, T(n,k) = 2 if k>0.

Original entry on oeis.org

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

Views

Author

Philippe Deléham, Feb 24 2014

Keywords

Comments

Row sums are A005408(n).
Diagonals sums are A109613(n).
Sum_{k=0..n} T(n,k)*x^k = A033999(n), A000012(n), A005408(n), A036563(n+2), A058481(n+1), A083584(n), A137410(n), A233325(n), A233326(n), A233328(n), A211866(n+1), A165402(n+1) for x = -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 respectively.
Sum_{k=0..n} T(n,k)*x^(n-k) = A151575(n), A000012(n), A040000(n), A005408(n), A033484(n), A048473(n), A020989(n), A057651(n), A061801(n), A238275(n), A238276(n), A138894(n), A090843(n), A199023(n) for x = -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 respectively.
Sum_{k=0..n} T(n,k)^x = A000027(n+1), A005408(n), A016813(n), A017077(n) for x = 0, 1, 2, 3 respectively.
Sum_{k=0..n} k*T(n,k) = A002378(n).
Sum_{k=0..n} A000045(k)*T(n,k) = A019274(n+2).
Sum_{k=0..n} A000142(k)*T(n,k) = A066237(n+1).

Examples

			Triangle begins:
1;
1, 2;
1, 2, 2;
1, 2, 2, 2;
1, 2, 2, 2, 2;
1, 2, 2, 2, 2, 2;
1, 2, 2, 2, 2, 2, 2;
1, 2, 2, 2, 2, 2, 2, 2;
1, 2, 2, 2, 2, 2, 2, 2, 2;
1, 2, 2, 2, 2, 2, 2, 2, 2, 2;
1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2;
1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2;
...
		

Crossrefs

Cf. Diagonals: A040000.
Cf. Columns: A000012, A007395.
First differences of A001614.

Programs

Formula

T(n,0) = A000012(n) = 1, T(n+k,k) = A007395(n) = 2 for k>0.

Extensions

Data section extended to a(104) by Antti Karttunen, Jan 19 2025

A259052 Sum of Pascal triples.

Original entry on oeis.org

3, 4, 4, 4, 5, 6, 8, 6, 5, 6, 8, 13, 12, 13, 8, 6, 7, 10, 19, 20, 26, 20, 19, 10, 7, 8, 12, 26, 30, 45, 40, 45, 30, 26, 12, 8, 9, 14, 34, 42, 71, 70, 90, 70, 71, 42, 34, 14, 9, 10, 16, 43, 56, 105, 112, 161, 140, 161, 112, 105, 56, 43, 16, 10
Offset: 1

Views

Author

Wolfdieter Lang, Jun 27 2015

Keywords

Comments

The sequence of row lengths of this irregular triangle is A005408(n-1) = 2*n - 1.
This entry is motivated by A258445 from Craig Knecht. There the minima of the Pascal triples are given.
A Pascal triple PT(n, k) for n >= 1, k = 1, 2, ..., 2*n-1 is defined for even k by (P(n-1, k/2-1), P(n-1, k/2), P(n, k/2)) with P(n, k) = A007318(n, k) = binomial(n, k), and for odd k by (P(n-1, (k-1)/2), P(n, (k-1)/2), P(n, (k+1)/2)).
The strip S_n between row n-1 and n of Pascal's triangle (written as symmetric equilateral triangle) is divided into 2*n-1 small equilateral up - down triangles connecting neighboring entries of Pascal's triangle. For odd k these triangles have their base on row n of Pascal's triangle (up triangles), and for even n their base is on row n-1 (down triangles). There are n up triangles and n-1 down triangles in strip S_n.
The present irregular triangle gives the sum of the Pascal triples.
This is motivated by the idea (see A258445) of considering equal touching cylinders (closed only with a bottom disk) with centers at the corners of the small up and down triangles and radius r/2 if the side of each triangle has length r. They are filled with a liquid to a height h with h/r given by the Pascal entry at the center of the bottom of the cylinder. If, for each of the three pairs from a triple of touching cylinders a hole on the bottom of the vertical touching line is opened, then the new height H of the liquid for such a triple will be the arithmetic mean of the three original heights of the three touching cylinders. The ratio H/r will be 1/3 of the corresponding irregular triangle entry for this Pascal triple.
The row sums of this irregular triangle give 3*A033484(n-1), n >= 1.

Examples

			The irregular triangle T(n, k) starts:
  n\k 1  2  3  4  5  6  7  8  9 10 11 12 13 ...
  1:  3
  2:  4  4  4
  3:  5  6  8  6  5
  4:  6  8 13 12 13  8  6
  5:  7 10 19 20 26 20 19 10  7
  6:  8 12 26 30 45 40 45 30 26 12  8
  7:  9 14 34 42 71 70 90 70 71 42 34 14  9
  ...
T(3, 2) = 6 from the sum of the Pascal triple (1, 2, 3) (from the first down triangle in Pascal's triangle strip S_3).
The height ratio H/r for this Pascal triple PT(3, 2) = (1, 2, 3) is (1 + 2 + 3)/3 = T(3, 2)/3 = 2.
		

Crossrefs

Programs

  • PARI
    tabl(nn) = {for (n=1, nn, for (k=1, 2*n-1, kk = (k+1)\2; if (k%2, v = binomial(n-1, kk-1) + binomial(n, kk-1) + binomial(n, kk), v = binomial(n, kk) + binomial(n-1, kk-1) + binomial(n-1, kk)); print1(v, ", ");); print(););} \\ Michel Marcus, Jun 27 2015

Formula

T(n, 2*m) = P(n-1, m-1) + P(n-1, m) + P(n, m) with P(n, k) = A007318(n, k) = binomial(n, k), for m = 1..n-1, and
T(n, 2*m-1) = P(n-1, m-1) + P(n, m-1) + P(n, m) for m = 1..n.
T(n, 2*m-1) = A028263(n-1, m-1), n >= 1, m = 1..n, and T(n, 2*m) = 2*A014410(n, m), n >= 2, m = 1..n-1.

A383818 Square array A(n,k), n>=0, k>=0, read by antidiagonals downwards, where column k is the expansion of 1/(1 - k*x) * Product_{j=0..k-1} (1 + j*x)/(1 - j*x).

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 4, 1, 0, 1, 9, 10, 1, 0, 1, 16, 45, 22, 1, 0, 1, 25, 136, 177, 46, 1, 0, 1, 36, 325, 856, 621, 94, 1, 0, 1, 49, 666, 3025, 4576, 2049, 190, 1, 0, 1, 64, 1225, 8646, 23125, 22216, 6525, 382, 1, 0, 1, 81, 2080, 21217, 90126, 156145, 101536, 20337, 766, 1, 0
Offset: 0

Views

Author

Seiichi Manyama, May 14 2025

Keywords

Examples

			Square array begins:
  1, 1,  1,    1,     1,      1, ...
  0, 1,  4,    9,    16,     25, ...
  0, 1, 10,   45,   136,    325, ...
  0, 1, 22,  177,   856,   3025, ...
  0, 1, 46,  621,  4576,  23125, ...
  0, 1, 94, 2049, 22216, 156145, ...
		

Crossrefs

Columns k=0..4 give A000007, A000012, A033484, A383912, A383913.
Main diagonal gives A383839.

Programs

  • PARI
    a(n, k) = sum(j=0, k, abs(stirling(k, j, 1))*stirling(j+n, k, 2));

Formula

A(n,k) = Sum_{j=0..k} |Stirling1(k,j)| * Stirling2(j+n,k).

A062001 Table by antidiagonals of n-Stohr sequences: T(n,k) is least positive integer not the sum of at most n distinct terms in the n-th row from T(n,1) through to T(n,k-1).

Original entry on oeis.org

1, 2, 1, 3, 2, 1, 4, 4, 2, 1, 5, 7, 4, 2, 1, 6, 10, 8, 4, 2, 1, 7, 13, 15, 8, 4, 2, 1, 8, 16, 22, 16, 8, 4, 2, 1, 9, 19, 29, 31, 16, 8, 4, 2, 1, 10, 22, 36, 46, 32, 16, 8, 4, 2, 1, 11, 25, 43, 61, 63, 32, 16, 8, 4, 2, 1, 12, 28, 50, 76, 94, 64, 32, 16, 8, 4, 2, 1, 13, 31, 57, 91, 125, 127, 64, 32, 16, 8, 4, 2, 1
Offset: 1

Views

Author

Henry Bottomley, May 29 2001

Keywords

Examples

			Array begins as:
  1, 2, 3, 4,  5,  6,  7,   8,   9, ... A000027;
  1, 2, 4, 7, 10, 13, 16,  19,  22, ... A033627;
  1, 2, 4, 8, 15, 22, 29,  36,  43, ... A026474;
  1, 2, 4, 8, 16, 31, 46,  61,  76, ... A051039;
  1, 2, 4, 8, 16, 32, 63,  94, 125, ... A051040;
  1, 2, 4, 8, 16, 32, 64, 127, 190, ... ;
  1, 2, 4, 8, 16, 32, 64, 128, 255, ... ;
  1, 2, 4, 8, 16, 32, 64, 128, 256, ... ;
  1, 2, 4, 8, 16, 32, 64, 128, 256, ... ;
Antidiagonal triangle begins as:
   1;
   2,  1;
   3,  2,  1;
   4,  4,  2,  1;
   5,  7,  4,  2,   1;
   6, 10,  8,  4,   2,   1;
   7, 13, 15,  8,   4,   2,  1;
   8, 16, 22, 16,   8,   4,  2,  1;
   9, 19, 29, 31,  16,   8,  4,  2,  1;
  10, 22, 36, 46,  32,  16,  8,  4,  2, 1;
  11, 25, 43, 61,  63,  32, 16,  8,  4, 2, 1;
  12, 28, 50, 76,  94,  64, 32, 16,  8, 4, 2, 1;
  13, 31, 57, 91, 125, 127, 64, 32, 16, 8, 4, 2, 1;
		

Crossrefs

Diagonals include A000079, A000225, A033484, A036563, A048487.
A048483 can be seen as half this table.

Programs

  • Mathematica
    T[n_, k_]:= If[kG. C. Greubel, May 03 2022 *)
  • SageMath
    def A062001(n,k):
        if (kA062001(n,k) for k in (1..n)] for n in (1..15)]) # G. C. Greubel, May 03 2022

Formula

If k <= n+1 then A(n, k) = 2^(k-1), while if k > n+1, A(n, k) = (2^n - 1)*(k - n) + 1 (array).
T(n, k) = A(k, n-k+1) (antidiagonals).
T(2*n-1, n) = A000079(n-1), n >= 1.
T(2*n, n) = A000079(n), n >= 1.
T(2*n+1, n) = A000225(n+1), n >= 1.
T(2*n+2, n) = A033484(n), n >= 1.
T(2*n+3, n) = A036563(n+3), n >= 1.
T(2*n+4, n) = A048487(n), n >= 1.
From G. C. Greubel, May 03 2022: (Start)
T(n, k) = (2^k - 1)*(n-2*k+1) + 1 for k < n/2, otherwise 2^(n-k).
T(2*n+5, n) = A048488(n), n >= 1.
T(2*n+6, n) = A048489(n), n >= 1.
T(2*n+7, n) = A048490(n), n >= 1.
T(2*n+8, n) = A048491(n), n >= 1.
T(2*n+9, n) = A139634(n), n >= 1.
T(2*n+10, n) = A139635(n), n >= 1.
T(2*n+11, n) = A139697(n), n >= 1. (End)

A099257 a(1)=1, a(n+1) = if a(n)=n then 2*n+1 else smallest number not occurring earlier.

Original entry on oeis.org

1, 3, 2, 4, 9, 5, 6, 7, 8, 10, 21, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 22, 45, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 46, 93, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71
Offset: 1

Views

Author

Reinhard Zumkeller, Oct 09 2004

Keywords

Comments

Permutation of the natural numbers with inverse A099258;
a(A033484(n)) = A033484(n);
a(A033484(n) + 1) = 2*A033484(n) + 1 = A068156(n).

Formula

a(n) = if n = 3*2^k - 2 then n else (if n = 3*2^k - 1 then 2*n + 1 else n - 1).

A099258 Inverse of A099257.

Original entry on oeis.org

1, 3, 2, 4, 6, 7, 8, 9, 5, 10, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 11, 22, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 23, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73
Offset: 1

Views

Author

Reinhard Zumkeller, Oct 09 2004

Keywords

Comments

Permutation of the natural numbers;
a(A033484(n)) = A033484(n);
a(A033484(n) - 1) = A033484(n)/2 = A055010(n).

Formula

a(n) = if n = 3*2^k - 2 then n else (if n = 3*2^k - 3 then (n + 1)/2 else n + 1).

A124928 Triangle read by rows: T(n,0) = 1, T(n,k) = 3*binomial(n,k) if k>=0 (0<=k<=n).

Original entry on oeis.org

1, 1, 3, 1, 6, 3, 1, 9, 9, 3, 1, 12, 18, 12, 3, 1, 15, 30, 30, 15, 3, 1, 18, 45, 60, 45, 18, 3, 1, 21, 63, 105, 105, 63, 21, 3, 1, 24, 84, 168, 210, 168, 84, 24, 3, 1, 27, 108, 252, 378, 378, 252, 108, 27, 3, 1, 30, 135, 360, 630, 756, 630, 360, 135, 30, 3
Offset: 0

Views

Author

Gary W. Adamson, Nov 12 2006

Keywords

Comments

Row sums = A033484: (1, 4, 10, 22, 46, 94...); 3*2^n - 2.
Analogous triangle using (1,2,2,2...) as the main diagonal of M = A124927.
Except for the first column, entries in the Pascal triangle are tripled.

Examples

			First few rows of the triangle are:
  1;
  1,  3;
  1,  6,  3;
  1,  9,  9,  3;
  1, 12, 18, 12,  3;
  1, 15, 30, 30, 15,  3;
  1, 18, 45, 60, 45, 18, 3;
...
		

Crossrefs

Programs

  • GAP
    T:= function(n,k)
        if k=0 then return 1;
        else return 3*Binomial(n,k);
        fi;  end;
    Flat(List([0..12], n-> List([0..n], k-> T(n,k) ))); # G. C. Greubel, Nov 19 2019
  • Magma
    [k eq 0 select 1 else 3*Binomial(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Nov 19 2019
    
  • Maple
    T:=proc(n,k) if k=0 then 1 else 3*binomial(n,k) fi end: for n from 0 to 12 do seq(T(n,k),k=0..n) od; # yields sequence in triangular form
  • Mathematica
    Flatten[Table[If[k==0,1,3*Binomial[n,k]],{n,0,20},{k,0,n}]] (* Harvey P. Dale, Oct 19 2013 *)
  • PARI
    T(n,k) = if(k==0, 1, 3*binomial(n,k)); \\ G. C. Greubel, Nov 19 2019
    
  • Sage
    def T(n, k):
        if (k==0): return 1
        else: return 3*binomial(n,k)
    [[T(n, k) for k in (0..n)] for n in (0..12)] # G. C. Greubel, Nov 19 2019
    

Formula

G.f.: G(t,z) = 3/(1-(1+t)*z) - 2/(1-z).

Extensions

Edited by N. J. A. Sloane, Nov 29 2006

A142964 a(n) = 6*2^n - 2*n - 5.

Original entry on oeis.org

1, 5, 15, 37, 83, 177, 367, 749, 1515, 3049, 6119, 12261, 24547, 49121, 98271, 196573, 393179, 786393, 1572823, 3145685, 6291411, 12582865, 25165775, 50331597, 100663243, 201326537, 402653127, 805306309, 1610612675, 3221225409, 6442450879, 12884901821
Offset: 0

Views

Author

Wolfdieter Lang, Sep 15 2008

Keywords

Comments

Previous name was: One half of second column (m=1) of triangle A142963.
Essentially a duplicate of A050488. - Johannes W. Meijer, Feb 20 2009

Examples

			a(3) = 6*2^3 - 2*3 - 5 = 37.
		

References

  • Eric Billault, Walter Damin, Robert Ferréol, and Rodolphe Garin, MPSI Classes Prépas - Khôlles de Maths, Exercices corrigés, Ellipses, 2012, exercice 2.22 (1) pp 26, 43-44.

Crossrefs

Cf. A142965 (m=2 column/4).
Equals A050488(n+1).
Equals A156920(n+1,1).
Equals A156919(n+1,1)/2^n.
Partial sums of A033484.

Programs

  • Maple
    seq(6*2^n-2*n-5,n=0..40); # Bernard Schott, Dec 16 2020
  • Mathematica
    a[n_]:=6*2^n-2n-5;Array[a,32,0] (* or *) CoefficientList[Series[(1+x)/((1-x)^2*(1-2*x)),{x,0,31}],x] (* or *) LinearRecurrence[{4,-5,2},{1,5,15},32] (* James C. McMahon, Aug 12 2025 *)
  • PARI
    Vec((1+z)/((1-z)^2*(1-2*z)) + O(z^50)) \\ Michel Marcus, Jun 18 2017

Formula

a(n) = A142693(n+2,1)/2.
From Johannes W. Meijer, Feb 20 2009: (Start)
a(n) = 4a(n-1) - 5a(n-2) + 2a(n-3) for n > 2 with a(0) = 1, a(1) = 5, a(2) = 15.
G.f.: (1+z)/((1-z)^2*(1-2*z)). (End)
a(n) = Sum_{i=0..n} Sum_{j=0..n} 2^min(i,j) (Billault et al) (compare with A339771 that has max instead of min). - Bernard Schott, Dec 16 2020
a(n) = 2*A066524(n+1) - A339771(n). - Kevin Ryde, Dec 17 2020
E.g.f.: 6*exp(2*x) - exp(x)*(5 + 2*x). - Stefano Spezia, Dec 17 2020

Extensions

New name using a formula of Bernard Schott by Peter Luschny, Dec 17 2020

A169721 a(n) = (2*(3*2^(n-1)-1))^2.

Original entry on oeis.org

1, 16, 100, 484, 2116, 8836, 36100, 145924, 586756, 2353156, 9424900, 37724164, 150945796, 603881476, 2415722500, 9663283204, 38653919236, 154617249796, 618472144900, 2473894871044, 9895592067076, 39582393434116, 158329624068100, 633318596935684
Offset: 0

Views

Author

Alice V. Kleeva (alice27353(AT)gmail.com), Jan 19 2010

Keywords

Comments

A subsequence of the squares (A000290).

Crossrefs

Programs

  • Magma
    I:=[1,16,100]; [n le 3 select I[n] else 7*Self(n-1)-14*Self(n-2)+8*Self(n-3): n in [1..30]];// Vincenzo Librandi, Dec 04 2012
  • Mathematica
    Table[(2(3*2^(n-1)-1))^2,{n,0,30}] (* Harvey P. Dale, Oct 29 2012 *)
    CoefficientList[Series[(1+x)/((1-x)*(1-2*x)), {x, 0, 30}], x]^2 (* Vincenzo Librandi, Dec 04 2012 *)

Formula

a(n) = A033484(n)^2.
G.f.: (1+9*x+2*x^2)/(1-7*x+14*x^2-8*x^3). - Bruno Berselli, Dec 04 2012
a(n) = 7*a(n-1)-14*a(n-2)+8*a(n-3). - Vincenzo Librandi, Dec 04 2012
Previous Showing 41-50 of 72 results. Next