cp's OEIS Frontend

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.

A274682 Numbers n such that 8*n-1 is a triangular number.

Original entry on oeis.org

2, 7, 29, 44, 88, 113, 179, 214, 302, 347, 457, 512, 644, 709, 863, 938, 1114, 1199, 1397, 1492, 1712, 1817, 2059, 2174, 2438, 2563, 2849, 2984, 3292, 3437, 3767, 3922, 4274, 4439, 4813, 4988, 5384, 5569, 5987, 6182, 6622, 6827, 7289, 7504, 7988, 8213, 8719
Offset: 1

Views

Author

Colin Barker, Jul 02 2016

Keywords

Examples

			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
		

Crossrefs

Cf. A000124 (n-1), A174114 (2*n-1), A213399 (4*n-1), A069099 (7*n-1).

Programs

  • Mathematica
    Table[(5 + 3 (-1)^n - 2 (8 + 3 (-1)^n) n + 16 n^2)/4, {n, 47}] (* or *)
    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 *)
  • PARI
    isok(n) = ispolygonal(8*n-1, 3)
    
  • PARI
    select(n->ispolygonal(8*n-1, 3), vector(10000, n, n-1))
    
  • PARI
    Vec(x*(2+5*x+18*x^2+5*x^3+2*x^4)/((1-x)^3*(1+x)^2) + O(x^100))

Formula

a(n) = (5+3*(-1)^n-2*(8+3*(-1)^n)*n+16*n^2)/4.
a(n) = (8*n^2-11*n+4)/2 for n even.
a(n) = (8*n^2-5*n+1)/2 for n odd.
a(n) = a(n-1)+2*a(n-2)-2*a(n-3)-a(n-4)+a(n-5) for n>5.
G.f.: x*(2+5*x+18*x^2+5*x^3+2*x^4) / ((1-x)^3*(1+x)^2).