A005818 Numbers n that are primitive solutions to n^2 = a^2 + b^2 + c^2 (a,b,c > 0).
3, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99, 101, 103, 105, 107, 109, 111, 113, 115, 117, 119, 121, 123, 125, 127, 129, 131
Offset: 1
Links
- T. D. Noe, Table of n, a(n) for n = 1..1000
- Index entries for linear recurrences with constant coefficients, signature (2,-1).
Crossrefs
Cf. A005767.
Programs
-
Mathematica
Join[{3}, Range[7, 200, 2]] (* Paolo Xausa, Feb 14 2025 *)
-
Python
def A005818(n): return (n<<1)+3 if n>1 else 3 # Chai Wah Wu, Feb 14 2025
Formula
G.f.: x*(-2*x^2 + x + 3)/(x - 1)^2. - Chai Wah Wu, Sep 14 2018
E.g.f.: (exp(x) - 1)*(3 + 2*x). - Stefano Spezia, Feb 19 2023
Extensions
Name corrected by T. D. Noe, Nov 12 2010
Comments