A317633 Numbers congruent to {1, 7, 9} mod 10.
1, 7, 9, 11, 17, 19, 21, 27, 29, 31, 37, 39, 41, 47, 49, 51, 57, 59, 61, 67, 69, 71, 77, 79, 81, 87, 89, 91, 97, 99, 101, 107, 109, 111, 117, 119, 121, 127, 129, 131, 137, 139, 141, 147, 149, 151, 157, 159, 161, 167, 169
Offset: 1
Examples
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
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).
Programs
-
Magma
[n: n in [0..170]|n mod 10 in {1, 7, 9}]; // Vincenzo Librandi, Aug 05 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 *)
-
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
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)
Extensions
Definition from Jianing Song, Aug 02 2018
Comments