A130877 Numbers that are congruent to {0, 5} mod 9.
0, 5, 9, 14, 18, 23, 27, 32, 36, 41, 45, 50, 54, 59, 63, 68, 72, 77, 81, 86, 90, 95, 99, 104, 108, 113, 117, 122, 126, 131, 135, 140, 144, 149, 153, 158, 162, 167, 171, 176, 180, 185, 189, 194, 198, 203, 207, 212, 216, 221, 225, 230, 234, 239, 243, 248, 252, 257
Offset: 1
Links
- Index entries for linear recurrences with constant coefficients, signature (1,1,-1).
Programs
-
Maple
op(select(n->n mod 9=0 or n mod 9=5,[$0..257])); # Paolo P. Lava, Jul 12 2018 # second Maple program: a:= n-> ceil(9*(n-1)/2): seq(a(n), n=1..58); # Alois P. Heinz, Apr 12 2025
-
Mathematica
Table[5n-5-Floor[(n-1)/2], {n,100}] (* Wesley Ivan Hurt, Oct 25 2013 *) Select[Range[0,300],MemberQ[{0,5},Mod[#,9]]&] (* or *) LinearRecurrence[ {1,1,-1},{0,5,9},60] (* Harvey P. Dale, Aug 04 2019 *)
-
PARI
forstep(n=0,200,[5,4],print1(n", ")) \\ Charles R Greathouse IV, Oct 17 2011
Formula
a(n) = a(n-2) + 9 for n >= 3.
a(n) = 9/2*(n+1) - 4 + Sum{j=0..n} (-1)^j/2.
O.g.f.: x^2(5+4x)/((1+x)(1-x)^2). a(n) = 9(n-1)/2+(1+(-1)^n)/4. - R. J. Mathar, Jun 13 2008
a(n) = 5n - 5 - floor((n-1)/2). - Wesley Ivan Hurt, Oct 25 2013
a(n) = ceiling(9*(n-1)/2). - Alois P. Heinz, Apr 12 2025
Comments