A046727 Related to Pythagorean triples: alternate terms of A001652 and A046090.
0, 3, 21, 119, 697, 4059, 23661, 137903, 803761, 4684659, 27304197, 159140519, 927538921, 5406093003, 31509019101, 183648021599, 1070379110497, 6238626641379, 36361380737781, 211929657785303, 1235216565974041, 7199369738058939, 41961001862379597, 244566641436218639
Offset: 0
References
- A. H. Beiler, Recreations in the Theory of Numbers. New York: Dover, pp. 122-125, 1964.
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 0..1000
- A. Bogomolny, The Trinary Tree(s) underlying Primitive Pythagorean Triples.
- Dan Romik, The dynamics of Pythagorean Triples, Trans. Amer. Math. Soc. 360 (2008), 6045-6064.
- P. E. Trier, "Almost Isosceles" Right-Angled Triangles, Eureka, No. 4, May 1940, pp. 9 - 11.
- Index entries for linear recurrences with constant coefficients, signature (5,5,-1).
Crossrefs
Programs
-
Haskell
a046727 n = a046727_list !! n a046727_list = 0 : f (tail a001652_list) (tail a046090_list) where f (x::xs) (:y:ys) = x : y : f xs ys -- Reinhard Zumkeller, Jan 10 2012
-
Magma
I:=[0,3,21,119]; [n le 4 select I[n] else 5*Self(n-1)+5*Self(n-2)-Self(n-3): n in [1..30]]; // Vincenzo Librandi, Nov 04 2016
-
Mathematica
RecurrenceTable[{a[n+2]==6a[n+1] -a[n] -4*(-1)^n, a[0]==3, a[1]==21}, a, {n, 30}] (* Ron Knott, Jul 01 2013 *) LinearRecurrence[{5,5,-1}, {0,3,21,119}, 30] (* Vincenzo Librandi, Nov 04 2016 *)
-
PARI
concat(0, Vec(x*(3+6*x-x^2)/((1+x)*(1-6*x+x^2)) + O(x^30))) \\ Colin Barker, Nov 03 2016
-
SageMath
[(lucas_number2(2*n+1,2,-1) +2*(-1)^n)/4 -int(n==0) for n in range(41)] # G. C. Greubel, Feb 11 2023
Formula
Values of x obtained by repeatedly multiplying the triple (x, y, z) = (3, 4, 5) by the matrix A = ([1 2 2], [2 1 2], [2 2 3]), the Across matrix of "The Trinary Tree(s) underlying Primitive Pythagorean Triples" generating matrices. - Vim Wenders, Jan 14 2004
G.f.: x*(3+6*x-x^2)/((1+x)*(1-6*x+x^2)). - R. J. Mathar, Jul 08 2009
a(n) + a(n+1) = A005319(n+1), n > 0. - R. J. Mathar, Jul 13 2009
a(n) = 6*a(n-1) - a(n-2) - 4*(-1)^n. - Ron Knott, Jul 01 2013
From Colin Barker, Nov 03 2016: (Start)
a(n) = (2*(-1)^n + (1+sqrt(2))^(2*n+1) + (1-sqrt(2))^(2*n+1))/4 for n > 0.
a(n) = 5*a(n-1) + 5*a(n-2) - a(n-3) for n > 3. (End)
From G. C. Greubel, Feb 11 2023: (Start)
a(n) = (A001333(2*n+1) + (-1)^n)/2 - [n=0]. (End)
E.g.f.: exp(-x)*(1 + exp(4*x)*(cosh(2*sqrt(2)*x) + sqrt(2)*sinh(2*sqrt(2)*x)))/2 - 1. - Stefano Spezia, Aug 03 2024
Extensions
More terms from Sascha Kurz, Jan 23 2003
Comments