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 29 2011: (Start)
G.f.: x*(21+20*x)/((1-x)^2*(1+x)^2).
a(n) = 2*a(n-2) - a(n-4). (End)
MATHEMATICA
Riffle[21*#, 20*#] & [Range[50]] (* Paolo Xausa, Mar 21 2024 *)
PROG
(Magma) &cat[[21*n, 20*n]: n in [1..27]]; // Bruno Berselli, Sep 29 2011
(PARI) a(n)=(n+1)\2*if(n%2, 21, 20) \\ Charles R Greathouse IV, Oct 07 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Omar E. Pol, Sep 12 2011
EXTENSIONS
More terms from Bruno Berselli, Sep 29 2011
STATUS
approved