login
a(n) = n*(2*n+5).
24

%I #52 Feb 06 2022 02:54:09

%S 0,7,18,33,52,75,102,133,168,207,250,297,348,403,462,525,592,663,738,

%T 817,900,987,1078,1173,1272,1375,1482,1593,1708,1827,1950,2077,2208,

%U 2343,2482,2625,2772,2923,3078,3237,3400,3567,3738,3913,4092,4275,4462,4653,4848,5047,5250,5457,5668

%N a(n) = n*(2*n+5).

%C Permutations avoiding 12-3 that contain the pattern 32-1 exactly once.

%C a(n) = A014107(n) + 8*n^2; A100035(a(n)) = 3 for n>1. - _Reinhard Zumkeller_, Oct 31 2004

%C If Y is a 3-subset of an (2n+1)-set X then, for n>=1, a(n-1) is the number of (2n-1)-subsets of X having at least two elements in common with Y. - _Milan Janjic_, Dec 16 2007

%H G. C. Greubel, <a href="/A033537/b033537.txt">Table of n, a(n) for n = 0..5000</a>

%H T. Mansour, <a href="https://arxiv.org/abs/math/0202219">Restricted permutations by patterns of type 2-1</a>, arXiv:math/0202219 [math.CO], 2002.

%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (3,-3,1).

%F a(n) = a(n-1) + 4*n + 3 (with a(0)=0). - _Vincenzo Librandi_, Nov 17 2010

%F From _L. Edson Jeffery_, Oct 14 2012: (Start)

%F G.f.: x*(7-3*x)/(1-x)^3.

%F a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3), n>=3, a(0)=0, a(1)=7, a(2)=18. (End)

%F E.g.f.: x*(7 + 2*x)*exp(x). - _G. C. Greubel_, Jul 15 2017

%F From _Amiram Eldar_, Feb 06 2022: (Start)

%F Sum_{n>=1} 1/a(n) = 46/75 - 2*log(2)/5.

%F Sum_{n>=1} (-1)^(n+1)/a(n) = Pi/10 + log(2)/5 - 26/75. (End)

%p seq(n*(2*n+5), n=0..60); # _G. C. Greubel_, Oct 14 2019

%t Table[n*(2*n+5), {n, 0, 60}] (* _Vladimir Joseph Stephan Orlovsky_, Nov 16 2008 *)

%t LinearRecurrence[{3,-3,1},{0,7,18},60] (* _Harvey P. Dale_, Nov 19 2021 *)

%o (PARI) a(n)=n*(2*n+5) \\ _Charles R Greathouse IV_, Jun 17 2017

%o (Magma) [n*(2*n+5): n in [0..60]]; // _G. C. Greubel_, Oct 14 2019

%o (Sage) [n*(2*n+5) for n in (0..60)] # _G. C. Greubel_, Oct 14 2019

%o (GAP) List([0..60], n-> n*(2*n+5) ); # _G. C. Greubel_, Oct 14 2019

%Y Cf. A100036, A100037, A100038, A100039.

%K nonn,easy

%O 0,2

%A _N. J. A. Sloane_