%I #28 Mar 02 2016 14:54:11
%S 1,19,631,21421,727669,24719311,839728891,28526062969,969046412041,
%T 32919051946411,1118278719765919,37988557420094821,
%U 1290492673563457981,43838762343737476519,1489227427013510743651,50589893756115627807601,1718567160280917834714769
%N Numbers that are both centered triangular numbers (A005448) and centered hexagonal numbers (A003215).
%C The centered hexagonal numbers are given by 3*p^2 - 3*p + 1 while the centered triangular numbers are given by (3*r^2 + 3*r + 2)/2. A natural number is both of the above numbers if and only if there exist numbers p and r such that 2*(2p-1)^2 = (2*r+1)^2+1. The Diophantine equation X^2 = 2*Y^2 - 1 has the following solutions: X is given by 1, 7, 41, 239, ..., i.e., A002315, and Y is given by A001653. The first equation gives r with 0, 3, 20, 119, 6906, i.e., A001652, and p with 1, 3, 15, 85, 493, ..., i.e., A011900.
%H Colin Barker, <a href="/A107118/b107118.txt">Table of n, a(n) for n = 1..654</a>
%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (35,-35,1).
%F a(n+2) = 34*a(n+1) - a(n) - 14.
%F a(n+1) = 17*a(n) - 7 + sqrt(288*a(n)^2 - 252*a(n) + 45).
%F G.f.: h(z)=(z*(1-16*z+z^2))/((1-z)*(1-34*z+z^2)).
%F a(n) = 35*a(n-1) - 35*a(n-2) + a(n-3). - _Colin Barker_, Jan 02 2015
%F a(n) = (14+(9+6*sqrt(2))*(17+12*sqrt(2))^(-n)+(9-6*sqrt(2))*(17+12*sqrt(2))^n)/32. - _Colin Barker_, Mar 02 2016
%t a[n_] := 17*n - 7 + Sqrt[288*n^2 - 252*n + 45]; NestList[a, 1, 20] (* _Stefan Steinerberger_, Sep 18 2007 *)
%t LinearRecurrence[{35,-35,1},{1,19,631},30] (* _Harvey P. Dale_, Jan 16 2016 *)
%o (PARI) Vec(-x*(x^2-16*x+1)/((x-1)*(x^2-34*x+1)) + O(x^100)) \\ _Colin Barker_, Jan 02 2015
%Y Cf. A003215 (Centered hexagonal numbers), A005448 (Centered triangular numbers).
%Y Cf. A001652, A001653, A002315, A011900.
%K nonn,easy
%O 1,2
%A _Richard Choulet_, Sep 18 2007
%E More terms from _Stefan Steinerberger_, Sep 18 2007