oeis.org

A124124 - OEIS

A124124

Nonnegative integers n such that 2n^2 + 2n - 3 is square.

9

1, 2, 6, 13, 37, 78, 218, 457, 1273, 2666, 7422, 15541, 43261, 90582, 252146, 527953, 1469617, 3077138, 8565558, 17934877, 49923733, 104532126, 290976842, 609257881, 1695937321, 3551015162, 9884647086, 20696833093, 57611945197, 120629983398, 335787024098

COMMENTS

Alternative definition: T_n and (T_n - 1)/2 are triangular numbers. - Raphie Frank, Sep 06 2012

FORMULA

It appears that a(n) = 3*a(n-1)-3*a(n-2)+a(n-3) if n is even, a(n) = 5*a(n-1)-5*a(n-2)+a(n-3) if n is odd. Can anyone confirm this?

Corrected and confirmed (using the g.f.) by Robert Israel, Aug 27 2014

a(n) = a(n-1)+6*a(n-2)-6*a(n-3)-a(n-4)+a(n-5). G.f.: -x*(1+x-2*x^2+x^3+x^4)/((x-1)*(x^2-2*x-1)*(x^2+2*x-1)). [R. J. Mathar, Jul 17 2009]

If y = A006452(n), then a(n) = 2y + ((sqrt(8y^2 - 7) - 1)/2 - (1 - sgn(n))).

Also see A216134 [a(n) = y + ((sqrt(8y^2 - 7) - 1)/2 - (1 - sgn(n)))].

(End)

a(n) = 7*a(n-2) - 7*a(n-4) + a(n-6), for n>6. (End)

MAPLE

coeftayl(x*(1+x-2*x^2+x^3+x^4)/((1-x)*(x^2-2*x-1)*(x^2+2*x-1)), x=0, n);

end proc:

# Alternative:

a[1]:= 1: a[2]:= 2: a[3]:= 6:

for n from 4 to 1000 do

a[n]:= (3 + 2*(n mod 2))*(a[n-1]-a[n-2])+a[n-3]

od:

MATHEMATICA

LinearRecurrence[{1, 6, -6, -1, 1}, {1, 2, 6, 13, 37}, 40] (* Harvey P. Dale, Nov 05 2011 *)

CoefficientList[Series[(1 + x - 2*x^2 + x^3 + x^4)/((1 - x)*(x^2 - 2*x - 1)*(x^2 + 2*x - 1)), {x, 0, 30}], x] (* Wesley Ivan Hurt, Aug 04 2014 *)

PROG

(PARI)

for(n=1, 10^10, if(issquare(2*n^2+2*n-3), print1(n, ", "))) \\ Derek Orr, Aug 13 2014