A072221 a(n) = 6*a(n-1) - a(n-2) + 2, with a(0)=1, a(1)=4.
1, 4, 25, 148, 865, 5044, 29401, 171364, 998785, 5821348, 33929305, 197754484, 1152597601, 6717831124, 39154389145, 228208503748, 1330096633345, 7752371296324, 45184131144601, 263352415571284, 1534930362283105, 8946229758127348, 52142448186480985
Offset: 0
Examples
From _Michael Somos_, Dec 25 2018: (Start) For n=1, the triangle (3, 4, 5) has area 6 = A075848(1). For n=2, the triangle (3, 25, 26) has area 36 = A075848(2). (End)
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 0..1000
- Sylvester Robins, Certain Series of Integral, Rational, Scalene Triangles, The American Mathematical Monthly, Vol. 1, No. 1 (Jan., 1894), pp. 13-14. See Example I.
- Index entries for linear recurrences with constant coefficients, signature (7,-7,1).
Programs
-
Haskell
a072221 n = a072221_list !! n a072221_list = 1 : 4 : (map (+ 2) $ zipWith (-) (map (* 6) $ tail a072221_list) a072221_list) -- Reinhard Zumkeller, Apr 27 2012
-
Mathematica
a[n_] := a[n] = 6a[n - 1] - a[n - 2] + 2; a[0] = 1; a[1] = 4; Table[ a[n], {n, 0, 20}] LinearRecurrence[{7, -7, 1}, {1, 4, 25}, 25] (* T. D. Noe, Dec 09 2013 *) a[ n_] := (3 ChebyshevT[ n, 3] - 1) / 2; (* Michael Somos, Dec 25 2018 *)
-
PARI
{a(n) = (3 * polchebyshev( n, 1, 3) - 1) / 2}; /* Michael Somos, Dec 25 2018 */
Formula
a(n) = (3*A001541(n) - 1)/2.
a(n) = 3*A001108(n) + 1. - David Scheers, Dec 25 2006
From Franz Vrabec, Aug 21 2006: (Start)
a(n) = -1/2 + (3/4)*((3+sqrt(8))^n + (3-sqrt(8))^n) for n >= 0.
a(n) = floor((3/4)*(3+sqrt(8))^n) for n > 0. (End)
G.f.: (1-3x+4x^2)/((1-x)(1-6x+x^2)). - R. J. Mathar, Sep 09 2008
a(n) = a(-n) for all n in Z. - Michael Somos, Dec 25 2018
Extensions
Edited by Robert G. Wilson v, Jul 08 2002
Comments