OFFSET
1,3
COMMENTS
From Wesley Ivan Hurt, Sep 26 2015: (Start)
Numbers with last digit 0 or 1.
Numbers k such that floor(k/2) = 5*floor(k/10). - Bruno Berselli, Oct 05 2017
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (1,1,-1).
FORMULA
From Zak Seidov, Oct 20 2011: (Start)
a(n) = a(n-2) + 10.
a(n) = 5*n - 7 - 2*(-1)^n. (End)
From Vincenzo Librandi, Jul 11 2012: (Start)
G.f.: x^2*(1+9*x)/((1+x)*(1-x)^2).
a(n) = a(n-1) + a(n-2) - a(n-3) for n>3. (End)
E.g.f.: 9 + (5*x - 7)*exp(x) - 2*exp(-x). - David Lovler, Sep 03 2022
MAPLE
MATHEMATICA
CoefficientList[Series[x*(1+9*x)/((1+x)*(1-x)^2), {x, 0, 50}], x] (* Vincenzo Librandi, Jul 11 2012 *)
PROG
(PARI) a(n)=n\2*10+n%2*9-9 \\ Charles R Greathouse IV, Oct 25 2011
(Magma) [5*n-7-2*(-1)^n: n in [1..60]]; // Vincenzo Librandi, Jul 11 2012
(Python)
def A197652(n): return 5*n-(5 if n&1 else 9) # Chai Wah Wu, Oct 29 2024
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Philippe Deléham, Oct 16 2011
STATUS
approved