OFFSET
1,2
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (2, 0, -2, 0, 2, 0, -2, 1).
FORMULA
For k=1,3: a(8*n+k) = (4*n+k)*(2*n+1). - Reinhard Zumkeller, Dec 20 2007
G.f.: -x*(x^7 - x^6 - x^5 + x^4 + x^3 - x^2 + 1) / ((x-1)^3*(x+1)*(x^4+1)). - Colin Barker, Mar 29 2013
a(n) = 2*a(n-1) - 2*a(n-3) + 2*a(n-5) - 2*a(n-7) + a(n-8); a(1)=1, a(2)=2, a(3)=3, a(4)=5, a(5)=7, a(6)=9, a(7)=11, a(8)=13. - Harvey P. Dale, May 16 2014
MAPLE
T := {seq((1/2)*j*(j+1), j = 1 .. 40)}: a[1] := 1; for n from 2 to 60 do a[n] := a[n-1]+nops(`intersect`(T, {seq(a[i], i = 1 .. n-1)})) end do: seq(a[n], n = 1 .. 60); # Emeric Deutsch, Jun 21 2007
MATHEMATICA
nxt[{a_, t_}]:=Module[{x=t}, {a+t, If[IntegerQ[(Sqrt[8(a+t)+1]-1)/2], x+1, x]}]; Transpose[NestList[nxt, {1, 1}, 70]][[1]] (* or *) LinearRecurrence[ {2, 0, -2, 0, 2, 0, -2, 1}, {1, 2, 3, 5, 7, 9, 11, 13}, 70] (* Harvey P. Dale, May 16 2014 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, Jun 04 2007
EXTENSIONS
More terms from Emeric Deutsch, Jun 21 2007
STATUS
approved