login
a(n) = (n^3 - 7*n + 12)/6.
13

%I #96 Apr 15 2024 13:16:52

%S 1,1,3,8,17,31,51,78,113,157,211,276,353,443,547,666,801,953,1123,

%T 1312,1521,1751,2003,2278,2577,2901,3251,3628,4033,4467,4931,5426,

%U 5953,6513,7107,7736,8401,9103,9843,10622,11441,12301,13203,14148,15137,16171

%N a(n) = (n^3 - 7*n + 12)/6.

%C A floretion-generated sequence relating to the sequence "A class of Boolean functions of n variables and rank 2" (among several others- see link "Sequences in Context").

%C a(n) is the number of P-position in 2-modular Nim with n-1 piles. - _Tanya Khovanova_ and Karan Sarkar, Jan 10 2016

%C a(n) is the number of parking functions of size n-1 avoiding the patterns 123 and 231. - _Lara Pudwell_, Apr 10 2023

%C a(n) is the number of length (n-2) strings on the alphabet {0,1,2} with digit sum at most 3. - _Daniel T. Martin_, May 23 2023

%H Michael De Vlieger, <a href="/A105163/b105163.txt">Table of n, a(n) for n = 1..10000</a>

%H Ayomikun Adeniran and Lara Pudwell, <a href="https://doi.org/10.54550/ECA2023V3S3R17">Pattern avoidance in parking functions</a>, Enumer. Comb. Appl. 3:3 (2023), Article S2R17.

%H Milan Janjic, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL13/Janjic/janjic33.html">Hessenberg Matrices and Integer Sequences</a>, J. Int. Seq. 13 (2010), Article #10.7.8.

%H Nurul Hilda Syani Putri, Mashadi, and Sri Gemawati, <a href="https://doi.org/10.12988/imf.2018.815">Sequences from heptagonal pyramid corners of integer</a>, International Mathematical Forum, Vol. 13, 2018, no. 4, 193-200.

%H Jun Yan, <a href="https://arxiv.org/abs/2404.07958">Results on pattern avoidance in parking functions</a>, arXiv:2404.07958 [math.CO], 2024. See p. 7.

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

%F a(n) = A005581(n) + 1.

%F a(n) = C(n+1,n-2) - n + 2. - _Zerinvary Lajos_, Mar 21 2008

%F Sequence starting (1, 3, 8, 17, ...) = binomial transform of [1, 2, 3, 1, 0, 0, 0, ...]. - _Gary W. Adamson_, Apr 24 2008

%F G.f.: x*(1 - 3*x + 5*x^2 - 2*x^3)/(1 - x)^4. - _Colin Barker_, Mar 26 2012

%F a(n) = A181971(n,3) for n > 2. - _Reinhard Zumkeller_, Jul 09 2012

%F a(n) = 2*a(n-1) - a(n-2) + n - 1, for all n in Z. - _Gionata Neri_, Jul 28 2016

%F a(n) = A000292(n-2) + A000124(n-2). - _Torlach Rush_, Aug 06 2018

%p seq(binomial(n+1, n-2)-n+2, n=1..44); # _Zerinvary Lajos_, Mar 21 2008

%t Rest@ CoefficientList[Series[x (1 - 3 x + 5 x^2 - 2 x^3)/(1 - x)^4, {x, 0, 46}], x] (* or *)

%t Array[(#^3 - 7 # + 12)/6 &, 46] (* _Michael De Vlieger_, Nov 18 2019 *)

%o (PARI) a(n)=(n^3-7*n)/6+2 \\ _Charles R Greathouse IV_, Mar 26 2012

%o (Maxima) A105163(n):=(n^3 - 7*n + 12)/6$ makelist(A105163(n),n,1,20); /* _Martin Ettl_, Dec 18 2012 */

%o (Python) for n in range(1,45): print((n**3 - 7*n + 12)/6, end=', ') # _Stefano Spezia_, Jan 05 2019

%Y Cf. A005581, A102169, A181971.

%K nonn,easy

%O 1,3

%A _Creighton Dement_, Apr 10 2005