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

A058798 a(n) = n*a(n-1) - a(n-2) with a(0) = 0, a(1) = 1.

Original entry on oeis.org

0, 1, 2, 5, 18, 85, 492, 3359, 26380, 234061, 2314230, 25222469, 300355398, 3879397705, 54011212472, 806288789375, 12846609417528, 217586071308601, 3903702674137290, 73952764737299909, 1475151592071860890
Offset: 0

Views

Author

Christian G. Bower, Dec 02 2000

Keywords

Comments

Note that a(n) = (a(n-1) + a(n+1))/(n+1). - T. D. Noe, Oct 12 2012; corrected by Gary Detlefs, Oct 26 2018
a(n) = log_2(A073888(n)) = log_3(A073889(n)).
a(n) equals minus the determinant of M(n+2) where M(n) is the n X n symmetric tridiagonal matrix with entries 1 just above and below its diagonal and diagonal entries 0, 1, 2, .., n-1. Example: M(4)=matrix([[0, 1, 0, 0], [1, 1, 1, 0], [0, 1, 2, 1], [0, 0, 1, 3]]). - Roland Bacher, Jun 19 2001
a(n) = A221913(n,-1), n>=1, is the numerator sequence of the n-th approximation of the continued fraction -(0 + K_{k>=1} (-1/k)) = 1/(1-1/(2-1/(3-1/(4-... The corresponding denominator sequence is A058797(n). - Wolfdieter Lang, Mar 08 2013
The recurrence equation a(n+1) = (A*n + B)*a(n) + C*a(n-1) with the initial conditions a(0) = 0, a(1) = 1 has the solution a(n) = Sum_{k = 0..floor((n-1)/2)} C^k*binomial(n-k-1,k)*( Product_{j = 1..n-2k-1} (k+j)*A + B ). This is the case A = 1, B = 1, C = -1. - Peter Bala, Aug 01 2013

Examples

			Continued fraction approximation 1/(1-1/(2-1/(3-1/4))) = 18/7 = a(4)/A058797(4). - _Wolfdieter Lang_, Mar 08 2013
		

Crossrefs

Column 1 of A007754.
Cf. A073888, A073889, A221913 (alternating row sums).

Programs

  • GAP
    a:=[1,2];; for n in [3..25] do a[n]:=n*a[n-1]-a[n-2]; od; Concatenation([0], a); # Muniru A Asiru, Oct 26 2018
    
  • Magma
    [0] cat [n le 2 select n else n*Self(n-1)-Self(n-2): n in [1..30]]; // Vincenzo Librandi, Sep 22 2016
    
  • Mathematica
    t = {0, 1}; Do[AppendTo[t, n*t[[-1]] - t[[-2]]], {n, 2, 25}]; t (* T. D. Noe, Oct 12 2012 *)
    nxt[{n_,a_,b_}]:={n+1,b,b*(n+1)-a}; Transpose[NestList[nxt,{1,0,1},20]] [[2]] (* Harvey P. Dale, Nov 30 2015 *)
  • PARI
    m=30; v=concat([1,2], vector(m-2)); for(n=3, m, v[n] = n*v[n-1]-v[n-2]); concat(0, v) \\ G. C. Greubel, Nov 24 2018
  • Sage
    def A058798(n):
        if n < 3: return n
        return hypergeometric([1/2-n/2, 1-n/2],[2, 1-n, -n], -4)*factorial(n)
    [simplify(A058798(n)) for n in (0..20)] # Peter Luschny, Sep 10 2014
    

Formula

a(n) = Sum_{k = 0..floor((n-1)/2)} (-1)^k*binomial(n-k-1,k)*(n-k)!/(k+1)!. - Peter Bala, Aug 01 2013
a(n) = A058797(n+1) + A058799(n-1). - Henry Bottomley, Feb 28 2001
a(n) = Pi*(BesselY(1, 2)*BesselJ(n+1, 2) - BesselJ(1,2)* BesselY(n+1,2)). See the Abramowitz-Stegun reference given under A103921, p. 361 eq. 9.1.27 (first line with Y, J and z=2) and p. 360, eq. 9.1.16 (Wronskian). - Wolfdieter Lang, Mar 05 2013
Limit_{n->oo} a(n)/n! = BesselJ(1,2) = 0.576724807756873... See a comment on asymptotics under A084950.
a(n) = n!*hypergeometric([1/2-n/2, 1-n/2], [2, 1-n, -n], -4) for n >= 2. - Peter Luschny, Sep 10 2014

Extensions

New description from Amarnath Murthy, Aug 17 2002

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

Original entry on oeis.org

1, 1, 1, 1, -1, 1, 1, -2, -2, 1, 1, -3, 5, -3, 1, 1, -4, 3, 3, -4, 1, 1, -5, 12, -17, 12, -5, 1, 1, -6, 12, -5, -5, 12, -6, 1, 1, -7, 23, -50, 47, -50, 23, -7, 1, 1, -8, 25, -27, 64, 64, -27, 25, -8, 1
Offset: 1

Views

Author

Roger L. Bagula and Gary W. Adamson, Oct 05 2008

Keywords

Examples

			Triangle begins as:
  1;
  1,  1;
  1, -1,  1;
  1, -2, -2,   1;
  1, -3,  5,  -3,  1;
  1, -4,  3,   3, -4,   1;
  1, -5, 12, -17, 12,  -5,   1;
  1, -6, 12,  -5, -5,  12,  -6,  1;
  1, -7, 23, -50, 47, -50,  23, -7,  1;
  1, -8, 25, -27, 64,  64, -27, 25, -8, 1;
		

Crossrefs

Programs

  • Mathematica
    T[n_, k_, m_, j_]:= T[n,k,m,j]= If[k==1 || k==n, 1, (m*(n-k)+1)*T[n-1,k-1,m,j] + (m*(k-1)+1)*T[n-1,k,m,j] + j*T[n-2,k-1,m,j]];
    Table[T[n,k,-1,-1], {n,15}, {k,n}]//Flatten (* modified by G. C. Greubel, Mar 04 2022 *)
  • Sage
    def T(n,k,m,j):
        if (k==1 or k==n): return 1
        else: return (m*(n-k)+1)*T(n-1,k-1,m,j) + (m*(k-1)+1)*T(n-1,k,m,j) + j*T(n-2,k-1,m,j)
    def A144444(n,k): return T(n,k,-1,-1)
    flatten([[A144444(n,k) for k in (1..n)] for n in (1..15)]) # G. C. Greubel, Mar 04 2022

Formula

T(n, k) = (1-n+k)*T(n-1, k-1) + (2-k)*T(n-1, k) - T(n-2, k-1) with T(n, 1) = T(n, n) = 1.
Sum_{k=1..n} T(n, k) = s(n), where s(n) = -(n-4)*s(n-1) - s(n-2), s(1) = 1, s(2) = 2.
From G. C. Greubel, Mar 04 2022: (Start)
Sum_{k=1..n} T(n, k) = 2*[n<3] + (-1)^(n-1)*A075374(n-2).
T(n, n-k) = T(n, k).
T(n, 2) = [n=2] - n + 2.
T(n, 3) = (1/2)*((n^2 -5*n +5) -5*(-1)^n) - [n=3]. (End)

A159927 Triangle read by rows: a(1,1) = 1. a(m,m) = sum of all terms in rows 1 through m-1. a(m,n) = a(m-1,n) + (sum of all terms in rows 1 through m-1), for n < m.

Original entry on oeis.org

1, 2, 1, 6, 5, 4, 25, 24, 23, 19, 135, 134, 133, 129, 110, 886, 885, 884, 880, 861, 751, 6784, 6783, 6782, 6778, 6759, 6649, 5898, 59115, 59114, 59113, 59109, 59090, 58980, 58229, 52331, 576527, 576526, 576525, 576521, 576502, 576392, 575641, 569743
Offset: 1

Views

Author

Leroy Quet, Apr 26 2009

Keywords

Comments

A159928(m) = -A075374(m+4)+A075374(m+3), for m >= 1. -A075374(m+4) = the sum of all terms of triangle A159927 in rows 1 through m. A159928 contains the row-sums of triangle A159927.

Examples

			The triangle starts like this:
   1;
   2,  1;
   6,  5,  4;
  25, 24, 23, 19;
The sum of all of these terms is 110. Adding 110 to each term of the 4th row, we get: 25+110=135, 24+110=134, 23+110=133, 19+110=129, 0+110=110. So row 5 is 135,134,133,129,110.
		

Crossrefs

Programs

  • Maple
    A159927 := proc(n,m) option remember; local rs; if n = 1 then 1; else rs := add(add( procname(i,j),j=1..i),i=1..n-1) ; if n = m then rs; else procname(n-1,m)+rs; fi; fi; end: for n from 1 to 10 do for m from 1 to n do printf("%d,",A159927(n,m)) ; od: od: # R. J. Mathar, Apr 28 2009
  • Mathematica
    NestList[{#1 + #2, #2} & @@ {Join[#1, {0}], Total[#1] + #2} & @@ # &, {{1}, 0}, 8][[All, 1]] // Flatten (* Michael De Vlieger, Aug 30 2017 *)

Extensions

More terms from R. J. Mathar, Apr 28 2009

A159928 a(n) is the sum of the terms of row n of triangle A159927.

Original entry on oeis.org

1, 3, 15, 91, 641, 5147, 46433, 465081, 5121789, 61513799, 800196799, 11208394387, 168193068805, 2691956450679, 45775335405729, 824136306116113, 15661462041469817, 313277888390065739, 6579708440058166031
Offset: 1

Views

Author

Leroy Quet, Apr 26 2009

Keywords

Comments

a(n) = -A075374(n+4) + A075374(n+3), for n >= 1; -A075374(n+4) = the sum of all terms of triangle A159927 in rows 1 through n.

Crossrefs

Programs

  • Magma
    S:=[1]; T:=S; s:=1; for m in [2..19] do T:=[ n lt m select T[n]+s else s: n in [1..m] ]; t:=&+T; s+:=t; Append(~S, t); end for; S; // Klaus Brockhaus, Jun 02 2009

Extensions

More terms from Klaus Brockhaus, Jun 02 2009
Showing 1-4 of 4 results.