This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A274681 #31 Mar 11 2025 12:29:57 %S A274681 0,5,11,26,38,63,81,116,140,185,215,270,306,371,413,488,536,621,675, %T A274681 770,830,935,1001,1116,1188,1313,1391,1526,1610,1755,1845,2000,2096, %U A274681 2261,2363,2538,2646,2831,2945,3140,3260,3465,3591,3806,3938,4163,4301,4536 %N A274681 Numbers k such that 4*k + 1 is a triangular number. %C A274681 Also, numbers of the form m*(8*m + 3) for m = 0, -1, 1, -2, 2, -3, 3, ... - _Bruno Berselli_, Feb 26 2018 %H A274681 Colin Barker, <a href="/A274681/b274681.txt">Table of n, a(n) for n = 1..1000</a> %H A274681 <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (1,2,-2,-1,1). %F A274681 G.f.: x^2*(5 + 6*x + 5*x^2) / ((1 - x)^3*(1 + x)^2). %F A274681 a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5) for n>5. %F A274681 a(n) = A057029(n) - 1. %F A274681 a(n) = (1 - (-1)^n + 2*(-4 + (-1)^n)*n + 8*n^2)/4. %F A274681 a(n) = (4*n^2 - 3*n)/2 for n even, a(n) = (4*n^2 - 5*n + 1)/2 for n odd. %e A274681 5 is in the sequence since 4*5 + 1 = 21 is a triangular number (21 = 1 + 2 + 3 + 4 + 5 + 6). - _Michael B. Porter_, Jul 03 2016 %p A274681 A274681:=n->(1-(-1)^n+2*(-4+(-1)^n)*n+8*n^2)/4: seq(A274681(n), n=1..100); # _Wesley Ivan Hurt_, Jul 02 2016 %t A274681 Rest@ CoefficientList[Series[x^2 (5 + 6 x + 5 x^2)/((1 - x)^3 (1 + x)^2), {x, 0, 48}], x] (* _Michael De Vlieger_, Jul 02 2016 *) %t A274681 Select[Range[0,5000],OddQ[Sqrt[8(4#+1)+1]]&] (* or *) LinearRecurrence[ {1,2,-2,-1,1},{0,5,11,26,38},50] (* _Harvey P. Dale_, Apr 21 2018 *) %o A274681 (PARI) isok(n) = ispolygonal(4*n+1, 3) %o A274681 (PARI) select(n->ispolygonal(4*n+1, 3), vector(10000, n, n-1)) %o A274681 (PARI) concat(0, Vec(x^2*(5+6*x+5*x^2)/((1-x)^3*(1+x)^2) + O(x^100))) %o A274681 (Magma) [(1-(-1)^n+2*(-4+(-1)^n)*n+8*n^2)/4: n in [1..80]]; // _Wesley Ivan Hurt_, Jul 02 2016 %o A274681 (Python) %o A274681 def A274681(n): return (n>>1)*((n<<2)+(-1 if n&1 else -3)) # _Chai Wah Wu_, Mar 11 2025 %Y A274681 Cf. A000217, A000096 (n+1), A074377 (2*n+1), A045943 (3*n+1), A085787 (5*n+1). %Y A274681 Cf. A057029. %Y A274681 Cf. similar sequences listed in A299645. %K A274681 nonn,easy %O A274681 1,2 %A A274681 _Colin Barker_, Jul 02 2016