login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A102038 a(n+1) = n*a(n) + a(n-1), a(1)=1, a(2)=2. 8
1, 2, 5, 17, 73, 382, 2365, 16937, 137861, 1257686, 12714721, 141119617, 1706150125, 22321071242, 314201147513, 4735338283937, 76079613690505, 1298088771022522, 23441677492095901, 446689961120844641 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

a(n) = x(n) + y(n) where x(n)/y(n) is the continued fraction [1,2,3,4,...,n].

Using a(n) = x(n) - y(n) instead of a(n) = x(n) + y(n) would give A058307.

LINKS

G. C. Greubel, Table of n, a(n) for n = 1..449

Juan S. Auli and Sergi Elizalde, Wilf equivalences between vincular patterns in inversion sequences, arXiv:2003.11533 [math.CO], 2020.

Zhicong Lin, Sherry H. F. Yan, Vincular patterns in inversion sequences, Applied Mathematics and Computation (2020), Vol. 364, 124672.

FORMULA

a(n) = A001040(n) + A001053(n) for n>1.

From Paul D. Hanna, Oct 31 2006: (Start)

a(n+1) = Sum_{k=0..n} k!*C(floor((n+k)/2),k)*C(floor((n+k+1)/2),k)).

a(n+1) = Sum_{k=0..n} k!*A124428(n+k,k). (End)

MATHEMATICA

a[1]= 1; a[2]= 2; a[n_]:= a[n] = (n-1)*a[n-1]+a[n-2]; Table[a[n], {n, 20}] (* Robert G. Wilson v, Feb 14 2005 *)

RecurrenceTable[{a[1]==1, a[2]==2, a[n+1]==n*a[n]+a[n-1]}, a, {n, 20}] (* Harvey P. Dale, Sep 04 2018 *)

PROG

(PARI) a(n)=sum(k=0, n, k!*binomial((n+k)\2, k)*binomial((n+k+1)\2, k)) \\ Paul D. Hanna, Oct 31 2006

(MAGMA) I:=[1, 2]; [n le 2 select I[n] else (n-1)*Self(n-1) +Self(n-2): n in [1..30]]; // G. C. Greubel, Feb 23 2019

(Sage) [sum(factorial(k)*binomial(floor((n+k-1)/2), k)*binomial(floor((n+k)/2), k) for k in (0..n)) for n in (1..30)] # G. C. Greubel, Feb 23 2019

(GAP) a:=[1, 2];; for n in [3..30] do a[n]:=(n-1)*a[n-1]+a[n-2]; od; a; # G. C. Greubel, Feb 23 2019

CROSSREFS

Numerators are in A001040 and denominators in A001053.

Cf. A124428.

Sequence in context: A084161 A325294 A230960 * A002135 A260337 A217944

Adjacent sequences:  A102035 A102036 A102037 * A102039 A102040 A102041

KEYWORD

base,easy,nonn

AUTHOR

Eric Angelini, Feb 12 2005

EXTENSIONS

Edited and extended by Robert G. Wilson v, Feb 14 2005

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 20 01:09 EDT 2021. Contains 345154 sequences. (Running on oeis4.)