OFFSET
1,1
COMMENTS
Numbers whose binary reflected Gray code (A014550) ends with 11. - Amiram Eldar, May 17 2021
LINKS
FORMULA
a(n) = 8*n - a(n-1) - 9 (with a(1)=2). - Vincenzo Librandi, Aug 06 2010
a(n) = 4*n - (5 + (-1)^n)/2. - Arkadiusz Wesolowski, Sep 18 2012
G.f.: (2+3*x+3*x^2)/((-1+x)^2*(1+x)). - Harvey P. Dale, Feb 23 2016
a(1)=2, a(2)=5, a(3)=10, a(n) = a(n-1) + a(n-2) - a(n-3). - Harvey P. Dale, Feb 23 2016
From Franck Maminirina Ramaharo, Jul 22 2018: (Start)
a(n) = A047470(n) + 2.
E.g.f.: (6 - exp(-x) + (8*x - 5)*exp(x))/2. (End)
Sum_{n>=1} (-1)^(n+1)/a(n) = sqrt(2)*Pi/16 - log(2)/8 + sqrt(2)*log(sqrt(2)+1)/8. - Amiram Eldar, Dec 11 2021
MATHEMATICA
Select[Range[300], MemberQ[{2, 5}, Mod[#, 8]]&] (* or *) LinearRecurrence[ {1, 1, -1}, {2, 5, 10}, 80] (* Harvey P. Dale, Feb 23 2016 *)
PROG
(Maxima) makelist(4*n -(5 + (-1)^n)/2, n, 1, 100); /* Franck Maminirina Ramaharo, Jul 22 2018 */
(Python)
def A047617(n): return (n-1<<2)+1+(n&1) # Chai Wah Wu, Mar 30 2024
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
More terms from Vincenzo Librandi, Aug 06 2010
STATUS
approved