A233231 a(n) = 10*a(n-3) - a(n-6) + 4 for n>5, a(0)=2, a(1)=3, a(2)=5, a(3)=12, a(4)=29, a(5)=51.
2, 3, 5, 12, 29, 51, 122, 291, 509, 1212, 2885, 5043, 12002, 28563, 49925, 118812, 282749, 494211, 1176122, 2798931, 4892189, 11642412, 27706565, 48427683, 115248002, 274266723, 479384645, 1140837612, 2714960669, 4745418771, 11293128122, 26875339971
Offset: 0
Examples
a(5)=29 as the triangle with sides (5,29,30) has integer area 72.
Links
- Index entries for linear recurrences with constant coefficients, signature (1,0,10,-10,0,-1,1 ).
Programs
-
Mathematica
seq[n_] := seq[n]=Which[n==0, 2, n==1, 3, n==2, 5, n==3, 12, n==4, 29, n==5, 51, True, 10seq[n-3]-seq[n-6]+4]; Table[seq[m], {m, 0, 100}] LinearRecurrence[{1, 0, 10, -10, 0, -1, 1}, {2, 3, 5, 12, 29, 51, 122}, 30] (* T. D. Noe, Dec 09 2013 *)
Formula
G.f.: (2 + x + 2*x^2 - 13*x^3 + 7*x^4 + 2*x^5 + 3*x^6)/((1 - x)*(1 - 10*x^3 + x^6)). [Bruno Berselli, Dec 09 2013]
a(n) = a(n-1) + 10*a(n-3) - 10*a(n-4) - a(n-6) + a(n-7) for n>6. [Bruno Berselli, Dec 09 2013]
Comments