login
A282848
a(n) = 2*n + 1 + n mod 4.
1
4, 7, 10, 9, 12, 15, 18, 17, 20, 23, 26, 25, 28, 31, 34, 33, 36, 39, 42, 41, 44, 47, 50, 49, 52, 55, 58, 57, 60, 63, 66, 65, 68, 71, 74, 73, 76, 79, 82, 81, 84, 87, 90, 89, 92, 95, 98, 97, 100, 103, 106, 105, 108, 111, 114, 113, 116, 119, 122, 121, 124, 127
OFFSET
1,1
FORMULA
For n > 4 a(n) = a(n - 4) + 8.
G.f.: x*(4 + 3*x + 3*x^2 - x^3 - x^4) / ((1 - x)^2*(1 + x)*(1 + x^2)). - Colin Barker, Feb 23 2017
MATHEMATICA
Table[2*k + 1 + Mod[k, 4], {k, 100}]
CoefficientList[ Series[(4 + 3 x + 3 x^2 - x^3 - x^4)/((x -1)^2 (1 + x + x^2 + x^3)), {x, 0, 60}], x] (* or *)
LinearRecurrence[{1, 0, 0, 1, -1}, {4, 7, 10, 9, 12}, 70] (* Robert G. Wilson v, Feb 23 2017 *)
PROG
(PARI) Vec(x*(4 + 3*x + 3*x^2 - x^3 - x^4) / ((1 - x)^2*(1 + x)*(1 + x^2)) + O(x^100)) \\ Colin Barker, Feb 23 2017
CROSSREFS
Sequence in context: A084035 A103702 A118517 * A093465 A123869 A309688
KEYWORD
nonn,easy
AUTHOR
Zak Seidov, Feb 23 2017
STATUS
approved