OFFSET
1,2
COMMENTS
When multiplied by 10, one gets the numbers ending in "dix" in French (10, 70, 90, 110, ...).
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..5000
Index entries for linear recurrences with constant coefficients, signature (1,0,1,-1).
FORMULA
a(n) = a(n-3) + 10, a(1) = 1, a(2) = 7, a(3) = 9.
From Bruno Berselli, Jul 02 2018: (Start)
G.f.: x*(1 + 6*x + 2*x^2 + x^3)/((1 - x)^2*(1 + x + x^2)).
a(n) = 2*n + 4*floor((n+1)/3) - 1. (End)
EXAMPLE
G.f. = x + 7*x^2 + 9*x^3+ 11*x^4 + 17*x^5 + 19*x^6 + 21*x^7 + 27*x^8 + ... - Michael Somos, Aug 19 2018
MATHEMATICA
Table[2 n + 4 Floor[(n + 1)/3] - 1, {n, 1, 60}] (* Bruno Berselli, Jul 02 2018 *)
Select[Range[0, 250], MemberQ[{1, 7, 9}, Mod[#, 10]]&] (* Vincenzo Librandi, Aug 05 2018 *)
CoefficientList[ Series[(x^3 + 2x^2 + 6x + 1)/((x - 1)^2 (x^2 + x + 1)), {x, 0, 60}], x] (* or *)
LinearRecurrence[{1, 0, 1, -1}, {1, 7, 9, 11}, 61] (* Robert G. Wilson v, Aug 08 2018 *)
PROG
(Magma) [n: n in [0..170]|n mod 10 in {1, 7, 9}]; // Vincenzo Librandi, Aug 05 2018
(PARI) x='x+O('x^60); Vec(x*(1+6*x+2*x^2+x^3)/((1-x)^2*(1+x+x^2))) \\ G. C. Greubel, Aug 08 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paul Curtz, Aug 02 2018
EXTENSIONS
Definition from Jianing Song, Aug 02 2018
STATUS
approved