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.

A052905 a(n) = (n^2 + 7*n + 2)/2.

Original entry on oeis.org

1, 5, 10, 16, 23, 31, 40, 50, 61, 73, 86, 100, 115, 131, 148, 166, 185, 205, 226, 248, 271, 295, 320, 346, 373, 401, 430, 460, 491, 523, 556, 590, 625, 661, 698, 736, 775, 815, 856, 898, 941, 985, 1030, 1076, 1123, 1171, 1220, 1270, 1321, 1373, 1426, 1480
Offset: 0

Views

Author

encyclopedia(AT)pommard.inria.fr, Jan 25 2000

Keywords

Comments

Starting 1, 5, 10, 16, 23, ... gives binomial transform of (1, 4, 1, 0, 0, 0, ...). Row sums of triangle A134199. - Gary W. Adamson, Jul 25 2007
If Y_i (i=1,2,3,4,5) are 2-blocks of an n-set X then, for n >= 10, a(n-4) is the number of (n-2)-subsets of X intersecting each Y_i (i=1,2,3,4,5). - Milan Janjic, Nov 09 2007
This sequence is related to A159920 by A159920(n+1) = n*a(n) - Sum_{i=0..n-1} a(i) for n > 0. - Bruno Berselli, Feb 28 2014
Numbers m > 0 such that 8m+41 is a square. - Bruce J. Nicholson, Jul 28 2017

Examples

			Illustration of initial terms:
.                                                                    o
.                                                                  o o
.                                                    o           o o o
.                                                  o o         o o o o
.                                      o         o o o       o o o o o
.                                    o o       o o o o     o o o o o o
.                          o       o o o     o o o o o   o . . . . . o
.                        o o     o o o o   o . . . . o   o . . . . . o
.                o     o o o   o . . . o   o . . . . o   o . . . . . o
.              o o   o . . o   o . . . o   o . . . . o   o . . . . . o
.        o   o . o   o . . o   o . . . o   o . . . . o   o . . . . . o
.      o o   o . o   o . . o   o . . . o   o . . . . o   o . . . . . o
.  o   o o   o o o   o o o o   o o o o o   o o o o o o   o o o o o o o
----------------------------------------------------------------------
.  1     5      10        16          23            31              40
[_Bruno Berselli_, Feb 28 2014]
		

Crossrefs

Programs

  • Maple
    spec := [S,{S=Prod(Sequence(Z),Sequence(Z),Union(Sequence(Z),Z,Z))},unlabeled]: seq(combstruct[count](spec,size=n), n=0..20);
    seq(binomial(n,2)-5, n=4..55); # Zerinvary Lajos, Jan 13 2007
    a:=n->sum((n-4)/2, j=0..n): seq(a(n)-2, n=5..56); # Zerinvary Lajos, Apr 30 2007
    with (combinat):seq((fibonacci(3, n)+n-11)/2, n=3..54); # Zerinvary Lajos, Jun 07 2008
    a:=n->sum(k, k=0..n):seq(a(n)/2+sum(k, k=5..n)/2, n=3..54); # Zerinvary Lajos, Jun 10 2008
  • Mathematica
    i=4;s=1;lst={s};Do[s+=n+i;If[s>=0, AppendTo[lst, s]], {n, 0, 6!, 1}];lst (* Vladimir Joseph Stephan Orlovsky, Oct 30 2008 *)
    k = 3; NestList[(k++; # + k) &, 1, 45] (* Robert G. Wilson v, Feb 03 2011 *)
    Table[(n^2 + 7n + 2)/2, {n, 0, 49}] (* Alonso del Arte, Feb 03 2011 *)
    LinearRecurrence[{3,-3,1},{1,5,10},60] (* Harvey P. Dale, Sep 15 2018 *)
  • PARI
    a(n)=n*(n+7)/2+1 \\ Charles R Greathouse IV, Nov 20 2011

Formula

G.f.: (-2*x+2*x^2-1)/(-1+x)^3.
Recurrence: {a(0)=1, a(1)=5, a(2)=10, -2*a(n)+n^2+7*n+2}.
a(n) = n+a(n-1)+3, with n>0, a(0)=1. - Vincenzo Librandi, Aug 06 2010
E.g.f.: (1/2)*(x^2 + 8*x + 2)*exp(x). - G. C. Greubel, Jul 13 2017
Sum_{n>=0} 1/a(n) = 19/20 + 2*Pi*tan(sqrt(41)*Pi/2)/sqrt(41). - Amiram Eldar, Dec 13 2022

Extensions

More terms from James Sellers, Jun 08 2000
Edited by Charles R Greathouse IV, Jul 25 2010

A073387 Convolution triangle of A002605(n) (generalized (2,2)-Fibonacci), n>=0.

Original entry on oeis.org

1, 2, 1, 6, 4, 1, 16, 16, 6, 1, 44, 56, 30, 8, 1, 120, 188, 128, 48, 10, 1, 328, 608, 504, 240, 70, 12, 1, 896, 1920, 1872, 1080, 400, 96, 14, 1, 2448, 5952, 6672, 4512, 2020, 616, 126, 16, 1, 6688, 18192, 23040, 17856, 9352, 3444, 896, 160, 18, 1
Offset: 0

Views

Author

Wolfdieter Lang, Aug 02 2002

Keywords

Comments

The g.f. for the row polynomials P(n,x) = Sum_{m=0..n} T(n,m)*x^m is 1/(1-(2+x+2*z)*z). See Shapiro et al. reference and comment under A053121 for such convolution triangles.
T(n, k) is the number of words of length n over {0,1,2,3} having k letters 3 and avoiding runs of odd length for the letters 0,1. - Milan Janjic, Jan 14 2017

Examples

			Lower triangular matrix, T(n,k), n >= k >= 0, else 0:
    1;
    2,    1;
    6,    4,    1;
   16,   16,    6,    1;
   44,   56,   30,    8,   1;
  120,  188,  128,   48,  10,   1;
  328,  608,  504,  240,  70,  12,   1;
  896, 1920, 1872, 1080, 400,  96,  14,  1;
		

Crossrefs

Cf. A002605, A007482 (row sums), A053121, A073403, A073404.
Columns: A002605 (k=0), A073388 (k=1), A073389 (k=2), A073390 (k=3), A073391 (k=4), A073392 (k=5), A073393 (k=6), A073394 (k=7), A073397 (k=8), A073398 (k=9).

Programs

  • Magma
    A073387:= func< n,k | (&+[2^(n-k-j)*Binomial(n-j,k)*Binomial(n-k-j,j): j in [0..Floor((n-k)/2)]]) >;
    [A073387(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Oct 03 2022
    
  • Maple
    T := (n,k) -> `if`(n=0,1,2^(n-k)*binomial(n,k)*hypergeom([(k-n)/2, (k-n+1)/2], [-n], -2)): seq(seq(simplify(T(n,k)),k=0..n),n=0..10); # Peter Luschny, Apr 25 2016
  • Mathematica
    T[n_, k_]:=T[n,k]=Sum[2^(n-k-j)*Binomial[n-j,k]*Binomial[n-k-j,j], {j,0,(n-k)/2}];
    Table[T[n,k], {n,0,10}, {k,0,n}]//Flatten (* Jean-François Alcover, Jun 04 2019 *)
  • SageMath
    def A073387(n,k): return sum(2^(n-k-j)*binomial(n-j,k)*binomial(n-k-j,j) for j in range(((n-k+2)//2)))
    flatten([[A073387(n,k) for k in range(n+1)] for n in range(12)]) # G. C. Greubel, Oct 03 2022

Formula

T(n, k) = 2*(p(k-1, n-k)*(n-k+1)*T(n-k+1) + q(k-1, n-k)*(n-k+2)*T(n-k))/(k!*12^k), n >= k >= 1, with T(n) = T(n, k=0) = A002605(n), else 0; p(m, n) = Sum_{j=0..m} A(m, j)*n^(m-j) and q(m, n) = Sum_{j=0..m} B(m, j)*n^(m-j) with the number triangles A(k, m) = A073403(k, m) and B(k, m) = A073404(k, m).
T(n, k) = Sum_{j=0..floor((n-k)/2)} 2^(n-k-j)*binomial(n-j, k)*binomial(n-k-j, j) if n > k, else 0.
T(n, k) = ((n-k+1)*T(n, k-1) + 2*(n+k)*T(n-1, k-1))/(6*k), n >= k >= 1, T(n, 0) = A002605(n+1), else 0.
Sum_{k=0..n} T(n, k) = A007482(n).
G.f. for column m (without leading zeros): 1/(1-2*x*(1+x))^(m+1), m>=0.
T(n,k) = 2^(n-k)*binomial(n,k)*hypergeom([(k-n)/2, (k-n+1)/2], [-n], -2) for n>=1. - Peter Luschny, Apr 25 2016
From G. C. Greubel, Oct 03 2022: (Start)
T(n, n-1) = A005843(n), n >= 1.
T(n, n-2) = 2*A005563(n-1), n >= 2.
T(n, n-3) = 4*A159920(n-1), n >= 2.
Sum_{k=0..n} (-1)^k*T(n, k) = A001045(n+1).
Sum_{k=0..floor(n/2)} T(n-k, k) = A015518(n+1). (End)

A214384 T(n,k)=Number of nXnXn triangular 0..k arrays with no element lying outside the (possibly reversed) range delimited by its sw and se neighbors, and no element equal to its horizontal neighbors.

Original entry on oeis.org

2, 3, 4, 4, 14, 8, 5, 32, 94, 16, 6, 60, 456, 890, 32, 7, 100, 1506, 11048, 11700, 64, 8, 154, 3976, 74260, 445024, 211760, 128, 9, 224, 9044, 350232, 6981540, 29456216, 5247716, 256, 10, 312, 18480, 1305392, 65905056, 1232720402, 3183854216, 177440488, 512
Offset: 1

Views

Author

R. H. Hardin Jul 14 2012

Keywords

Comments

Table starts
..2.....3......4.......5........6.........7..........8...........9..........10
..4....14.....32......60......100.......154........224.........312.........420
..8....94....456....1506.....3976......9044......18480.......34812.......61512
.16...890..11048...74260...350232...1305392....4107248....11363940....28412824
.32.11700.445024.6981540.65905056.444106514.2347567992.10319444960.39220393240

Examples

			Some solutions for n=3 k=3
....1......1......1......3......1......3......1......1......2......1......3
...2.1....1.2....1.2....3.1....1.2....1.3....2.0....1.0....1.3....1.0....3.1
..0.2.0..1.3.1..0.2.1..2.3.0..1.2.3..2.1.3..3.0.3..1.2.0..2.1.3..0.1.0..3.0.2
		

Crossrefs

Row 2 is A159920(n+1)

Formula

Empirical: rows n=1..5 are polynomials of degree n(n+1)/2 in k

A115262 Correlation triangle for n+1.

Original entry on oeis.org

1, 2, 2, 3, 5, 3, 4, 8, 8, 4, 5, 11, 14, 11, 5, 6, 14, 20, 20, 14, 6, 7, 17, 26, 30, 26, 17, 7, 8, 20, 32, 40, 40, 32, 20, 8, 9, 23, 38, 50, 55, 50, 38, 23, 9, 10, 26, 44, 60, 70, 70, 60, 44, 26, 10, 11, 29, 50, 70, 85, 91, 85, 70, 50, 29, 11
Offset: 0

Views

Author

Paul Barry, Jan 18 2006

Keywords

Comments

This sequence (formatted as a square array) gives the counts of all possible squares in an m X n rectangle. For example, 11 = 8 (1 X 1 squares) + 3 (2 X 2 square) in 4 X 2 rectangle. - Philippe Deléham, Nov 26 2009
From Clark Kimberling, Feb 07 2011: (Start)
Also the accumulation array of min{n,k}, when formatted as a rectangle.
This is the accumulation array of the array M=A003783 given by M(n,k)=min{n,k}; see A144112 for the definition of accumulation array.
The accumulation array of A115262 is A185957. (End)
From Clark Kimberling, Dec 22 2011: (Start)
As a square matrix, A115262 is the self-fusion matrix of A000027 (1,2,3,4,...). See A193722 for the definition of fusion and A202673 for characteristic polynomials associated with A115622. (End)

Examples

			Triangle begins
  1;
  2,  2;
  3,  5,  3;
  4,  8,  8,  4;
  5, 11, 14, 11,  5;
  6, 14, 20, 20, 14,  6;
  ...
When formatted as a square matrix:
  1,  2,  3,  4,  5, ...
  2,  5,  8, 11, 14, ...
  3,  8, 14, 20, 26, ...
  4, 11, 20, 30, 40, ...
  5, 14, 26, 40, 55, ...
  ...
		

Crossrefs

For the triangular version: row sums are A001752. Diagonal sums are A097701. T(2n,n) is A000330(n+1).
Diagonals (1,5,...): A000330 (square pyramidal numbers),
diagonals (2,8,...): A007290,
diagonals (3,11,...): A051925,
diagonals (4,14,...): A159920,
antidiagonal sums: A001752.

Programs

  • Mathematica
    U = NestList[Most[Prepend[#, 0]] &, #, Length[#] - 1] &[Table[k, {k, 1, 12}]];
    L = Transpose[U]; M = L.U; TableForm[M]
    m[i_, j_] := M[[i]][[j]];
    Flatten[Table[m[i, n + 1 - i], {n, 1, 12}, {i, 1, n}]]
    (* Clark Kimberling, Dec 22 2011 *)

Formula

Let f(m,n) = m*(m-1)*(3*n-m-1)/6. This array is (with a different offset) the infinite square array read by antidiagonals U(m,n) = f(n,m) if m < n, U(m,n) = f(m,n) if m <= n. See A271916. - N. J. A. Sloane, Apr 26 2016
G.f.: 1/((1-x)^2*(1-x*y)^2*(1-x^2*y)).
Number triangle T(n, k) = Sum_{j=0..n} [j<=k]*(k-j+1)[j<=n-k]*(n-k-j+1).
T(2n,n) - T(2n,n+1) = n+1.

A097900 Number of runs of length 1 in all permutations of [n]. (The permutation 3574162 has two runs of length 1: 357/4/16/2.)

Original entry on oeis.org

1, 2, 7, 32, 180, 1200, 9240, 80640, 786240, 8467200, 99792000, 1277337600, 17643225600, 261534873600, 4140968832000, 69742632960000, 1244905998336000, 23475370254336000, 466306218233856000, 9731608032706560000
Offset: 1

Views

Author

Emeric Deutsch and Ira M. Gessel, Sep 03 2004

Keywords

Comments

a(n) is the number of corners in the set of tree-like tableaux of size n (see Gao et al. link). - Michel Marcus, Nov 18 2015

Examples

			a(3) = 7 because there are 7 runs of length 1 in the permutations 123, 13(2), (2)13, 23(1), (3)12, (3)(2)(1) (shown between parentheses).
		

Crossrefs

Cf. A159920.

Programs

  • Magma
    [1] cat [Factorial(n)*(n+4)/6: n in [2..25]]; // Vincenzo Librandi, Nov 18 2015
    
  • Maple
    seq(ceil(n!*(n+4)/6),n=1..23);
  • Mathematica
    Join[{1}, Table[n! (n + 4)/6, {n, 2, 20}]] (* Vincenzo Librandi, Nov 18 2015 *)
    Rest[With[{nmax = 50}, CoefficientList[Series[x*(6 - 6*x + x^2)/(6*(1 - x)^2), {x, 0, nmax}], x]*Range[0, nmax]!]] (* G. C. Greubel, Dec 20 2017 *)
  • PARI
    my(x='x+O('x^30)); Vec(serlaplace(x*(6-6*x+x^2)/(6*(1-x)^2))) \\ G. C. Greubel, Dec 20 2017
    
  • PARI
    a(n) = if(n==1, 1, n!*(n+4)/6); \\ Altug Alkan, Dec 21 2017

Formula

a(n) = n!*(n+4)/6 for n >= 2.
E.g.f.: x*(6-6*x+x^2)/(6*(1-x)^2).
a(n) = (A159920(n)*(n-2)!)/ 2 for n >= 2. - Cullen M. Vaney, Jul 14 2025

A159919 A square array of numbers, read by antidiagonals, called Sundaram's sieve.

Original entry on oeis.org

4, 7, 7, 10, 12, 10, 13, 17, 17, 13, 16, 22, 24, 22, 16, 19, 27, 31, 31, 27, 19, 22, 32, 38, 40, 38, 32, 22, 25, 37, 45, 49, 49, 45, 37, 25, 28, 42, 52, 58, 60, 58, 52, 42, 28, 31, 47, 59, 67, 71, 71, 67, 59, 47, 31, 34, 52, 66, 76, 82, 84, 82, 76, 66, 52, 34
Offset: 1

Views

Author

Russell Walsmith, Apr 25 2009

Keywords

Comments

The sieve of Sundaram contains every number n > 3 for which the number 2*n + 1 is composite. For any n absent from this array, 2*n + 1 is a prime.
T[j, k] is the number of edges of the Cartesian product of the paths with j and k edges. - Christian Barrientos, May 14 2025

Examples

			For the term in row 3 and column 3, we have T[3, 3] = 2*3*3 + 3 + 3 = 24. Thus, 2*T[3,3] + 1 = 49 is composite.
From _Petros Hadjicostas_, Jun 19 2019: (Start)
The square array begins as follows:
   4,  7, 10, 13, 16, 19, ...
   7, 12, 17, 22, 27, ...
  10, 17, 24, 31, ...
  13, 22, 31, ...
  16, 27, ...
  19, ...
  ...
(End)
		

References

  • Ross Honsberger, Ingenuity in Mathematics, New Mathematical Library #23, Mathematical Association of America, 1970 (ISBN 0394709233); p. 75.
  • C. Stanley Ogilvy and John T. Anderson, Excursions in Number Theory, Oxford University Press, Inc., New York, 1966.

Crossrefs

Programs

  • Mathematica
    A159919list[dmax_]:=Table[2k(j-k+1)+j+1,{j,dmax},{k,j}];A159919list[10] (* Generates 10 antidiagonals *) (* Paolo Xausa, Jul 26 2023 *)

Formula

For the term in row j and column k, we have T[j, k] = 2*j*k + j + k.

Extensions

More terms from Philippe Deléham, May 11 2009
Showing 1-6 of 6 results.