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

A158405 Triangle T(n,m) = 1+2*m of odd numbers read along rows, 0<=m

Original entry on oeis.org

1, 1, 3, 1, 3, 5, 1, 3, 5, 7, 1, 3, 5, 7, 9, 1, 3, 5, 7, 9, 11, 1, 3, 5, 7, 9, 11, 13, 1, 3, 5, 7, 9, 11, 13, 15, 1, 3, 5, 7, 9, 11, 13, 15, 17, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23
Offset: 1

Views

Author

Paul Curtz, Mar 18 2009

Keywords

Comments

Row sums are n^2 = A000290(n).
The triangle sums, see A180662 for their definitions, link this triangle of odd numbers with seventeen different sequences, see the crossrefs. The knight sums Kn14 - Kn110 have been added. - Johannes W. Meijer, Sep 22 2010
A208057 is the eigentriangle of A158405 such that as infinite lower triangular matrices, A158405 * A208057 shifts the latter, deleting the right border of 1's. - Gary W. Adamson, Feb 22 2012
T(n,k) = A099375(n-1,n-k), 1<=k<=n. [Reinhard Zumkeller, Mar 31 2012]

Examples

			The triangle contains the first n odd numbers in row n:
  1;
  1,3;
  1,3,5;
  1,3,5,7;
From _Seiichi Manyama_, Dec 02 2017: (Start)
    |       a(n)        |                               | A000290(n)
   -----------------------------------------------------------------
   0|                                                      (=  0)
   1|                 1 = 1/3 * ( 3)                       (=  1)
   2|             1 + 3 = 1/3 * ( 5 +  7)                  (=  4)
   3|         1 + 3 + 5 = 1/3 * ( 7 +  9 + 11)             (=  9)
   4|     1 + 3 + 5 + 7 = 1/3 * ( 9 + 11 + 13 + 15)        (= 16)
   5| 1 + 3 + 5 + 7 + 9 = 1/3 * (11 + 13 + 15 + 17 + 19)   (= 25)
(End)
		

Crossrefs

Triangle sums (see the comments): A000290 (Row1; Kn11 & Kn4 & Ca1 & Ca4 & Gi1 & Gi4); A000027 (Row2); A005563 (Kn12); A028347 (Kn13); A028560 (Kn14); A028566 (Kn15); A098603 (Kn16); A098847 (Kn17); A098848 (Kn18); A098849 (Kn19); A098850 (Kn110); A000217 (Kn21. Kn22, Kn23, Fi2, Ze2); A000384 (Kn3, Fi1, Ze3); A000212 (Ca2 & Ze4); A000567 (Ca3, Ze1); A011848 (Gi2); A001107 (Gi3). - Johannes W. Meijer, Sep 22 2010

Programs

  • Haskell
    a158405 n k = a158405_row n !! (k-1)
    a158405_row n = a158405_tabl !! (n-1)
    a158405_tabl = map reverse a099375_tabl
    -- Reinhard Zumkeller, Mar 31 2012
    
  • Mathematica
    Table[2 Range[1, n] - 1, {n, 12}] // Flatten (* Michael De Vlieger, Oct 01 2015 *)
  • PARI
    a(n) = 2*(n-floor((-1+sqrt(8*n-7))/2)*(floor((-1+sqrt(8*n-7))/2)+1)/2)-1;
    vector(100, n, a(n)) \\ Altug Alkan, Oct 01 2015

Formula

a(n) = 2*i-1, where i = n-t(t+1)/2, t = floor((-1+sqrt(8*n-7))/2). - Boris Putievskiy, Feb 03 2013
a(n) = 2*A002262(n-1) + 1. - Eric Werley, Sep 30 2015

Extensions

Edited by R. J. Mathar, Oct 06 2009

A052649 Expansion of e.g.f. (2+x-x^2)/(1-x)^2.

Original entry on oeis.org

2, 5, 14, 54, 264, 1560, 10800, 85680, 766080, 7620480, 83462400, 997920000, 12933043200, 180583603200, 2702527027200, 43153254144000, 732297646080000, 13160434839552000, 249692574523392000, 4987449116762112000, 104614786351595520000, 2299092397726924800000
Offset: 0

Views

Author

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

Keywords

Comments

a(1) is 5 and gives the row number in the table of 0-origin permutations of order 3 in which the first 3 items are reversed. Row 5 of this table is 2 1 0. a(2) is 14 and gives the row number in the table of 0-origin permutations of order 4 in which the first three items are reversed. Row 14 of this table is 2 1 0 3.... a(6) is 10800 and gives the row number in the table of 0-origin permutations of order 8 in which the first 3 items are reversed. Row 10800 of this table is 2 1 0 3 4 5 6 7. Et cetera. - Eugene McDonnell (eemcd(AT)mac.com), Dec 03 2004
In factorial base representation (A007623) the terms of this sequence are written as: 10, 21, 210, 2100, 21000, 210000, ... From a(1) = 5 = "21" onward each term begins always with "21", which is then followed by n-1 zeros. - Antti Karttunen, Sep 24 2016

Crossrefs

Row 4 of A276955 (from a(1)=5 onward).

Programs

  • Maple
    spec := [S,{S=Prod(Sequence(Z),Union(Z,Sequence(Z),Sequence(Z)))},labeled]: seq(combstruct[count](spec,size=n), n=0..20);
  • Mathematica
    f[n_] := (3 + 2 n) n!; f[0] = 2; Array[f, 19, 0]
    a[n_] := a[n] = a[n - 1]*n (2 n + 3)/(2 n + 1); a[0] = 2; a[1] = 5; Array[ a, 19, 0] (* Robert G. Wilson v *)
    With[{nn=20},CoefficientList[Series[(2+x-x^2)/(1-x)^2,{x,0,nn}],x] Range[ 0,nn]!] (* Harvey P. Dale, Nov 09 2017 *)
  • PARI
    a(n)=if(n<=1,[2,5][n+1], a(n-1)*(n*(2*n+3))/(2*n+1) );
    for(n=0,11,print1(a(n),", "))
    
  • Scheme
    (define (A052649 n) (if (zero? n) 2 (+ (A000142 n) (* 2 (A000142 (+ 1 n)))))) ;; Antti Karttunen, Sep 24 2016

Formula

a(n) = (3+2*n)*n!.
E.g.f.: -(-x+x^2-2)/(-1+x)^2.
Recurrence: a(0)=2, a(1)=5, (-7*n-5-2*n^2)*a(n)+(3+2*n)*a(n+1)=0 for n>=1.
a(n) = A129326(n), n>1. - R. J. Mathar, Jun 14 2008
a(n) = (n+1)*a(n-1) - 2*A001048(n-1). - Gary Detlefs, Dec 16 2009
a(0) = 2; for n >= 1, a(n) = 2*(n+1)! + n! - Antti Karttunen, Sep 24 2016
From Amiram Eldar, Feb 17 2024: (Start)
Sum_{n>=0} 1/a(n) = 1/6 + e/2 - erfi(1)*sqrt(Pi)/4, where erfi is the imaginary error function.
Sum_{n>=0} (-1)^n/a(n) = 1/6 - 1/(2*e) + erf(1)*sqrt(Pi)/4, where erf is the error function. (End)

A130679 a(n) = (n+1+(-1)^n)*A024167(n), related to alternating harmonic sums.

Original entry on oeis.org

1, 4, 15, 84, 470, 3552, 26796, 255840, 2435184, 28114560, 323405280, 4380445440, 59105255040, 918796677120, 14228252640000, 249644312064000, 4363865549568000, 85297521899520000, 1661265370695168000
Offset: 1

Views

Author

Paul Curtz, Jun 29 2007

Keywords

Comments

Inspired by a formula in the reference, the study of the singular points of planar differential systems leads to 3 two-dimensional polynomial families, one ordinary (degenerate case, considered in one dimension, see A129326) and two odd (the second, considered in one dimension, see A129587).
The first is in one dimension P(2n-1,x)=(n+1+x^n)*sum_{i=0..n-1} x^i/(i+1), n>=1.
The table of coefficients of P() with 2n coefficients per row starts:
2, 1;
3, 3/2, 1, 1/2;
4, 2, 4/3, 1, 1/2, 1/3;.. .
Rows multiplied by n!, the table becomes Q():
2, 1;
6, 3, 2, 1;
24, 12, 8, 6, 3, 2;
120, 60, 40, 30, 24, 12, 8, 6;
720, 360, 240, 180, 144,...
The sequence gives the alternating row sums of this table Q, positive sign for coefficients in front of even and negative sign for coefficients in front of odd powers of x.
The row sums of Q are (n+2)*A000254(n)= 3, 12, 55, 300...
Adding the alternating and ordinary row sums yields the sequence 4, 16, 70, 384....
The sequence of sums of antidiagonals in the Q table starts 2, 6+1=7, 24+3=27, 120+12+1=134.

Examples

			a(1) = 2-1.
a(2) = 6-3+2-1.
a(3) = 24-12+8-6+3-2.
		

Programs

  • Mathematica
    a[n_] := (1/2)*(n + (-1)^n + 1)*n!*((-1)^n*(HarmonicNumber[(n-1)/2] - HarmonicNumber[n/2]) + Log[4]); Table[a[n] // FullSimplify, {n, 1, 19}] (* Jean-François Alcover, Oct 03 2012 *)

Formula

a(n) = n!*(n+1+(-1)^n)*A058313(n)/A058312(n). - R. J. Mathar, Jul 28 2008

Extensions

Edited and extended by R. J. Mathar, Jul 28 2008

A057058 Let R(i,j) be the rectangle with antidiagonals 1; 2,3; 4,5,6; ...; each k is an R(i(k),j(k)) and a(n)=i(A057027(n)).

Original entry on oeis.org

1, 1, 2, 1, 3, 2, 1, 4, 2, 3, 1, 5, 2, 4, 3, 1, 6, 2, 5, 3, 4, 1, 7, 2, 6, 3, 5, 4, 1, 8, 2, 7, 3, 6, 4, 5, 1, 9, 2, 8, 3, 7, 4, 6, 5, 1, 10, 2, 9, 3, 8, 4, 7, 5, 6, 1, 11, 2, 10, 3, 9, 4, 8, 5, 7, 6, 1, 12, 2, 11, 3, 10, 4, 9, 5, 8, 6, 7, 1, 13, 2, 12, 3, 11, 4
Offset: 1

Views

Author

Clark Kimberling, Jul 30 2000

Keywords

Comments

Since A057027 is a permutation of the natural numbers, every natural number occurs infinitely many times in this sequence.
Consider the triangle TN := 1; 1, -2; 1, -3, 2; 1, -4, 2, -3; ... Antidiagonal sums give A129819(n+2). TN arises in studying the equation (E) dy/dx=Q(n,x,y)/P(n,x,y) involving saddle-points quantities, P and Q are bidimensional polynomials n=2,3,4.. . (E) leads also for instance to the one-dimension polynomials in A129326, A129587, A130679. - Paul Curtz, Aug 16 2008
First inverse function (numbers of rows) for pairing function A194982. - Boris Putievskiy, Jan 10 2013

Crossrefs

Formula

From Boris Putievskiy, Jan 10 2013: (Start)
a(n) = -((A002260(n)+1)/2)*((-1)^A002260(n)-1)/2+(A004736(n)+A002260(n)/2)*((-1)^A002260(n)+1)/2.
a(n) = -((i+1)/2)*((-1)^i-1)/2+(j+i/2)*((-1)^i+1)/2, where i = n-t*(t+1)/2, j = (t*t+3*t+4)/2-n, t = floor((-1+sqrt(8*n-7))/2). (End)

A129587 a(n) = n!*((1 + 3n + n^2)*H(n) - n), where H(n) is the n-th harmonic number.

Original entry on oeis.org

4, 29, 191, 1354, 10634, 92700, 892548, 9430416, 108630864, 1356063840, 18245210400, 263298142080, 4057825368960, 66527793642240, 1156298057913600, 21239191491840000, 411134620109875200, 8365635747476582400
Offset: 1

Views

Author

Paul Curtz, May 30 2007

Keywords

Comments

The numbers can be generated from row sums from coefficients of the polynomials Sum_{i=1..n} ((n+1)^2 - 1 + (n+1-i)*z^n)*z^(i-1)/i.
The coefficients written as an array of 2n numbers in row n for the first 5 polynomials are
3 1 <- 3+z
8 4 2 1/2 <- 8+4z+2z^2+z^3/2
15 15/2 5 3 1 1/3
24 12 8 6 4 3/2 2/3 1/4
35 35/2 35/3 35/4 7 5 2 1 1/2 1/5
These rows multiplied by n! are
3 1
16 8 4 1
90 45 30 18 6 2
576 288 192 144 96 36 16 6
4200 2100 1400 1050 840 600 240 120 60 24
where the first column is A129326. The latter row sums define a(n), which are n! times the polynomials evaluated at z=1.

Crossrefs

Programs

  • Mathematica
    Array[#!*((1+3#+#^2)*HarmonicNumber[#]-#)&,18] (* James C. McMahon, Jan 31 2025 *)

Extensions

Edited and corrected by R. J. Mathar, Jul 27 2008

A166492 Table of numerators of A120070(n,m)/A002260(n,m), 1 <= m < n.

Original entry on oeis.org

3, 8, 5, 15, 6, 7, 24, 21, 16, 9, 35, 16, 9, 5, 11, 48, 45, 40, 33, 24, 13, 63, 30, 55, 12, 39, 14, 15, 80, 77, 24, 65, 56, 15, 32, 17, 99, 48, 91, 21, 15, 32, 51, 9, 19, 120, 117, 112, 105, 96, 85, 72, 57, 40, 21, 143, 70, 45, 32, 119, 18, 95, 10, 7, 22, 23, 168, 165, 160, 153, 144
Offset: 2

Views

Author

Paul Curtz, Oct 15 2009

Keywords

Comments

Numerators of the fractions (n+m)*(n-m)/m.
The numerical values are between A120070(n,m) and A120072(n,m), see A164561.
If we "flatten" the table (enumerate the sequence starting at 1 instead of using the double index), the positions where a common factor is removed from the numerator A120070 and denominator A002260 are at 5, 12, 13, etc., as given by A076537.

Crossrefs

Cf. A129326.

Programs

Extensions

Edited and extended by R. J. Mathar, Oct 21 2009

A165969 Triangle read by rows: T(n,m) = A094310(n,m)*A120070(n+1,m), 1 <= m <= n.

Original entry on oeis.org

3, 16, 5, 90, 36, 14, 576, 252, 128, 54, 4200, 1920, 1080, 600, 264, 34560, 16200, 9600, 5940, 3456, 1560, 317520, 151200, 92400, 60480, 39312, 23520, 10800, 3225600, 1552320, 967680, 655200, 451584, 302400, 184320, 85680, 35925120, 17418240, 11007360, 7620480, 5443200, 3870720, 2643840, 1632960, 766080
Offset: 1

Views

Author

Paul Curtz, Oct 02 2009

Keywords

Comments

The second array mentioned in the comment in A129326.

Examples

			Triangle begins
        3;
       16,       5;
       90,      36,     14;
      576,     252,    128,     54;
     4200,    1920,   1080,    600,    264;
    34560,   16200,   9600,   5940,   3456,   1560;
   317520,  151200,  92400,  60480,  39312,  23520,  10800;
  3225600, 1552320, 967680, 655200, 451584, 302400, 184320, 85680;
		

Crossrefs

Programs

A196532 a(n) = (n+1)!*(H(n)+H(n+1)), where H(n) = Sum_{k=1..n} 1/k is the n-th harmonic number.

Original entry on oeis.org

1, 5, 20, 94, 524, 3408, 25416, 214128, 2012832, 20894400, 237458880, 2932968960, 39126516480, 560704273920, 8591147712000, 140160890419200, 2425888391270400, 44398288688947200, 856727919929548800
Offset: 0

Views

Author

Gary Detlefs, Oct 03 2011

Keywords

Comments

Denominator of a(n)/n! is listed in A096620.
a(n) - (n+1)*a(n-1) = A129326(n), n > 0. - Gary Detlefs, Oct 04 2011

Programs

  • Maple
    H:= n-> sum(1/k,k=1..n):seq((n+1)!*(H(n+1)+H(n)), n=0..20);
    # Alternative:
    f:= gfun:-rectoproc({a(n+3) = (3*n+8)*a(n+2)-(3*n+7)*(n+2)*a(n+1)+(n+1)*(n+2)^2*a(n),a(0)=1,a(1)=5,a(2)=20},a(n),remember):
    map(f, [$0..50]); # Robert Israel, Mar 28 2018
  • Mathematica
    Table[(n+1)!Total[HarmonicNumber[{n,n+1}]],{n,0,20}] (* Harvey P. Dale, Jul 17 2013 *)

Formula

From Robert Israel, Mar 28 2018: (Start)
E.g.f.: (1+x - 2*log(1-x))/(1-x)^2.
a(n+3) = (3*n+8)*a(n+2) - (3*n+7)*(n+2)*a(n+1) + (n+1)*(n+2)^2*a(n). (End)
Showing 1-8 of 8 results.