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 71-80 of 98 results. Next

A130297 A130296^2.

Original entry on oeis.org

1, 4, 1, 8, 2, 1, 13, 3, 2, 1, 19, 4, 3, 2, 1, 26, 5, 4, 3, 2, 1, 34, 6, 5, 4, 3, 2, 1, 43, 7, 6, 5, 4, 3, 2, 1, 53, 8, 7, 6, 5, 4, 3, 2, 1, 64, 9, 8, 7, 6, 5, 4, 3, 2, 1
Offset: 1

Views

Author

Gary W. Adamson, May 20 2007

Keywords

Comments

Left border = A034856: (1, 4, 8, 13, 19, 26, 34, ...).
Row sums = A028387: (1, 5, 11, 19, 29, 41, 55, ...).

Examples

			First few rows of the triangle:
   1;
   4, 1;
   8, 2, 1;
  13, 3, 2, 1;
  19, 4, 3, 2, 1;
  26, 5, 4, 3, 2, 1;
  ...
		

Crossrefs

Programs

  • Python
    from math import comb, isqrt
    def A130297(n): return (a:=comb(r:=(m:=isqrt(k:=n<<1))+(k>m*(m+1))+1,2))+1-n+(a-1 if ((k2:=n-1<<1)==(m2:=isqrt(k2))*(m2+1)) else 0) # Chai Wah Wu, Nov 09 2024

Formula

Square of A130296 as an infinite lower triangular matrix.

A131416 (A000012 * A002260) + (A002260 * A000012) - A000012.

Original entry on oeis.org

1, 4, 3, 8, 8, 5, 13, 14, 12, 7, 19, 21, 20, 16, 9, 26, 29, 29, 26, 20, 11, 34, 38, 39, 37, 32, 24, 13, 43, 48, 50, 49, 45, 38, 28, 15, 53, 59, 62, 62, 59, 53, 44, 32, 17, 64, 71, 75, 76, 74, 69, 61, 50, 36, 19
Offset: 1

Views

Author

Gary W. Adamson, Jul 08 2007

Keywords

Comments

Left column = A034856: (1, 4, 8, 13, 19, 26, 34,...). Row sums = A127735: (1, 7, 21, 46, 85...).

Examples

			First few rows of the triangle are:
1;
4, 3;
8, 8, 5;
13, 14, 12, 7;
19, 21, 20, 16, 9;
26, 29, 29, 26, 20, 11;
...
		

Crossrefs

Formula

(A000012 * A002260) + (A002260 * A000012) - A000012; as infinite lower triangular matrices.

A132118 Triangle read by rows: T(n,k) = n*(n-1)/2 + 2*k - 1.

Original entry on oeis.org

1, 2, 4, 4, 6, 8, 7, 9, 11, 13, 11, 13, 15, 17, 19, 16, 18, 20, 22, 24, 26, 22, 24, 26, 28, 30, 32, 34, 29, 31, 33, 35, 37, 39, 41, 43, 37, 39, 41, 43, 45, 47, 49, 51, 53, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76
Offset: 1

Views

Author

Gary W. Adamson, Aug 10 2007

Keywords

Examples

			First few rows of the triangle are:
   1;
   2,  4;
   4,  6,  8;
   7,  9, 11, 13;
  11, 13, 15, 17, 19;
  16, 18, 20, 22, 24, 26;
  22, 24, 26, 28, 30, 32, 34;
  29, 31, 33, 35, 37, 39, 41, 43;
  ...
		

Crossrefs

Column 1 is A000124(n-1).
Main diagonal is A034856.
Row sums are A002411.

Programs

  • Mathematica
    Table[(n(n-1))/2+2k-1,{n,20},{k,n}]//Flatten (* Harvey P. Dale, Mar 26 2022 *)

Extensions

a(16), a(17) corrected by Georg Fischer, Jul 01 2020
Name changed and terms a(56) and beyond from Andrew Howroyd, Apr 17 2021

A132789 Triangle read by rows: T(n,k) = A007318(n-1, k-1) + A001263(n, k) - 1.

Original entry on oeis.org

1, 1, 1, 1, 4, 1, 1, 8, 8, 1, 1, 13, 25, 13, 1, 1, 19, 59, 59, 19, 1, 1, 26, 119, 194, 119, 26, 1, 1, 34, 216, 524, 524, 216, 34, 1, 1, 43, 363, 1231, 1833, 1231, 363, 43, 1, 1, 53, 575, 2603, 5417, 5417, 2603, 575, 53, 1, 1, 64, 869, 5069, 14069, 19655, 14069, 5069, 869
Offset: 1

Views

Author

Gary W. Adamson, Aug 30 2007

Keywords

Examples

			First few rows of the triangle are:
  1;
  1,  1;
  1,  4,   1;
  1,  8,   8,    1;
  1, 13,  25,   13,     1;
  1, 19,  59,   59,    19,     1;
  1, 26, 119,  194,   119,    26,     1;
  1, 34, 216,  524,   524,   216,    34,    1;
  1, 43, 363, 1231,  1833,  1231,   363,   43,   1;
  1, 53, 575, 2603,  5417,  5417,  2603,  575,  53,  1;
  1, 64, 869, 5069, 14069, 19655, 14069, 5069, 869, 64, 1;
  ...
		

Crossrefs

Column k=2 is A034856.
Row sums are A132790.

Programs

  • Mathematica
    << DiscreteMath`Combinatorica`
    t[n_, m_, 0] := Binomial[n, m];
    t[n_, m_, 1] := Binomial[n, m]*Binomial[n + 1, m]/(m + 1);
    t[n_, m_, 2] := Eulerian[1 + n, m];
    t[n_, m_, q_] := t[n, m, q] = t[n, m, q - 2] + t[n, m, q - 3] - 1;
    Table[Flatten[Table[Table[t[n, m, q], {m, 0, n}], {n, 0, 10}]], {q, 0, 10}]
  • PARI
    T(n,k)={if(k<=n, binomial(n-1, k-1)*(1 + binomial(n, k-1)/k) - 1, 0)}
    for(n=1, 10, for(k=1, n, print1(T(n, k), ", ")); print); \\ Andrew Howroyd, Sep 08 2018

Formula

Equals A007318 + A001263 - A000012 as infinite lower triangular matrices.
A symmetrical triangle recursion: let q=4; t(n,m,0)=Binomial[n,m]; t(n,m,1)=Narayana(n,m); t(n,m,2)=Eulerian(n+1,m); t(n,m,q)=t(n,m,g-2)+t(n,m,q-3).
T(n,k) = binomial(n-1, k-1)*(1 + binomial(n, k-1)/k) - 1. - Andrew Howroyd, Sep 08 2018

Extensions

More terms, Mma program and additional comments from Roger L. Bagula, Apr 20 2010
Edited by N. J. A. Sloane, Apr 21 2010 at the suggestion of R. J. Mathar
Name clarified by Andrew Howroyd, Sep 08 2018

A202241 Array F(n,m) read by antidiagonals: F(0,m)=1, F(n,0) = A130713(n), and column m+1 is recursively defined as the partial sums of column m.

Original entry on oeis.org

1, 2, 1, 1, 3, 1, 0, 4, 4, 1, 0, 4, 8, 5, 1, 0, 4, 12, 13, 6, 1, 0, 4, 16, 25, 19, 7, 1, 0, 4, 20, 41, 44, 26, 8, 1, 0, 4, 24, 61, 85, 70, 34, 9, 1, 0, 4, 28, 85, 146, 155, 104, 43, 10, 1, 0, 4, 32, 113, 231, 301, 259, 147, 53, 11, 1, 0, 4, 36, 145, 344, 532, 560, 406, 200, 64, 12, 1
Offset: 0

Views

Author

Paul Curtz, Dec 16 2011

Keywords

Comments

The array F(n,m), beginning with row n=0, is:
1, 1, 1, 1, 1, 1, 1,
2, 3, 4, 5, 6, 7, 8,
1, 4, 8, 13, 19, 26, 34,
0, 4, 12, 25, 44, 70, 104,
0, 4, 16, 41, 85, 155, 259,
0, 4, 20, 61, 146, 301, 560,
0, 4, 24, 85, 231, 532, 1092.
Columns after A130713, A113311, A008574 have signatures (3,-3,1), (4,-6,4,-1), (5,-10,10,-5,1), (6,-15,20,-15,6,-1) (from A135278(n+3)).
Inserting columns of zeros and pushing the columns down, plus alternating sign switches defines the following triangle T(n,2m) = (-1)^(m/2)*F(n-2m,m):
1,
2 0,
1 0 -1,
0 0 -3 0,
0 0 -4 0 1,
0 0 -4 0 4 0,
0 0 -4 0 8 0 -1
The row sums in the triangle are (-1)^n*A099838(n).
The companion to A201863 is
1
1 0
1 0 0
1 0 -2 0
1 0 -4 0 1
1 0 -6 0 5 0
1 0 -8 0 13 0 -2
1 0 -10 0 25 0 -12 0
1 0 -12 0 41 0 -38 0 4
1 0 -14 0 61 0 -88 0 28 0
1 0 -16 0 85 0 -170 0 104 0 -8
5th column: A001844; 7th column: -A035597=-2*A005900(n+1); 9th column: 4*A006325(n+2); 11th column: -8*(1,8,34,104) (from columns 4,5,6,7 of F(n,m)).
As a triangular array, this is the Riordan array ((1+x)^2, x/(1-x)). - Philippe Deléham, Feb 21 2012

Examples

			Triangle T(n,k) begins:
  1
  2, 1
  1, 3,  1
  0, 4,  4,  1
  0, 4,  8,  5,   1
  0, 4, 12, 13,   6,   1
  0, 4, 16, 25,  19,   7,   1
  0, 4, 20, 41,  44,  26,   8,  1
  0, 4, 24, 61,  85,  70,  34,  9,  1
  0, 4, 28, 85, 146, 155, 104, 43, 10, 1
- _Philippe Deléham_, Feb 21 2012
		

Crossrefs

Cf. A130713 (column 0), A113311 (column 1), A008574 (column 2), A001844 (column 3), A005900 (column 4), A006325 (column 5), A033455 (column 6).
Cf. A267633.

Programs

  • GAP
    Flat(List([0..12],n->List([0..n],k->Binomial(n,n-k)+Binomial(n-1,n-k-1)-Binomial(n-2,n-k-2)-Binomial(n-3,n-k-3)))); # Muniru A Asiru, Mar 22 2018
  • Maple
    A130713 := proc(n)
        if n <= 2 and n >=0 then
            op(n+1,[1,2,1]) ;
        else
            0;
        end if;
    end proc:
    A202241 := proc(n,m)
        option remember;
        if n < 0 then
            0 ;
        elif m = 0 then
            A130713(n);
        else
            procname(n,m-1)+procname(n-1,m) ;
        end if;
    end proc:
    for d from 0 to 12 do
        for m from 0 to d do
            printf("%d,",A202241(d-m,m)) ;
        end do:
    end do: # R. J. Mathar, Dec 22 2011
    C := proc (n, k) if 0 <= k and k <= n then factorial(n)/(factorial(k)*factorial(n-k)) else 0 end if end proc:
    for n from 0 to 10 do
         seq(C(n, n-k) + C(n-1, n-k-1) - C(n-2, n-k-2) - C(n-3, n-k-3), k = 0..n);
    end do; # Peter Bala, Mar 20 2018
  • Mathematica
    rows = 12;
    T[0] = PadRight[{1, 2, 1}, rows];
    T[n_ /; nJean-François Alcover, Jun 29 2019 *)
  • Sage
    def Trow(n): return [binomial(n, n-k) + binomial(n-1, n-k-1) - binomial(n-2, n-k-2) - binomial(n-3, n-k-3) for k in (0..n)]
    for n in (0..9): print(Trow(n)) # Peter Luschny, Mar 21 2018
    

Formula

F(1,m) = m+2.
F(2,m) = A034856(m+1).
F(3,m) = A000297(m-1).
Sum_{m=0..d} F(d-m,m) = A116453(d-3), d >= 3 (antidiagonal sums).
As a triangular array T(n,k), 0 <= k <= n, satisfies: T(n,k) = T(n-1,k) + T(n-1,k-1) with T(0,0) = 1, T(1,0) = 2, T(2,0) = 1, T(3,0) = 0. - Philippe Deléham, Feb 21 2012
Unsigned diagonals of A267633 (beginning with its main diagonal) appear to be the reverse rows of this entry's triangle beginning with the fourth row. - Tom Copeland, Jan 26 2016
T(n,k) = C(n, n-k) + C(n-1, n-k-1) - C(n-2, n-k-2) - C(n-3, n-k-3), where C(n, k) = n!/(k!*(n-k)!) if 0 <= k <= n, otherwise 0. - Peter Bala, Mar 20 2018

A214859 Triangle read by rows, T(n,k) = n^2 - k*(k+1)/2 if k*(k+1)/2 <= n^2.

Original entry on oeis.org

0, 1, 0, 4, 3, 1, 9, 8, 6, 3, 16, 15, 13, 10, 6, 1, 25, 24, 22, 19, 15, 10, 4, 36, 35, 33, 30, 26, 21, 15, 8, 0, 49, 48, 46, 43, 39, 34, 28, 21, 13, 4, 64, 63, 61, 58, 54, 49, 43, 36, 28, 19, 9, 81, 80, 78, 75, 71, 66, 60, 53, 45, 36, 26, 15, 3, 100, 99, 97
Offset: 0

Views

Author

Philippe Deléham, Mar 09 2013

Keywords

Comments

Row lengths are in A214857.

Examples

			Triangle begins:
    0;
    1,   0;
    4,   3,   1;
    9,   8,   6,   3;
   16,  15,  13,  10,   6,   1;
   25,  24,  22,  19,  15,  10,   4;
   36,  35,  33,  30,  26,  21,  15,  8,  0;
   49,  48,  46,  43,  39,  34,  28, 21, 13,  4;
   64,  63,  61,  58,  54,  49,  43, 36, 28, 19,  9;
   81,  80,  78,  75,  71,  66,  60, 53, 45, 36, 26, 15,  3;
  100,  99,  97,  94,  90,  85,  79, 72, 64, 55, 45, 34, 22,  9;
  121, 120, 118, 115, 111, 106, 100, 93, 85, 76, 66, 55, 43, 30, 16, 1;
  ...
		

Crossrefs

Cf. Diagonals: A000217, A034856, A055999,

Programs

  • Mathematica
    Table[s = {}; k = 0; While[tri = k*(k + 1)/2; tri <= n^2, AppendTo[s, n^2 - tri]; k++]; s, {n, 0, 10}] (* T. D. Noe, Mar 11 2013 *)

Formula

T(2*n,n) = A022264(n).
T(n,n) = n*(n-1)/2 = A000217(n-1).

A214928 A209293 as table read layer by layer clockwise.

Original entry on oeis.org

1, 2, 4, 3, 5, 9, 14, 7, 6, 8, 12, 17, 23, 20, 11, 10, 13, 19, 26, 34, 43, 30, 27, 16, 15, 18, 24, 31, 39, 48, 58, 53, 38, 35, 22, 21, 25, 33, 42, 52, 63, 75, 88, 69, 64, 47, 44, 29, 28, 32, 40, 49, 59, 70, 82, 95, 109, 102, 81, 76, 57, 54, 37, 36, 41, 51, 62
Offset: 1

Views

Author

Boris Putievskiy, Mar 11 2013

Keywords

Comments

Permutation of the natural numbers.
a(n) is a pairing function: a function that reversibly maps Z^{+} x Z^{+} onto Z^{+}, where Z^{+} is the set of integer positive numbers.
Layer is pair of sides of square from T(1,n) to T(n,n) and from T(n,n) to T(n,1). The order of the list:
T(1,1)=1;
T(1,2), T(2,2), T(2,1);
. . .
T(1,n), T(2,n), ... T(n-1,n), T(n,n), T(n,n-1), ... T(n,1);
. . .

Examples

			The start of the sequence as table:
  1....2...5...8..13..18...
  3....4...9..12..19..24...
  6....7..14..17..26..31...
  10..11..20..23..34..39...
  15..16..27..30..43..48...
  21..22..35..38..53..58...
  . . .
The start of the sequence as triangle array read by rows:
  1;
  2,4,3;
  5,9,14,7,6;
  8,12,17,23,20,11,10;
  13,19,26,34,43,30,27,16,15;
  18,24,31,39,48,58,53,38,35,22,21;
  . . .
Row number r contains 2*r-1 numbers.
		

Crossrefs

Programs

  • Python
    t=int((math.sqrt(n-1)))+1
    i=min(t,n-(t-1)**2)
    j=min(t,t**2-n+1)
    m1=int((i+j)/2)+int(i/2)*(-1)**(2*i+j-1)
    m2=int((i+j+1)/2)+int(i/2)*(-1)**(2*i+j-2)
    result=(m1+m2-1)*(m1+m2-2)/2+m1

Formula

As table
T(n,k) = n*n/2+4*(floor((k-1)/2)+1)*n+ceiling((k-1)^2/2), n,k > 0.
As linear sequence
a(n)= (m1+m2-1)*(m1+m2-2)/2+m1, where m1=floor((i+j)/2) + floor(i/2)*(-1)^(2*i+j-1), m2=int((i+j+1)/2)+int(i/2)*(-1)^(2*i+j-2), where i=min(t; n-(t-1)^2), j=min(t; t^2-n+1), t=floor(sqrt(n-1))+1.

A214929 A209293 as table read layer by layer - layer clockwise, layer counterclockwise and so on.

Original entry on oeis.org

1, 3, 4, 2, 5, 9, 14, 7, 6, 10, 11, 20, 23, 17, 12, 8, 13, 19, 26, 34, 43, 30, 27, 16, 15, 21, 22, 35, 38, 53, 58, 48, 39, 31, 24, 18, 25, 33, 42, 52, 63, 75, 88, 69, 64, 47, 44, 29, 28, 36, 37, 54, 57, 76, 81, 102, 109, 95, 82, 70, 59, 49, 40, 32, 41, 51, 62
Offset: 1

Views

Author

Boris Putievskiy, Mar 11 2013

Keywords

Comments

Permutation of the natural numbers.
a(n) is a pairing function: a function that reversibly maps Z^{+} x Z^{+} onto Z^{+}, where Z^{+} is the set of integer positive numbers.
Layer is pair of sides of square from T(1,n) to T(n,n) and from T(n,n) to T(n,1). Table read by boustrophedonic ("ox-plowing") method. Let m be natural number. The order of the list:
T(1,1)=1;
T(2,1), T(2,2), T(1,2);
. . .
T(1,2*m+1), T(2,2*m+1), ... T(2*m,2*m+1), T(2*m+1,2*m+1), T(2*m+1,2*m), ... T(2*m+1,1);
T(2*m,1), T(2*m,2), ... T(2*m,2*m-1), T(2*m,2*m), T(2*m-1,2*m), ... T(1,2*m);
. . .
The first row is layer read clockwise, the second row is layer counterclockwise.

Examples

			The start of the sequence as table:
  1....2...5...8..13..18...
  3....4...9..12..19..24...
  6....7..14..17..26..31...
  10..11..20..23..34..39...
  15..16..27..30..43..48...
  21..22..35..38..53..58...
  . . .
The start of the sequence as triangle array read by rows:
  1;
  3,4,2;
  5,9,14,7,6;
  10,11,20,23,17,12,8;
  13,19,26,34,43,30,27,16,15;
  21,22,35,38,53,58,48,39,31,24,18;
  . . .
Row number r contains 2*r-1 numbers.
		

Crossrefs

Cf. A081344, A209293, A209279, A209278, A185180; table T(n,k) contains: in rows A000982, A097063; in columns A000217, A000124, A000096, A152948, A034856, A152950, A055998, A000982, A097063.

Programs

  • Python
    t=int((math.sqrt(n-1)))+1
    i=(t % 2)*min(t,n-(t-1)**2) + ((t+1) % 2)*min(t,t**2-n+1)
    j=(t % 2)*min(t,t**2-n+1) + ((t+1) % 2)*min(t,n-(t-1)**2)
    m1=int((i+j)/2)+int(i/2)*(-1)**(2*i+j-1)
    m2=int((i+j+1)/2)+int(i/2)*(-1)**(2*i+j-2)
    result=(m1+m2-1)*(m1+m2-2)/2+m1

Formula

As table
T(n,k) = n*n/2+4*(floor((k-1)/2)+1)*n+ceiling((k-1)^2/2), n,k > 0.
As linear sequence
a(n)= (m1+m2-1)*(m1+m2-2)/2+m1, where
m1=floor((i+j)/2) + floor(i/2)*(-1)^(2*i+j-1), m2=int((i+j+1)/2)+int(i/2)*(-1)^(2*i+j-2),
where i=(t mod 2)*min(t; n-(t-1)^2) + (t+1 mod 2)*min(t; t^2-n+1), j=(t mod 2)*min(t; t^2-n+1) + (t+1 mod 2)*min(t; n-(t-1)^2), t=floor(sqrt(n-1))+1.

A307213 Divide the natural numbers into sets of successive sizes 3,4,5,6,7,...,, starting with {1,2,3}. Cycle through each set until you reach a prime; if the prime was the n-th element in its set, jump to the n-th element of the next set.

Original entry on oeis.org

1, 2, 5, 9, 10, 11, 16, 17, 23, 30, 31, 39, 40, 41, 50, 51, 52, 43, 53, 64, 65, 66, 67, 79, 92, 93, 94, 95, 96, 97, 111, 112, 113, 128, 129, 130, 131, 147, 148, 149, 166, 167, 185, 186, 187, 169, 170, 171, 172, 173, 192, 193, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 244, 245, 246, 247, 248, 249, 250, 229
Offset: 1

Views

Author

Christopher Cormier, Mar 28 2019

Keywords

Comments

"Cycle" in the definition, means that if no prime is found, go back to the start of the set.
If a set does not contain a prime, the sequence goes into an infinite loop, but it is conjectured that this does not happen since the sets are of increasing length.
The sets (rather intervals) are I_j = [(j^2 + 3*j - 2)/2, j*(j + 5)/2] =[A034856(j), A095998(j)], for j >= 1. For the number of primes in these intervals see A309121. - Wolfdieter Lang, Jul 13 2019

Examples

			The first set is {1,2,3}. We look at 1 then 2. 2 is prime, and it is the second number in the set. The next set is {4,5,6,7}. So we jump to the second element, 5. 5 is also prime, so we jump to the second element of the next set, {8,9,10,11,12}, which is 9, etc. If we reach the end of a set without reaching a prime, we loop back to the first element, which is the only way for a(n) < a(n-1) to happen.
		

Crossrefs

Programs

Extensions

Edited by N. J. A. Sloane, Jul 13 2019

A323220 a(n) = n*(n + 5)*(n + 7)*(n + 10)/24 + 1.

Original entry on oeis.org

1, 23, 64, 131, 232, 376, 573, 834, 1171, 1597, 2126, 2773, 3554, 4486, 5587, 6876, 8373, 10099, 12076, 14327, 16876, 19748, 22969, 26566, 30567, 35001, 39898, 45289, 51206, 57682, 64751, 72448, 80809, 89871, 99672, 110251, 121648, 133904, 147061, 161162, 176251
Offset: 0

Views

Author

Peter Luschny, Jan 25 2019

Keywords

Crossrefs

Cf. A323224 (column 5), A323233 (row 5), A323221 (first diff.), A034856 (second diff.).

Programs

  • Maple
    a := n -> (n^4 + 22*n^3 + 155*n^2 + 350*n + 24)/24:
    seq(a(n), n=0..40);

Formula

a(n) = [x^n] (8*x^4 - 31*x^3 + 41*x^2 - 18*x - 1)/(x - 1)^5.
a(n) = n! [x^n] exp(x)*(x^4 + 28*x^3 + 228*x^2 + 528*x + 24)/24.
a(n) = (1/3)*((2*n + 17)*a(n-3) - (3*n + 25)*a(n-2) + (n + 15)*a(n-1)) for n >= 3.
a(n) = A323224(n, 5).
Previous Showing 71-80 of 98 results. Next