A195032 Vertex number of a square spiral in which the length of the first two edges are the legs of the primitive Pythagorean triple [5, 12, 13]. The edges of the spiral have length A195031.
0, 5, 17, 27, 51, 66, 102, 122, 170, 195, 255, 285, 357, 392, 476, 516, 612, 657, 765, 815, 935, 990, 1122, 1182, 1326, 1391, 1547, 1617, 1785, 1860, 2040, 2120, 2312, 2397, 2601, 2691, 2907, 3002, 3230, 3330, 3570, 3675, 3927, 4037, 4301, 4416, 4692
Offset: 0
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..10000
- Ron Knott, Pythagorean triangles and Triples
- Eric Weisstein's World of Mathematics, Pythagorean Triple
- Index entries for linear recurrences with constant coefficients, signature (1,2,-2,-1,1).
Programs
-
Magma
[(2*n*(17*n+27)+(14*n-3)*(-1)^n+3)/16: n in [0..50]]; // Vincenzo Librandi, Oct 14 2011
-
Mathematica
a[n_] := (2 n (17 n + 27) + (14 n - 3)*(-1)^n + 3)/16; Array[a, 50, 0] (* Amiram Eldar, Nov 23 2018 *)
-
PARI
vector(50, n, n--; (2*n*(17*n+27)+(14*n-3)*(-1)^n+3)/16) \\ G. C. Greubel, Nov 23 2018
-
Sage
[(2*n*(17*n+27)+(14*n-3)*(-1)^n+3)/16 for n in range(50)] # G. C. Greubel, Nov 23 2018
Formula
From Bruno Berselli, Oct 13 2011: (Start)
G.f.: x*(5 + 12*x)/((1 + x)^2*(1 - x)^3).
a(n) = (1/2)*((2*n + (-1)^n + 3)/4)*((34*n - 3*(-1)^n+3)/4) = (2*n*(17*n + 27) + (14*n - 3)*(-1)^n + 3)/16.
a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5). (End)
E.g.f.: (1/16)*((3 + 88*x + 34*x^2)*exp(x) - (3 + 14*x)*exp(-x)). - Franck Maminirina Ramaharo, Nov 23 2018
Comments