OFFSET
1,1
COMMENTS
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..10000
Ron Knott, Pythagorean triangles and Triples
Eric Weisstein's World of Mathematics, Pythagorean Triple
Index entries for linear recurrences with constant coefficients, signature (0,2,0,-1).
FORMULA
From Bruno Berselli, Sep 30 2011: (Start)
G.f.: x*(15+8*x)/((1-x)^2*(1+x)^2).
a(n) = 2*a(n-2) - a(n-4).
a(-n) = -a(A014681(n-1)). (End)
MATHEMATICA
Riffle[15*#, 8*#] & [Range[50]] (* Paolo Xausa, Mar 21 2024 *)
PROG
(Magma) &cat[[15*n, 8*n]: n in [1..27]]; // Bruno Berselli, Sep 30 2011
(PARI) a(n)=(n+1)\2*if(n%2, 15, 8) \\ Charles R Greathouse IV, Oct 07 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Omar E. Pol, Sep 12 2011
STATUS
approved