OFFSET
1,2
COMMENTS
As n increases, this sequence is approximately geometric with common ratio (1+sqrt(2))^4=17+12*sqrt(2).
LINKS
Index entries for linear recurrences with constant coefficients, signature (35, -35, 1).
FORMULA
G.f.: x(1-15*x+2*x^2) / ((1-x)*(1-34*x+x^2))
a(n) = 35*a(n-1)-35*a(n-2)+a(n-3)
a(n) = 34*a(n-1)-a(n-2)-12
a(n) = 1/16 *((3-sqrt(2))*(1+sqrt(2))^(4*n-2)+(3+sqrt(2))*(1-sqrt(2))^(4*n-2)+6)
a(n) = ceiling(1/16*(3-sqrt(2))*(1+sqrt(2))^(4*n-2))
EXAMPLE
The second decagonal number which is also hexagonal is A001107(20) = 1540. Hence a(2) = 20.
MATHEMATICA
LinearRecurrence[{35, -35, 1}, {1, 20, 667}, 17]
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Ant King, Dec 30 2011
STATUS
approved