OFFSET
2,1
COMMENTS
The coins left after packing boomerangs into n X n coins using the same rule as A229593. See illustration in links.
LINKS
Kival Ngaokrajang, Illustration of initial terms
Index entries for linear recurrences with constant coefficients, signature (0,0,2,0,0,-1).
FORMULA
G.f. -x^2*(-4-3*x-7*x^2-5*x^3+x^5) / ( (x-1)^2*(1+x+x^2)^2 ). - R. J. Mathar, Oct 16 2013
MATHEMATICA
LinearRecurrence[{0, 0, 2, 0, 0, -1}, {4, 3, 7, 13, 6, 13}, 80] (* Harvey P. Dale, Jan 19 2019 *)
PROG
(Small Basic)
u[2]=4
d[3]=-1
d[4]=4
d[5]=6
For n=2 To 100
If n+1 >=6 Then
If Math.Remainder(n+1, 3)=0 Then
d[n+1]=d[n-2]-6
Else
d[n+1]=d[n-2]+3
EndIf
EndIf
u[n+1]=u[n]+d[n+1]
TextWindow.Write(u[n]+", ")
EndFor
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Kival Ngaokrajang, Oct 05 2013
STATUS
approved