OFFSET
1,1
COMMENTS
Equivalently, numbers k such that floor(k/5) is odd.
Also numbers k such that ceiling(-k/5) is odd. - Peter Luschny, Oct 10 2017
LINKS
Colin Barker, Table of n, a(n) for n = 1..500
Index entries for linear recurrences with constant coefficients, signature (1,0,0,0,1,-1).
FORMULA
G.f.: x*(5 + x + x^2 + x^3 + x^4 + x^5)/((1 - x)^2*(1 + x + x^2 + x^3 + x^4)).
a(n) = a(n-1) + a(n-5) - a(n-6).
a(n) = A293292(n) + 5.
a(n) = 2n+3-((n-1) mod 5). - Chai Wah Wu, Oct 29 2024
MAPLE
select(n -> type(ceil(-n/5), odd), [$0..130]); # Peter Luschny, Oct 10 2017
MATHEMATICA
LinearRecurrence[{1, 0, 0, 0, 1, -1}, {5, 6, 7, 8, 9, 15}, 70]
(* Alternative: *)
Select[Range[129], Mod[#, 10] >= 5 &] (* Jean-François Alcover, Oct 10 2017 *)
PROG
(Magma) [n: n in [0..150] | n mod 10 ge 5];
(PARI) select(k -> (k\5) % 2, vector(130, k, k)) \\ Peter Luschny, Oct 10 2017
(PARI) Vec(x*(5 + x + x^2 + x^3 + x^4 + x^5)/((1 - x)^2*(1 + x + x^2 + x^3 + x^4)) + O(x^100)) \\ Colin Barker, Oct 10 2017
(Python) [k for k in range(130) if (k//5) % 2 == 1] # Peter Luschny, Oct 10 2017
(Python)
def A293481(n): return (n<<1)+3-(n-1)%5 # Chai Wah Wu, Oct 29 2024
(SageMath) [k for k in (0..130) if not 2.divides(k//5)] # Peter Luschny, Oct 10 2017
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Bruno Berselli, Oct 10 2017
STATUS
approved
