%I #13 Jul 04 2016 05:54:43
%S 2,7,29,44,88,113,179,214,302,347,457,512,644,709,863,938,1114,1199,
%T 1397,1492,1712,1817,2059,2174,2438,2563,2849,2984,3292,3437,3767,
%U 3922,4274,4439,4813,4988,5384,5569,5987,6182,6622,6827,7289,7504,7988,8213,8719
%N Numbers n such that 8*n-1 is a triangular number.
%H Colin Barker, <a href="/A274682/b274682.txt">Table of n, a(n) for n = 1..1000</a>
%H <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (1,2,-2,-1,1).
%F a(n) = (5+3*(-1)^n-2*(8+3*(-1)^n)*n+16*n^2)/4.
%F a(n) = (8*n^2-11*n+4)/2 for n even.
%F a(n) = (8*n^2-5*n+1)/2 for n odd.
%F a(n) = a(n-1)+2*a(n-2)-2*a(n-3)-a(n-4)+a(n-5) for n>5.
%F G.f.: x*(2+5*x+18*x^2+5*x^3+2*x^4) / ((1-x)^3*(1+x)^2).
%e 2 is in the sequence since 8*2 - 1 = 15, and 15 = 1 + 2 + 3 + 4 + 5 is a triangular number. - _Michael B. Porter_, Jul 03 2016
%t Table[(5 + 3 (-1)^n - 2 (8 + 3 (-1)^n) n + 16 n^2)/4, {n, 47}] (* or *)
%t Rest@ CoefficientList[Series[x (2 + 5 x + 18 x^2 + 5 x^3 + 2 x^4)/((1 - x)^3 (1 + x)^2), {x, 0, 47}], x] (* _Michael De Vlieger_, Jul 02 2016 *)
%o (PARI) isok(n) = ispolygonal(8*n-1, 3)
%o (PARI) select(n->ispolygonal(8*n-1, 3), vector(10000, n, n-1))
%o (PARI) Vec(x*(2+5*x+18*x^2+5*x^3+2*x^4)/((1-x)^3*(1+x)^2) + O(x^100))
%Y Cf. A000124 (n-1), A174114 (2*n-1), A213399 (4*n-1), A069099 (7*n-1).
%K nonn,easy
%O 1,1
%A _Colin Barker_, Jul 02 2016