OFFSET
1,1
COMMENTS
Only numbers of the form 8k+5 may be written as a sum of 5 odd squares. Examples: 5 = 1+1+1+1+1, 13 = 9+1+1+1+1, 21 = 9+9+1+1+1, 29 = 25+1+1+1+1= 9+9+9+1+1, 37 = 9+9+9+9+1 = 25+9+1+1+1, 45 = 25+9+9+1+1=9+9+9+9+9, 53 = 49+1+1+1+1 = 25+25+1+1+1 = 25+9+9+9+1, ... - Philippe Deléham, Sep 03 2005
Positive solutions to the equation x == 5 (mod 8). - K.V.Iyer, Apr 27 2009
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..5000
Tanya Khovanova, Recursive Sequences.
Index entries for linear recurrences with constant coefficients, signature (2,-1)
FORMULA
From R. J. Mathar, Mar 14 2011: (Start)
a(n) = 8*n - 3.
G.f.: x*(5+3*x)/(x-1)^2. (End)
a(n) = 2*a(n-1) - a(n-2). - Vincenzo Librandi, May 28 2011
MATHEMATICA
Range[5, 1000, 8] (* Vladimir Joseph Stephan Orlovsky, May 27 2011 *)
LinearRecurrence[{2, -1}, {5, 13}, 60] (* or *) NestList[#+8&, 5, 60] (* Harvey P. Dale, Jun 28 2021 *)
PROG
(Magma) [8*n-3: n in [1..60]]; // Vincenzo Librandi, May 28 2011
(Haskell)
a004770 = (subtract 3) . (* 8)
a004770_list = [5, 13 ..] -- Reinhard Zumkeller, Aug 17 2012
(PARI) a(n)=8*n-3 \\ Charles R Greathouse IV, Sep 24 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved