OFFSET
1,2
COMMENTS
Except for 1, numbers whose binary reflected Gray code (A014550) ends with 01. - Amiram Eldar, May 17 2021
LINKS
Muniru A Asiru, Table of n, a(n) for n = 1..5000
Index entries for linear recurrences with constant coefficients, signature (1,1,-1).
FORMULA
G.f.: x*(1+5*x+2*x^2) / ( (1+x)*(x-1)^2 ). - R. J. Mathar, Dec 07 2011
E.g.f.: (4 + exp(-x) + (8*x - 5)*exp(x))/2. - Ilya Gutkovskiy, May 25 2016
a(n) = A047615(n) + 1. - Franck Maminirina Ramaharo, Jul 23 2018
Sum_{n>=1} (-1)^(n+1)/a(n) = (sqrt(2)+2)*Pi/16 + log(2)/8 + sqrt(2)*log(sqrt(2)+1)/8. - Amiram Eldar, Dec 11 2021
MAPLE
seq(coeff(series(factorial(n)*((4+exp(-x)+(8*x-5)*exp(x))/2), x, n+1), x, n), n=1..60); # Muniru A Asiru, Jul 24 2018
MATHEMATICA
Table[(8 n - 5 + (-1)^n)/2, {n, 1, 100}] (* Franck Maminirina Ramaharo, Jul 23 2018 *)
CoefficientList[ Series[(2x^2 + 5x + 1)/((x - 1)^2 (x + 1)), {x, 0, 50}], x] (* or *)
LinearRecurrence[{1, 1, -1}, {1, 6, 9}, 51] (* Robert G. Wilson v, Jul 24 2018 *)
PROG
(Maxima) makelist((8*n - 5 + (-1)^n)/2, n, 1, 100); /* Franck Maminirina Ramaharo, Jul 23 2018 */
(GAP) Filtered([0..250], n->n mod 8=1 or n mod 8=6); # Muniru A Asiru, Jul 24 2018
(Python)
def A047452(n): return (n<<2)-2-(n&1) # Chai Wah Wu, Mar 30 2024
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved