This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A004770 #57 Jul 23 2025 14:34:33 %S A004770 5,13,21,29,37,45,53,61,69,77,85,93,101,109,117,125,133,141,149,157, %T A004770 165,173,181,189,197,205,213,221,229,237,245,253,261,269,277,285,293, %U A004770 301,309,317,325,333,341,349,357,365,373,381,389,397,405,413,421,429,437,445 %N A004770 Numbers of the form 8k+5; or, numbers whose binary expansion ends in 101. %C A004770 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 %C A004770 Positive solutions to the equation x == 5 (mod 8). - _K.V.Iyer_, Apr 27 2009 %D A004770 James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 248. %H A004770 Vincenzo Librandi, <a href="/A004770/b004770.txt">Table of n, a(n) for n = 1..5000</a> %H A004770 Tanya Khovanova, <a href="http://www.tanyakhovanova.com/RecursiveSequences/RecursiveSequences.html">Recursive Sequences</a>. %H A004770 <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (2,-1). %F A004770 From _R. J. Mathar_, Mar 14 2011: (Start) %F A004770 a(n) = 8*n - 3. %F A004770 G.f.: x*(5+3*x)/(x-1)^2. (End) %F A004770 a(n) = 2*a(n-1) - a(n-2). - _Vincenzo Librandi_, May 28 2011 %F A004770 From _Elmo R. Oliveira_, Apr 03 2025: (Start) %F A004770 E.g.f.: exp(x)*(8*x - 3) + 3. %F A004770 a(n) = A113770(n)/2 = A016813(2*n-1). (End) %t A004770 Range[5, 1000, 8] (* _Vladimir Joseph Stephan Orlovsky_, May 27 2011 *) %t A004770 LinearRecurrence[{2,-1},{5,13},60] (* or *) NestList[#+8&,5,60] (* _Harvey P. Dale_, Jun 28 2021 *) %o A004770 (Magma) [8*n-3: n in [1..60]]; // _Vincenzo Librandi_, May 28 2011 %o A004770 (Haskell) %o A004770 a004770 = (subtract 3) . (* 8) %o A004770 a004770_list = [5, 13 ..] -- _Reinhard Zumkeller_, Aug 17 2012 %o A004770 (PARI) a(n)=8*n-3 \\ _Charles R Greathouse IV_, Sep 24 2015 %o A004770 (SageMath) [8*n-3 for n in range(1,57)] # _Stefano Spezia_, Jul 23 2025 %Y A004770 Cf. A016813, A017101, A017113, A110534, A113770. %Y A004770 Cf. A004776 (complement), A007521 (primes). %K A004770 nonn,easy %O A004770 1,1 %A A004770 _N. J. A. Sloane_