%I #100 Dec 13 2022 02:18:23
%S 2,2,3,5,8,12,17,23,30,38,47,57,68,80,93,107,122,138,155,173,192,212,
%T 233,255,278,302,327,353,380,408,437,467,498,530,563,597,632,668,705,
%U 743,782,822,863,905,948,992,1037,1083,1130,1178,1227,1277,1328,1380
%N a(n) = (n^2 - 3*n + 6)/2.
%C a(1) = 2; then add 0 to the first number, then 1, 2, 3, 4, ... and so on.
%C Essentially the same as A022856, A089071 and A133263. - _R. J. Mathar_, Dec 19 2008
%C First differences are A001477.
%C From _Vladimir Shevelev_, Jan 20 2014: (Start)
%C If we ignore the zero polygonal numbers, then for n >= 3, a(n) is the minimal k such that the k-th n-gonal number is a sum of two n-gonal numbers (see formula and example).
%C If the zero polygonal numbers are ignored, then for n >= 4, the a(n)-th n-gonal number is a sum of the (a(n)-1)-th n-gonal number and the (n-1)-th n-gonal number. (End)
%C Numbers m such that 8m - 15 is a square. - _Bruce J. Nicholson_, Jul 24 2017
%H Michael De Vlieger, <a href="/A152948/b152948.txt">Table of n, a(n) for n = 1..10000</a>
%H Marilena Barnabei, Flavio Bonetti, Niccolò Castronuovo, and Matteo Silimbani, <a href="https://doi.org/10.37236/9482">Permutations avoiding a simsun pattern</a>, The Electronic Journal of Combinatorics (2020) Vol. 27, Issue 3, P3.45.
%H E. R. Berlekamp, <a href="/A257113/a257113.pdf">A contribution to mathematical psychometrics</a>, Unpublished Bell Labs Memorandum, Feb 08 1968 [Annotated scanned copy]
%H Kyu-Hwan Lee and Se-jin Oh, <a href="http://arxiv.org/abs/1601.06685">Catalan triangle numbers and binomial coefficients</a>, arXiv:1601.06685 [math.CO], 2016.
%H Ângela Mestre and José Agapito, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL22/Mestre/mestre2.html">Square Matrices Generated by Sequences of Riordan Arrays</a>, J. Int. Seq., Vol. 22 (2019), Article 19.8.4.
%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) + n-2 (with a(1)=2). - _Vincenzo Librandi_, Nov 26 2010
%F a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3).
%F G.f.: -x*(2 - 4*x + 3*x^2) / (x-1)^3. - _R. J. Mathar_, Oct 30 2011
%F Sum_{n>=1} 1/a(n) = 1/2 + 2*Pi*tanh(sqrt(15)*Pi/2)/sqrt(15). - _Amiram Eldar_, Dec 13 2022
%e a(7)=17. This means that the 17th (positive) heptagonal number 697 (cf. A000566) is the smallest heptagonal number which is a sum of two (positive) heptagonal numbers. We have 697 = 616 + 81 with indices 17, 16, 6 in A000566. - _Vladimir Shevelev_, Jan 20 2014
%t Array[(#^2 - 3 # + 6)/2 &, 54] (* or *) Rest@ CoefficientList[Series[-x (2 - 4 x + 3 x^2)/(x - 1)^3, {x, 0, 54}],x] (* _Michael De Vlieger_, Mar 25 2020 *)
%o (Sage) [2+binomial(n,2) for n in range(0, 54)] # _Zerinvary Lajos_, Mar 12 2009
%o (Magma) [ (n^2-3*n+6)/2: n in [1..60] ];
%o (PARI) a(n)=(n^2-3*n+6)/2 \\ _Charles R Greathouse IV_, Sep 28 2015
%Y Cf. A000124, A000217, A000566, A001477, A022856, A089071, A133263, A152947.
%K nonn,easy
%O 1,1
%A _Vladimir Joseph Stephan Orlovsky_, Dec 15 2008