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.

A093985 a(1) = 1, a(2) = 2; a(n+1) = 2n*a(n) - a(n-1). Symmetrically, a(n) = (a(n-1) + a(n+1))/((n-1) + (n+1)).

Original entry on oeis.org

1, 2, 7, 40, 313, 3090, 36767, 511648, 8149601, 146181170, 2915473799, 63994242408, 1532946343993, 39792610701410, 1112660153295487, 33340011988163200, 1065767723467926913, 36202762585921351842, 1302233685369700739399, 49448677281462706745320
Offset: 1

Views

Author

Amarnath Murthy, May 22 2004

Keywords

Examples

			a(3)=7 because 2*2*a(2) - a(1) = 7.
		

Crossrefs

Programs

  • Magma
    I:=[1,2]; [n le 2 select I[n] else 2*(n-1)*Self(n-1)-Self(n-2): n in [1..30]]; // Vincenzo Librandi, Aug 15 2017
  • Maple
    a[1]:=1: a[2]:=2: for n from 2 to 21 do a[n+1]:=2*n*a[n]-a[n-1] od: seq(a[n],n=1..21); # Emeric Deutsch, Jul 31 2005
  • Mathematica
    nxt[{n_,a_,b_}]:={n+1,b,2*n*b-a}; NestList[nxt,{2,1,2},20][[All,2]] (* Harvey P. Dale, Jan 09 2021 *)
    a[n_] := (Pi/2)*(BesselY[0, 1]*BesselJ[n, 1.] - BesselJ[0, 1]*BesselY[n, 1.]);
    Table[Round[a[n]], {n, 1, 20}] (* Hugo Pfoertner, Feb 12 2024 *)

Formula

a(n) = Sum_{k = 0..floor((n-1)/2)} (-1)^k*2^(n-2*k-1)*(n-2*k-1)!*(binomial(n-k-1,k))^2. Cf. A058798. - Peter Bala, Aug 01 2013
a(n) = (Pi/2)*(Y[0, 1] * J[n, 1] - J[0, 1] * Y[n, 1]) where Y and J are Bessel functions. - Peter Luschny, Jan 30 2024

Extensions

Corrected and extended by Emeric Deutsch, Jul 31 2005