login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A112532 First differences of [0, A047970]. 5

%I #28 Jan 29 2023 01:41:26

%S 1,1,3,9,29,101,379,1525,6549,29889,144419,736241,3947725,22201549,

%T 130624587,802180701,5131183301,34121977865,235486915507,

%U 1683925343929,12458499203901,95237603403381,751291094637083,6108883628141189,51144808472958709,440444879385258001

%N First differences of [0, A047970].

%C Number of sequences of length n in [n] (endofunctions) whose first run has length equal to the maximum of the sequence.

%H G. C. Greubel, <a href="/A112532/b112532.txt">Table of n, a(n) for n = 0..500</a>

%F G.f.: (1-x)^2*( Sum_{n >= 0} x^n/(1 - (n+2)*x) ). - _Peter Bala_, Jul 09 2014

%F From _Mathew Englander_, Feb 28 2021: (Start)

%F a(n) = A089246(n+2,0) - A089246(n+1,0).

%F a(n) = n + Sum_{i = 0..n} (n-i-1)^2 * (n-i)^i. (End)

%e The 9 sequences for n=4 (sorted by maximum)

%e 1121,1122,2211,2212, 1113,2223,3331,3332, 4444

%e The 29 sequences for n=5 (sorted by maximum)

%e 11211,11212,11221,11222, 22111,22112,22121,22122, 11123,11131,11132,11133, 22213,22231,22232,22233, 33311,33312,33313,33321,33322,33323, 11114, 22224, 33334, 44441,44442,44443, 55555

%t a[n_]:= If[n==0, 1, n + Sum[(i-1)^2*i^(n-i), {i,0,n}]];

%t Table[a[n], {n, 0, 30}] (* _G. C. Greubel_, Jan 12 2022 *)

%o (PARI) a(n) = n + sum(i = 0, n, (n-i-1)^2 * (n-i)^i); \\ _Michel Marcus_, Mar 01 2021

%o (Sage) [n +sum((j-1)^2*j^(n-j) for j in (0..n)) for n in (0..30)] # _G. C. Greubel_, Jan 12 2022

%Y Cf. A047970, A112531, A229046.

%Y First differences of column 0 of triangle A089246 (beginning at row 1). With offset 1, first differences of column 0 of triangle A242431. Second differences of column 0 of triangle A101494.

%K nonn

%O 0,3

%A _Alford Arnold_, Sep 10 2005

%E Corrected by _D. S. McNeil_, Aug 20 2010

%E Combinatorial interpretation and examples by _Olivier GĂ©rard_, Jan 29 2023

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)