A004770 Numbers of the form 8k+5; or, numbers whose binary expansion ends in 101.
5, 13, 21, 29, 37, 45, 53, 61, 69, 77, 85, 93, 101, 109, 117, 125, 133, 141, 149, 157, 165, 173, 181, 189, 197, 205, 213, 221, 229, 237, 245, 253, 261, 269, 277, 285, 293, 301, 309, 317, 325, 333, 341, 349, 357, 365, 373, 381, 389, 397, 405, 413, 421, 429, 437, 445
Offset: 1
References
- James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 248.
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).
Crossrefs
Programs
-
Haskell
a004770 = (subtract 3) . (* 8) a004770_list = [5, 13 ..] -- Reinhard Zumkeller, Aug 17 2012
-
Magma
[8*n-3: n in [1..60]]; // 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 *)
-
PARI
a(n)=8*n-3 \\ Charles R Greathouse IV, Sep 24 2015
-
SageMath
[8*n-3 for n in range(1,57)] # Stefano Spezia, Jul 23 2025
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
From Elmo R. Oliveira, Apr 03 2025: (Start)
E.g.f.: exp(x)*(8*x - 3) + 3.
Comments