OFFSET
1,2
COMMENTS
As n increases, this sequence is approximately geometric with common ratio r = lim_{n->infinity} a(n)/a(n-1) = (sqrt(3) + sqrt(2))^8 = 4801 + 1960*sqrt(6). - Ant King, Dec 27 2011
LINKS
Herman Jamke, Table of n, a(n) for n = 1..20
Eric Weisstein's World of Mathematics, Octagonal Hexagonal Number.
Index entries for linear recurrences with constant coefficients, signature (9603,-9603,1).
FORMULA
From Ant King, Dec 27 2011: (Start)
G.f.: x*(1 + 2178*x + 21*x^2)/((1-x)*(1 - 9602*x + x^2)).
a(n) = 9603*a(n-1) - 9603*a(n-2) + a(n-3).
a(n) = 9602*a(n-1) - a(n-2) + 2200.
a(n) = 1/96*((3*sqrt(3) - sqrt(2))*(sqrt(3) + sqrt(2))^(8n-5)+ (3*sqrt(3) + sqrt(2))*(sqrt(3) - sqrt(2))^(8n-5) - 22).
a(n) = floor(1/96*(3*sqrt(3) - sqrt(2))*(sqrt(3) + sqrt(2))^(8n-5)).
(End)
MAPLE
a:=5+2*sqrt(6): b:=5-2*sqrt(6): s:=n->a^n+b^n: d:=n->sqrt(6)*(a^n-b^n):for n from 0 to 40 do x:=simplify(s(n)-1/4*d(n)): y:=simplify(1/3*d(n)-s(n)/2): if(type((1+x/2)/3, integer) and type((1+y)/4, integer)) then printf("%d, ", (y^2-1)/8) fi: x:=simplify(s(n+1)+1/4*d(n+1)): y:=simplify(1/3*d(n+1)+s(n+1)/2): if(type((1+x/2)/3, integer) and type((1+y)/4, integer)) then printf("%d, ", (y^2-1)/8) fi: od: # Herman Jamke (hermanjamke(AT)fastmail.fm), Apr 19 2008
MATHEMATICA
LinearRecurrence[{9603, -9603, 1}, {1, 11781, 113123361}, 9] (* Ant King, Dec 27 2011 *)
CoefficientList[Series[(1 + 2178 x + 21 x^2) / ((1 - x) (1 - 9602 x + x^2)), {x, 0, 33}], x] (* Vincenzo Librandi, Aug 10 2017 *)
PROG
(Magma) I:=[1, 11781, 113123361]; [n le 3 select I[n] else 9603*Self(n-1)-9603*Self(n-2)+Self(n-3): n in [1..30]]; // Vincenzo Librandi, Aug 10 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
More terms from Larry Reeves (larryr(AT)acm.org), May 07 2001
One more term from Lior Manor, Feb 13 2002
More terms from Herman Jamke (hermanjamke(AT)fastmail.fm), Apr 19 2008
STATUS
approved